GPUOpen-Tools / radeon_compute_profiler

The Radeon Compute Profiler (RCP) is a performance analysis tool that gathers data from the API run-time and GPU for OpenCL™ and ROCm/HSA applications. This information can be used by developers to discover bottlenecks in the application and to find ways to optimize the application's performance.
MIT License
84 stars 19 forks source link

[Build failure] [HSAFdnTrace] Missing header and wrong definition #26

Open kholk opened 5 years ago

kholk commented 5 years ago

Hello AMD! Here to inform you that the HSAFdnTrace cannot build in its current state.

These are the issues:

  1. AutoGenerated/HSATraceStringOutput.cpp error: ‘GPU_MEMORY_FAULT_EVENT’ was not declared in this scope; did you mean ‘HSA_AMD_GPU_MEMORY_FAULT_EVENT’?
  2. HSAFdnAPIInfoManager.h includes hsa_ext_profiler.h which is unavailable in the current OSS GIT repositories.

Solved as following:

  1. The compiler was right, the definition was missing the HSAAMD prefix: this autogenerated code looks like referencing an old version of the header that contains this definition (hsa_ext_amd.h). After checking both old and new headers, it's the very same enumeration, so, manually adding said prefix, it becomes happy.
  2. The hsa_ext_profiler.h header was pulled from hsa-rocr-dev_1.1.9-74-g4eea4a1_amd64.deb, pushed where the build expects it and it did build fine... though, it looks like the only thing that the HSAFdnAPI misses here is hsa_profiler_kernel_time_t.

Thanks for the wonderful OSS stack! Angelo

chesik-amd commented 5 years ago

Hi Angelo,

Thanks for this report. Part of this has already been taken care of in our internal builds. We'll take care of the remaining issue and update the sources here once that work is complete.

Chris