can we know how many cores rhe gpu used?

When I run a CUDA or OPENCL program, can I know how many sm and sp the gpu used for this program?
any software can do that?

gpu kernels are usually called in many thousand threads which occupy 100% of gpu

you mean gpu will use its all the cores?


so if I only use only 1 block in cuda program. The gpu will use the the cuda cores in one sm or use all the cuda cores in gpu?

each thread block work inside a single SM, so a kernel with one thread block will use only cores of a single SM

multiple thread blocks are divided evenly between all SMs

thank u very much.