I'm filtering my compiled PTX through c++filt, but it only demangles some of the names/labels and leaves some as-is. For example, this:
func (.param .b32 func_retval0) _ZN41_INTERNAL_19_gather_bits_cpp1_ii_56538e7c6__shflEiii(
.param .b32 _ZN41_INTERNAL_19_gather_bits_cpp1_ii_56538e7c6__shflEiii_param_0,
.param .b32 _ZN41_INTERNAL_19_gather_bits_cpp1_ii_56538e7c6__shflEiii_param_1,
.param .b32 _ZN41_INTERNAL_19_gather_bits_cpp1_ii_56538e7c6__shflEiii_param_2
)
is demangled as this:
.func (.param .b32 func_retval0) _INTERNAL_19_gather_bits_cpp1_ii_56538e7c::__shfl(int, int, int)(
.param .b32 _ZN41_INTERNAL_19_gather_bits_cpp1_ii_56538e7c6__shflEiii_param_0,
.param .b32 _ZN41_INTERNAL_19_gather_bits_cpp1_ii_56538e7c6__shflEiii_param_1,
.param .b32 _ZN41_INTERNAL_19_gather_bits_cpp1_ii_56538e7c6__shflEiii_param_2
)
rather than at least this:
.func (.param .b32 func_retval0) _INTERNAL_19_gather_bits_cpp1_ii_56538e7c::__shfl(int, int, int)(
.param .b32 _ZN41_INTERNAL_19_gather_bits_cpp1_ii_56538e7c::__shfl(int, int, int)_param_0,
.param .b32 _ZN41_INTERNAL_19_gather_bits_cpp1_ii_56538e7c::__shfl(int, int, int)_param_1,
.param .b32 _ZN41_INTERNAL_19_gather_bits_cpp1_ii_56538e7c::__shfl(int, int, int)_param_2
)
I realize c++filt does not have explicit support for CUDA PTX; but note that the undemangled names differ from the demangled ones in the example merely by an addition _param_0
, _param_1
etc. suffix (there's also the question of how the prefix of those names should be demangled, but let's forget about that).
- Is there something I can do force c++filt to also apply to the parameter names/labels as well? And more generally, to all of the mangled C++ names in the PTX file?
- Is it possible/easy to augment c++filt with awareness of the the CUDA "format", in additional to the "formats" it has already (
[-s|--format {none,auto,gnu,lucid,arm,hp,edg,gnu-v3,java,gnat,dlang}]
)? - If c++filt can't be used or adapted for use in this case, how should I go about doing the demangling?