解释ptxas的详细输出,第二部分 [英] Interpreting the verbose output of ptxas, part II
问题描述
该问题是继续解释ptxas的详细输出,第一部分。。
当我们使用 ptxas -v
编译内核 .ptx
文件时,或从一个具有 -ptxas-options = -v
的 .cu
文件,我们得到如下几行输出: / p>
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:
-
cmem
是恒定内存的缩写吗? - 为什么会有
cmem
不同的类别,即cmem [0]
,cmem [2]
,cmem [14]
? -
smem
可能表示共享内存
;仅仅是静态共享内存吗? - 在哪种情况下该行上会出现每种条目?
- 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?
推荐答案
cmem是常量内存的缩写吗?
Is cmem short for constant memory?
是
为什么存在cmem的不同类别,即cmem [0],cmem [2], cmem [14]?
Why are there different categories of cmem, i.e. cmem[0], cmem[2], cmem[14]?
它们表示不同的常量存储库。 cmem [0]
是内核参数和静态大小的常量值的保留库。
They represent different constant memory banks. cmem[0]
is the reserved bank for kernel arguments and statically sized constant values.
smem可能代表共享内存;只是静态共享内存吗?
smem probably stands for shared memory; is it only static shared memory?
是的,否则情况会怎样。
It is, and how could it be otherwise.
在哪种情况下该行会显示每种条目?
Under which conditions does each kind of entry appear on this line?
回答最多此处。
这篇关于解释ptxas的详细输出,第二部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!