[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
Sun Jun 16 05:15:06 PDT 2024


jhuber6 wrote:

> This doesn't make sense, the ROCm packages may be just badly made by AMD.
> 
> When I temporarily remove `/usr/include/hsa` without uninstalling `libhsa-runtime-dev` **AND** while using `-DLIBOMPTARGET_FORCE_DLOPEN_LIBHSA=ON`, I can build LLVM18 without patch.
> 
> With `-DLIBOMPTARGET_FORCE_DLOPEN_LIBHSA=OFF` CMake complains that `/usr/include/hsa` is missing.
> 
> So it looks like I'm tracking a ROCm packaging bug from AMD side.

I don't think AMD handles the actual packaging, that's on the maintainers for your distribution. I'm guessing that the HSA runtime is a separate package from ROCm and gets put somewhere else for whatever reason. I don't have any issues like that with my distribution.

> But I still don't get why LLVM doesn't use its own HSA by default and doesn't use its own headers for enum values used in its own code.

It does in the main branch, but I think you're right that the logic causes it to look at the system one first since `hsa/hsa.h` is higher up the search list. Should probably do something about that.

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


More information about the llvm-branch-commits mailing list