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

Missing source files #9

Closed acowley closed 5 years ago

acowley commented 6 years ago

I can not build rcp from source (on NixOS using gcc 7.3.0) as files seem to be missing. First, amd_hsa_tools_interfaces.h is not in any of the repositories the build fetches. I was able to find it here, though that repository is marked as obsolete. After patching things so the build can find that file, I am missing hsa_ext_debugger.h which I have not been able to find anywhere. There may be more missing files, but this is as far as the build goes.

To get this far, I needed to disable -Werror as mentioned in another issue, and add an #include <vector> line to Src/CLCommon/CLDeviceReplacer.cpp. I've also needed to address hard coded paths, but I think there are many that I have yet to fix, so I won't enumerate them here.

chesik-amd commented 6 years ago

Those two header files are part of a ROCm install (they should be inthe same location as hsa.h which is typically /opt/rocm/hsa/include/hsa. Do you have either rocm or rocm-dev installed (see https://github.com/GPUOpen-Tools/RCP/blob/master/BUILD.md#building-the-hsarocm-profiler)?

If you don't have ROCm files available, you can add "skip-hsaprofiler" to the build_rcp.sh command line.

The other errors (the warning and missing include) may be related to using gcc 7. We haven't done any work to support building with gcc7 yet.

acowley commented 6 years ago

Thank you for the quick response!

I do have an hsa.h which comes from the ROCR-Runtime repository, but the files I mentioned are not included there. The installation is entirely built from source, so I do not have the rocm or rocm-dev apt packages installed on that machine, but I do have enough to build things like hip or various OpenCL things from source.

chesik-amd commented 6 years ago

Yes, this seems liks a gap. Those two header files are part of a library (libhsa-runtime-tools64.so) which is not open-sourced. We rely on the fact that those header files are available after installing the ROCm packages.

Changes have been submitted (to both the common-src-AMDTOSWrappers repo and the RCP repo) to allow RCP to build with gcc7

chesik-amd commented 5 years ago

With changes in RCP 5.6 and with one addtional commit to "master", this should no longer be an issue. Please reopen, if I've missed something and unavailable headers are still referenced when building RCP from source