I’m now very interested in CUDA though I’m a totally freshman.

My GPU is GTX 260+, from the device query in the GPU SDK, we can see that
“maximum size of each dimension of a block: 51251264”
“maximum size of each dimension of a grid: 65535655351”
Can anyone give me a detail description on what the above mean? For example, for a block, does “51251264” mean that the block has three dimensions, and we can assign at most 512 threads along X-axis, 512 threads along Y-axis, 64 threads along Z-axis? If not ,what does the number “512” and “64” mean?

I’m now very interested in CUDA though I’m a totally freshman.

My GPU is GTX 260+, from the device query in the GPU SDK, we can see that
“maximum size of each dimension of a block: 51251264”
“maximum size of each dimension of a grid: 65535655351”
Can anyone give me a detail description on what the above mean? For example, for a block, does “51251264” mean that the block has three dimensions, and we can assign at most 512 threads along X-axis, 512 threads along Y-axis, 64 threads along Z-axis? If not ,what does the number “512” and “64” mean?

I think block dimension is capacity of thread in block for that dimension. But for block, there’s maximum in # of threads.
So dim_x * dim_y * dim_z <= maximum thread in a block need to be satisfied.

I think block dimension is capacity of thread in block for that dimension. But for block, there’s maximum in # of threads.
So dim_x * dim_y * dim_z <= maximum thread in a block need to be satisfied.

gridIdx does not exist. there is always exactly 1 grid. (per invocation of a kernel by a host)

a little confusing if you ask me. i’m use to, and was expecting, all those dims to be demoted down one level such that threadDim would exist and gridDim wouln’t. and threaddim would refer to number of threads and blockdim to number of blocks. seems to me that would be simpler and more intuitive. but that’s not the way nvidia did it. and it’d be pretty tough to change it now.

gridIdx does not exist. there is always exactly 1 grid. (per invocation of a kernel by a host)

a little confusing if you ask me. i’m use to, and was expecting, all those dims to be demoted down one level such that threadDim would exist and gridDim wouln’t. and threaddim would refer to number of threads and blockdim to number of blocks. seems to me that would be simpler and more intuitive. but that’s not the way nvidia did it. and it’d be pretty tough to change it now.