[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

Joseph Huber via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jun 14 04:46:37 PDT 2024


jhuber6 wrote:

> The `openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp` file requires the `HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY` symbol.
> 
> This symbol is expected to be provided by `openmp/libomptarget/plugins-nextgen/amdgpu/dynamic_hsa/hsa_ext_amd.h`, not by third-party external `/opt/rocm/include/hsa/hsa_ext_amd.h`.

This was introduced in ROCm-5.3, see https://github.com/ROCm/ROCR-Runtime/blob/rocm-5.3.x/src/inc/hsa_ext_amd.h#L333. The `dynamic_hsa/` version is a copy of this header for use when the system version is not provided. If the system fails to find HSA, then it will use the dynamic version. The problem here is that you _have_ HSA, but it's too old. I don't know how much backward compatibility we really provide here, unfortunately the HSA headers really don't give you much versioning to work with, so we can't do `ifdef` on this stuff. 

https://github.com/llvm/llvm-project/pull/95484


More information about the llvm-branch-commits mailing list