ROCm / rocprofiler

ROC profiler library. Profiling with perf-counters and derived metrics.
https://rocm.docs.amd.com/projects/rocprofiler/en/latest/
Other
116 stars 44 forks source link

Infinite recursion fix #70

Open mxz297 opened 2 years ago

mxz297 commented 2 years ago

I noticed that rocm-4.5.2 tag is one commit ahead of rocm-4.5.x branch and that commit contains only newly added comments. Therefore, I decide to post the PR based on the rocm-4.5.x.

The main change is that hsa_api_ becomes a member rather than a static member of HsaRsrcFactory. This ensures that hsa_api_ will always be initialized with the public HSA function entries (so that one can use HsaRsrcFactory object to call HSA functions) and then one can reset hsa_api_ with internal HSA implementations for intercepting HSA calls.

This fixes #66 for both collecting performance counters and getting code object URI from roctracer.