[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)
Thomas Debesse via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jun 13 22:33:59 PDT 2024
illwieckz wrote:
```$
$ rg HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY
libc/utils/gpu/loader/amdgpu/Loader.cpp
521: HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY),
openmp/libomptarget/plugins-nextgen/amdgpu/dynamic_hsa/hsa_ext_amd.h
74: HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY = 0xA016,
openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
1892: if (auto Err = getDeviceAttrRaw(HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY,
```
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`
The code in `release/17.x` and `release/18.x` is explictely looking for `ROCm`'s `hsa/_ext_amd.h` and never look for LLVM `dynamic_hsa/hsa_ext_amd.h`. It tries to look for LLVM-provided `hsa_ext_amd.h` as a fallback but because of a mistake in `CMakeLists.txt`, this doesn't work in all cases because `dynamic_hsa` is not added to include directories in all cases.
https://github.com/llvm/llvm-project/pull/95484
More information about the llvm-branch-commits
mailing list