Skip to content

Commit

Permalink
[Offload] Change HSA header search order (#95769)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jhuber6 committed Jun 17, 2024
1 parent 8930ac1 commit 8043356
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions offload/plugins-nextgen/amdgpu/src/rtl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@
#endif

#if defined(__has_include)
#if __has_include("hsa/hsa.h")
#include "hsa/hsa.h"
#include "hsa/hsa_ext_amd.h"
#elif __has_include("hsa.h")
#if __has_include("hsa.h")
#include "hsa.h"
#include "hsa_ext_amd.h"
#elif __has_include("hsa/hsa.h")
#include "hsa/hsa.h"
#include "hsa/hsa_ext_amd.h"
#endif
#else
#include "hsa/hsa.h"
Expand Down

0 comments on commit 8043356

Please sign in to comment.