A 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.
Transpose a large matrix at close to copy bandwidth. Why is the naive version slow, and what does each fix buy?
A 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.
Updated Sep 2026 · Grounded in real AI infrastructure interview loops and written to a senior-engineer editorial bar, with every number worked and every diagram hand-built.
The concepts behind this question
Ranked by how closely each one overlaps this question's topic, so the first card is the thing to read if the answer above moved too fast.
Scored on naming the copy kernel as the ceiling, on the sector arithmetic for the strided writes, on knowing that the shared-memory fix trades a global problem for a bank-conflict problem, and on the profiler evidence that separates them.
No comments yet — be the first to share your approach.
