ROCm / rocprofiler

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

Multiple variable definition errors if rocprofiler.h is included in multiple C files #114

Open gcongiu opened 1 year ago

gcongiu commented 1 year ago

The HSA_VEN_AMD_AQLPROFILE_LEGACY_PM4_PACKET_SIZE is defined in an header file (hsa_ven_amd_aqlprofile.h) instead of a C file. The header is then included in rocprofiler.h and causes multiple definition errors at compile time when the rocprofiler header is included in more than one C file.

A possible fix for this problem could be to define the variable as static in the header file or to declare it extern in the header and define it another C file.

gcongiu commented 1 year ago

@ammarwa any update on this? Thanks

gcongiu commented 1 year ago

This is a reproducer issue-114.tar.gz