To determine the number of registers used per thread in your kernel, simply compile the kernel code using the option --ptxas-options=-v to nvcc. This will output information about register, local memory, shared memory, and constant memory usage for each kernel in the .cu file. Alternatively, you can compile with the -cubin option to nvcc. This will generate a .cubin file, which you can open in a text editor. Look for the “code” section with your kernel’s name. Within the curly braces (“{ … }”) for that code block, you will see a line with “reg = X”, where x is the number of registers used by your kernel. You can also see the amount of shared memory used as “smem = Y”. However, if your kernel declares any external shared memory that is allocated dynamically, you will need to add the number in the .cubin file to the amount you dynamically allocate at run time to get the correct shareded memory usage
上面这段话是在linux下如何查看每个thread使用的寄存器和共享存储器大小,我的环境是win7+vs2005(MFC)
如何查看每个thread使用的寄存器和共享存储器大小?
[ 本帖最后由 图腾部落 于 2010-6-25 17:13 编辑 ]