Skip to content

Commit 8043356

Browse files
authored
[Offload] Change HSA header search order (#95769)
Summary: The HSA headers existed previously in `include/hsa.h` and were moved to `include/hsa/hsa.h` in a later ROCm version. The include headers here were originally designed to favor a newer one. However, this unintentionally prevented the dyanmic HSA's `hsa.h` from being used if both were present. This patch changes the order so it will be found first. Related to #95484.
1 parent 8930ac1 commit 8043356

File tree

1 file changed

+4
-4
lines changed
  • offload/plugins-nextgen/amdgpu/src

1 file changed

+4
-4
lines changed

offload/plugins-nextgen/amdgpu/src/rtl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@
5858
#endif
5959

6060
#if defined(__has_include)
61-
#if __has_include("hsa/hsa.h")
62-
#include "hsa/hsa.h"
63-
#include "hsa/hsa_ext_amd.h"
64-
#elif __has_include("hsa.h")
61+
#if __has_include("hsa.h")
6562
#include "hsa.h"
6663
#include "hsa_ext_amd.h"
64+
#elif __has_include("hsa/hsa.h")
65+
#include "hsa/hsa.h"
66+
#include "hsa/hsa_ext_amd.h"
6767
#endif
6868
#else
6969
#include "hsa/hsa.h"

0 commit comments

Comments
 (0)