illwieckz wrote:

> I don't think AMD handles the actual packaging.

They do: https://repo.radeon.com

It happens that Ubuntu provides an old 5.2.3 `libhsa-runtime-dev` and it seems 
to be a dependency of some package provided by the AMD `repo.radeon.com` own 
repository providing ROCm 6.1.2…

> 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.

Maybe, instead of adding `dynamic_hsa/` directory to include directories and 
assuming an ambiguous implicit directory for `hsa.h`, we would not add that 
directory and do explicitely:


```c++
#if defined(__has_include)
#if __has_include("dynamic_hsa/hsa.h")
#include "dynamic_hsa/hsa.h"
#include "dynamic_hsa/hsa_ext_amd.h"
#if __has_include("hsa/hsa.h")
#include "hsa/hsa.h"
#include "hsa/hsa_ext_amd.h"
#elif __has_include("hsa.h")
#include "hsa.h"
#include "hsa_ext_amd.h"
#endif
#else
#include "dynamic_hsa/hsa.h"
#include "dynamic_hsa/hsa_ext_amd.h"
#endif
```

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