04Explain shared memory bank conflicts with the bank arithmetic, show a kernel that has them, and fix it with padding.▼mediumNewNVIDIATogether AI4 repliesunlockedShared memory has 32 banks, each 4 bytes wide, and a warp's access is as slow as the most-loaded bank. The bank of an address, why a column walk down a 32-wide tile puts all 32 lanes in one bank, the padding by one column that spreads them across all 32, and the profiler counter that confirms the fix.Open full answer →
14Transpose a large matrix at close to copy bandwidth. Why is the naive version slow, and what does each fix buy?▼mediumNewNVIDIA3 replies○ sign inA transpose moves every byte exactly once, so a device copy is the honest ceiling. Why the naive kernel pays eight times the write traffic, why staging through shared memory does nothing until you pad, and the counter that tells the two problems apart.Open full answer →