Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CUDA max threads in a block

Tags:

cuda

I have a confusion from the programming guide . It states the following:

  • maxThreadsPerBlock: 512
  • maxThreadsDim: 512, 512, 64 .

When max number of threads in a block can be 512, how can the max thread dimension be 512*512*64 ?

like image 802
kar Avatar asked Feb 21 '11 05:02

kar


1 Answers

Maximum threads in X direction: 512 (1024 for compute capability >= 2.0)

Maximum threads in Y direction: 512 (1024 for compute capability >= 2.0)

Maximum threads in Z direction: 64

So you can launch the following block configurations (compute capability >= 2.0 shown in parentheses)

  • 512 x 1 x 1 (1024 x 1 x 1)

  • 128 x 2 x 2 (256 x 2 x 2)

  • 1 x 512 x 1 (1 x 1024 x 1)

  • 1 x 8 x 64 (2 x 8 x 64)

  • 2 x 4 x 64 (4 x 4 x 64)

and so on.

The total number of threads in a block must not exceed 512 (for compute capability < 2.0), or 1024 (for compute capability >= 2.0).

like image 79
Pavan Yalamanchili Avatar answered Sep 30 '22 07:09

Pavan Yalamanchili