cudanvccptx

how to interpret ptx function names


when I compile my cuda file:

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

I get many lines of register spill warnings:

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. How can I tell what function is spilling, since the function name presented here are not identifiable for me.

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


Solution

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

    CUDA uses the 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.

    For example:

    _Z20nv_wavenet_dualBlockIffLi64ELi128ELi256ELi2EEv17nv_wavenet_paramsIT_T0_E
    

    demangles to

    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?

    Those warnings are generated by ptxas, the assembler. There is no way I am aware of to make those warnings selective. They are either on or off. If you separately compile a certain function, it might be possible to control the level of output from the assembler for that invocation, but not function by function within a single compilation call, as far as I am aware.