Alex Rivera | Logout

CUDA max threads in a block

Asked 2011-02-21T05:49:29.777
17

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 ?

Edit
Report

1 Answer

41

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).

answered 2011-02-22T02:59:57.847

Your Answer