Skip to content

Commit e8be15f

Browse files
committed
[UR][HIP] Fix include for AMD COMGR
1 parent cf87428 commit e8be15f

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

source/adapters/hip/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ if("${UR_HIP_PLATFORM}" STREQUAL "AMD")
108108
INTERFACE_INCLUDE_DIRECTORIES "${HIP_HEADERS}"
109109
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${HIP_HEADERS}"
110110
)
111-
target_link_libraries(pi_hip PUBLIC amd_comgr)
112-
target_compile_definitions(pi_hip PRIVATE SYCL_ENABLE_KERNEL_FUSION)
111+
target_link_libraries(${TARGET_NAME} PUBLIC amd_comgr)
112+
target_compile_definitions(${TARGET_NAME} PRIVATE SYCL_ENABLE_KERNEL_FUSION)
113113
endif(UR_ENABLE_COMGR)
114114

115115
target_link_libraries(${TARGET_NAME} PRIVATE

source/adapters/hip/common.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
#pragma once
1111

1212
#ifdef SYCL_ENABLE_KERNEL_FUSION
13+
#if (ROCM_VERSION_MAJOR >= 5)
1314
#include <amd_comgr/amd_comgr.h>
15+
#else
16+
#include <amd_comgr.h>
17+
#endif
1418
#endif
1519
#include <hip/hip_runtime.h>
1620
#include <ur/ur.hpp>

source/adapters/hip/program.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
#include "program.hpp"
1212

1313
#ifdef SYCL_ENABLE_KERNEL_FUSION
14+
#if (ROCM_VERSION_MAJOR >= 5)
1415
#include <amd_comgr/amd_comgr.h>
16+
#else
17+
#include <amd_comgr.h>
18+
#endif
1519
namespace {
1620
template <typename ReleaseType, ReleaseType Release, typename T>
1721
struct COMgrObjCleanUp {

0 commit comments

Comments
 (0)