如何解释ptx函数名称

时间:2018-09-13 06:27:15

标签: cuda nvcc ptx

当我编译我的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”功能的溢出。这可能吗?

1 个答案:

答案 0 :(得分:3)

  

由于我无法识别此处显示的功能名称,所以我怎么知道正在溢出的功能。

CUDA使用Itanium C++ ABI。您会看到标准的g ++样式错误的函数名称。每个主机工具链都随附有一个分解器,该分解器可以解析错误的函数名称(最典型的是c ++ filt)。甚至还有online个拆弹者。它们将对函数名称进行分解。内部CUDA ABI符号的拆解为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>)
  

我只希望看到“ dualBlock”功能的溢出。这可能吗?

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