如何解释 ptx 函数名称

how to interpret ptx function names

当我编译我的 cuda 文件时:

nvcc -arch=sm_61 -std=c++11 -Xptxas -v,-warn-spills --use_fast_math -maxrregcount 128 nv_wavenet_perf.cu -o nv_wavenet_perf_dual

我收到多行寄存器溢出警告:

ptxas warning : Registers are spilled to local memory in function '_Z25nv_wavenet_singleBlock_8RIffLi64ELi256ELi256ELi1EEv17nv_wavenet_paramsIT_T0_E'
ptxas warning : Registers are spilled to local memory in function '_Z25nv_wavenet_singleBlock_8RIffLi64ELi256ELi256ELi2EEv17nv_wavenet_paramsIT_T0_E'
ptxas warning : Registers are spilled to local memory in function '_Z25nv_wavenet_singleBlock_8RIffLi64ELi256ELi256ELi3EEv17nv_wavenet_paramsIT_T0_E'
ptxas warning : Registers are spilled to local memory in function '_Z25nv_wavenet_singleBlock_8RIffLi64ELi256ELi256ELi4EEv17nv_wavenet_paramsIT_T0_E'
ptxas warning : Registers are spilled to local memory in function '_Z20nv_wavenet_dualBlockIffLi64ELi256ELi256ELi1EEv17nv_wavenet_paramsIT_T0_E'
ptxas warning : Registers are spilled to local memory in function '_Z20nv_wavenet_dualBlockIffLi64ELi256ELi256ELi2EEv17nv_wavenet_paramsIT_T0_E'
ptxas warning : Registers are spilled to local memory in function '_Z20nv_wavenet_dualBlockIffLi64ELi256ELi256ELi3EEv17nv_wavenet_paramsIT_T0_E'
ptxas warning : Registers are spilled to local memory in function '_Z20nv_wavenet_dualBlockIffLi64ELi256ELi256ELi4EEv17nv_wavenet_paramsIT_T0_E'
ptxas warning : Registers are spilled to local memory in function '_Z25nv_wavenet_singleBlock_8RIffLi64ELi128ELi256ELi1EEv17nv_wavenet_paramsIT_T0_E'
ptxas warning : Registers are spilled to local memory in function '_Z25nv_wavenet_singleBlock_8RIffLi64ELi128ELi256ELi2EEv17nv_wavenet_paramsIT_T0_E'
ptxas warning : Registers are spilled to local memory in function '_Z25nv_wavenet_singleBlock_8RIffLi64ELi128ELi256ELi3EEv17nv_wavenet_paramsIT_T0_E'
ptxas warning : Registers are spilled to local memory in function '_Z25nv_wavenet_singleBlock_8RIffLi64ELi128ELi256ELi4EEv17nv_wavenet_paramsIT_T0_E'
ptxas warning : Registers are spilled to local memory in function '_Z20nv_wavenet_dualBlockIffLi64ELi128ELi256ELi1EEv17nv_wavenet_paramsIT_T0_E'
ptxas warning : Registers are spilled to local memory in function '_Z20nv_wavenet_dualBlockIffLi64ELi128ELi256ELi2EEv17nv_wavenet_paramsIT_T0_E'
...
  1. 我怎么知道哪个函数溢出了,因为这里显示的函数名称对我来说无法识别。

  2. 我只想查看 "dualBlock" 函数的溢出。这可能吗?

How can I tell what function is spilling, since the function name presented here are not identifiable for me.

CUDA 使用 Itanium C++ ABI. What you see are standard g++ style mangled function names. Every host toolchain ships with a demangler which can parse mangled function names (c++filt is most typical). There are even online demanglers. They will demangle function names. Internal CUDA ABI symbol demangling is not supported AFAIK。

例如:

_Z20nv_wavenet_dualBlockIffLi64ELi128ELi256ELi2EEv17nv_wavenet_paramsIT_T0_E

分解为

void nv_wavenet_dualBlock<float, float, 64, 128, 256, 2>(nv_wavenet_params<float, float>)

I only want to see spillage for "dualBlock" functions. Is this possible?

这些警告是由汇编程序 ptxas 生成的。我不知道如何使这些警告具有选择性。它们要么打开要么关闭。如果您单独编译某个函数,则可以控制该调用的汇编程序的输出级别,但据我所知,不能在单个编译调用中逐个函数地控制。