illwieckz wrote:

I discovered something wrong:

```
ii  libhsa-runtime-dev 5.2.3-5                       amd64        HSA Runtime 
API and runtime for ROCm - development files
ii  libhsa-runtime64-1 5.2.3-5                       amd64        HSA Runtime 
API and runtime for ROCm
ii  libhsakmt1:amd64   5.2.3+dfsg-1                  amd64        Thunk library 
for AMD KFD (shlib)
```

It looks like I have some HSA 5.2.3 files… The `libhsa-runtime-dev` provides 
`/usr/include/hsa/hsa.h`.

This `libhsa-runtime-dev` package looks to be provided by the system (Ubuntu), 
but and if I attempt to uninstall it, it attempts to also uninstall 
`rocm-hip-runtime=6.1.2.60102-119~22.04` and `libdrm-amdgpu-dev`…

So ROCm 6.1.2 actually installs both `/opt/rocm-6.1.2/include/hsa/hsa.h` and 
5.2.3 `/usr/include/hsa/hsa.h`, and of course only the first one provides 
`HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY`…

This doesn't make sense, the ROCm packages may be just badly made by AMD.

So I temporarily remove `/usr/include/hsa` without uninstalling 
`libhsa-runtime-dev` **AND** using `-DLIBOMPTARGET_FORCE_DLOPEN_LIBHSA=ON`, I 
can build LLVM18 without patch.

With that option being `-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 still don't 
get why LLVM doesn't use its own HSA by default.

https://github.com/llvm/llvm-project/pull/95484
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to