0
votes

Is there anyways to create more than 65535 blocks in CUDA?

If I understand correctly, the maximum number of threads in a block is 1024 (CUDA 8). So, it can form a 2^16(blocks) * 2^10(threads) space.

Is there anyways to create a 2^32 bits space?

What I wanna do is create a total of 2^32 threads in total. A simple example is, I malloced 4GB memory, and I want to fill up the memory with counters from 1 to 0xffffffff.

1
What GPU are you using?talonmies
@talonmies GTX 1080Timothy Leung

1 Answers

3
votes

If you read the relevant section of the documentation, you will see that your GPU supports 2^31 - 1 blocks in a one dimensional grid. So yes there is a way to create a kernel launch with 2^32 threads if you so desire (not that it is necessary or advisable in this case).