[roc*][DPC++] Build fails for rocm version < 6.3
Summary
While building any domain using DPC++ compiler and rocm v6.2.4 leads to the following error:
clang++: error: cannot find ROCm device library for ABI version 6, which requires ROCm 6.3 or higher; provide its path via '--rocm-path' or '--rocm-device-lib-path', or pass '-nogpulib' to build without ROCm device library
Version
oneMath: 0c57e49c0edc0bb66e6cc46c88f3fc11a7a6f86d
Hey @abagusetty, thanks for reporting the issue. I was not able to reproduce the issue locally using oneAPI 2025.1 and rocm 6.2.3. I don't really get where the issue is coming from. It looks related to https://github.com/llvm/llvm-project/issues/134771.
What @Rbiessy linked is correct, upstream LLVM moved to the newer version of AMD device ABI, it now defaults to 6 which is only supported by ROCm 6.3+.
You can still downgrade the code object version by passing -mcode-object-version=5, this should fix the build with ROCm 6.2.4. It's not ideal but it should work.
Note that this is not oneMath specific and should happen for any HIP or SYCL on AMD application compiled with a recent enough LLVM compiler.