Can I know how many warp a kernel divides?

Can I know or calculate how many warp a kernel is divided into?

If so, what am I supposed to do? I need you to explain it in detail.

A threadblock is divided into warps.

The programming guide covers this in some detail:

“When a multiprocessor is given one or more thread blocks to execute, it partitions them into warps…”

So,

  • The maximum number of thread blocks per SM is 16.

Then, the warp size is 16 right?

And, ( block size / 16 ) = the number of warp of in any kernel ?

The warp size is 32 across all compute capabilities. You may find this table helpful Programming Guide :: CUDA Toolkit Documentation