Implement matrix transpose three times — naive, shared memory, and bank-conflict-free — and benchmark each version. This project exposes why memory access patterns dominate GPU performance.
// PREREQUISITES
// TUTORIAL
GPU execution(row, col) moves to (col, row).A[row * N + col] and writes B[col * N + row].A[row * N + col] — threads in a warp have consecutive col → coalesced ✓B[col * N + row] — threads in a warp have consecutive row in the output → non-coalesced ✗// expected output
Naive transpose: CORRECT
// YOUR PROGRESS
Log in to save progress
// DETAILS
// MORE IN MEMORY
// LEARN THE THEORY
Memory concepts