ROCm / rocprofiler-compute

Advanced Profiling and Analytics for AMD Hardware
https://rocm.docs.amd.com/projects/omniperf/en/latest/
MIT License
135 stars 49 forks source link

Kernel name mappings #142

Closed aosewski closed 1 year ago

aosewski commented 1 year ago

I have kernels with plethora of template parameters, which results in kernel names like this:

_ZN2ck34kernel_gemm_xdl_direct_c_write_outINS_34GridwiseGemm_k0mk1_k0nk1_mn_xdl_v1IDF16_fDF16_NS_16tensor_operation12element_wise11PassThroughES4_S4_LNS_25InMemoryDataOperationEnumE0ENS_16TensorDescriptorINS_5TupleIJNS_5EmbedINS7_IJiiEEENS7_IJiNS_17integral_constantIiLi1EEEEEELb0EEENS_8RightPadIiiLb0EEESF_NS_7UnMergeIS9_Lb0EEENS_11PassThroughIiEEEEENS7_IJNS_8SequenceIJLi0EEEENSL_IJLi1EEEENSL_IJLi2EEEENSL_IJLi4EEEENSL_IJLi3EEEEEEENS7_IJNSL_IJLi1ELi2EEEESQ_SP_NSL_IJLi5ELi6EEEENSL_IJLi7EEEEEEENSL_IJLi5ELi7ELi6EEEElEESX_NS6_INS7_IJSD_SF_SF_EEENS7_IJSM_SN_SO_EEENS7_IJSS_SQ_SP_EEENSL_IJLi3ELi4EEEElEELi1ELi256ELi128ELi128ELi32ELi8ELi8ELi32ELi32ELi2ELi2ENSL_IJLi4ELi64ELi1EEEENSL_IJLi1ELi0ELi2EEEES14_Li2ELi8ELi8ELb0ELi1ES13_S14_S14_Li2ELi8ELi8ELb0ELi1ENSL_IJLi1ELi0ELi2ELi3ELi4ELi5ELi6ELi7EEEELi7ELi2ELNS_13LoopSchedulerE0ELNS_15PipelineVersionE0EEEDF16_DF16_S4_S4_S4_SX_SX_NS6_INS7_IJSD_SF_SF_NSG_INS7_IJiiiEEELb0EEES1A_SJ_SJ_SJ_SJ_NSI_INSA_IiLi32EEEEENSG_INS7_IJNSA_IiLi4EEENSA_IiLi2EEES1D_EEELb0EEEEEENS7_IJSM_SN_SO_SQ_SP_NSL_IJLi5EEEENSL_IJLi8EEEENSL_IJLi6EEEENSL_IJLi9EEEESU_NSL_IJLi10EEEEEEENS7_IJSS_SQ_SP_NSL_IJLi5ELi6ELi7EEEENSL_IJLi8ELi9ELi10EEEENSL_IJLi11EEEENSL_IJLi12EEEENSL_IJLi13EEEENSL_IJLi14EEEENSL_IJLi15EEEENSL_IJLi16ELi17ELi18EEEEEEENSL_IJLi11ELi12ELi13ELi14ELi15ELi16ELi17ELi18EEEElEENS_31BlockToCTileMap_M00_N0_M01AdaptILi128ELi128ES12_EELb1EEEvPKT0_S23_PT1_T2_T3_T4_T5_T6_T7_T8_

Which obviously is totally unreadable. Moreover If I run multiple kernels in single session (differing in a template parameter values) it's almost impossible to figure out which kernel Id corresponds to which kernel just by name. Unfortunately the browser GUI does not show such long kernel names correctly - they're cut somewhere.

Is there a way to define some mappings or whatever the mechanism to differentiate kernels with such long and similar names ?

coleramos425 commented 1 year ago

Which Omniperf version are you using?

@aosewski have you tried hovering over the kernel name in the browser GUI drop-down menu? In the case of long names, this will activate an HTML span pop-up which should display the full name. For example, image

ausellis0 commented 1 year ago

Hi @coleramos425, We are experiencing the same issue and we believe it is due to c++filt. If you are using RDC, then a .intern.*.kd is appended to your mangled kernel name and this confuses c++filt. If we use llvm-cxxfilt, provided in ${ROCM_PATH}/llvm/bin, it may demangle properly with and without rdc. Thanks!

aosewski commented 1 year ago

@coleramos425 I'm using Omniperf v1.0.8. Right when I hover over the kernel name it's displayed correctly - that is full mangled name. However getting the name demangled would be grate!

coleramos425 commented 1 year ago

Integrated feedback into dev for next release

@aosewski + @ausellis0 reach out if you have any further questions.