This question is a continuation of Interpreting the verbose output of ptxas, part I .
When we compile a kernel .ptx
file with ptxas -v
, or compile it from a .cu
file with -ptxas-options=-v
, we get a few lines of output such as:
ptxas info : Compiling entry function 'searchkernel(octree, int*, double, int, double*, double*, double*)' for 'sm_20'
ptxas info : Function properties for searchkernel(octree, int*, double, int, double*, double*, double*)
72 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 46 registers, 176 bytes cmem[0], 16 bytes cmem[14]
(same example as in the linked-to question; but with name demangling)
This question regards the last line. A few more examples from other kernels:
ptxas info : Used 19 registers, 336 bytes cmem[0], 4 bytes cmem[2]
...
ptxas info : Used 19 registers, 336 bytes cmem[0]
...
ptxas info : Used 6 registers, 16 bytes smem, 328 bytes cmem[0]
How do we interpret the information on this line, other than the number of registers used? Specifically:
- Is
cmem
short for constant memory? - Why are there different categories of
cmem
, i.e.cmem[0]
,cmem[2]
,cmem[14]
? smem
probably stands forshared memory
; is it only static shared memory?- Under which conditions does each kind of entry appear on this line?