A thread limit is the maximum number of threads in one CUDA block: 1,024 on modern GPUs. Think of a block as a classroom with limited room; larger workloads need more blocks, not one oversized block. section 3.0 section 3.1
Exceeding the limit has a practical consequence:
- A launch such as <<<1, 10000>>> is rejected, so no threads run and the data remains unchanged. section 3.1
- Use multiple blocks instead, such as <<<40, 250>>> for 10,000 threads. Check a rejected launch with cudaGetLastError() and inspect the launch dimensions. section 3.1
Matrix-multiplication tiles
A square tile uses TILE_SIZE × TILE_SIZE threads per block. TILE_SIZE 32 uses exactly 1,024 threads; TILE_SIZE 64 would use 4,096 and exceed the limit. section 12.8
