diff --git a/sycl/plugins/hip/CMakeLists.txt b/sycl/plugins/hip/CMakeLists.txt index 7bb8638d9aa13..0f949af2c109c 100644 --- a/sycl/plugins/hip/CMakeLists.txt +++ b/sycl/plugins/hip/CMakeLists.txt @@ -134,6 +134,21 @@ if("${SYCL_BUILD_PI_HIP_PLATFORM}" STREQUAL "AMD") target_link_libraries(pi_hip PUBLIC rocmdrv) if(SYCL_ENABLE_COMGR) + set(PI_COMGR_VERSION5_HEADER "${PI_HIP_INCLUDE_DIR}/amd_comgr/amd_comgr.h") + set(PI_COMGR_VERSION4_HEADER "${PI_HIP_INCLUDE_DIR}/amd_comgr.h") + # The COMGR header changed location between ROCm version 4 and 5. + # Check for the existence in the version 5 location or fallback to version 4 + if(NOT EXISTS "${PI_COMGR_VERSION5_HEADER}") + if(NOT EXISTS "${PI_COMGR_VERSION4_HEADER}") + message(FATAL_ERROR "Could not find AMD COMGR header at " + "${PI_COMGR_VERSION5_HEADER} or " + "${PI_COMGR_VERSION4_HEADER}, " + "check ROCm installation") + else() + target_compile_definitions(pi_hip PRIVATE UR_COMGR_VERSION4_INCLUDE) + endif() + endif() + add_library(amd_comgr SHARED IMPORTED GLOBAL) set_target_properties( amd_comgr PROPERTIES diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index e0f1409db06b9..d83214c11c7c8 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,13 +57,13 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") - # commit 1d7863601e9ecfffadf0617236a472a3b00fddbe - # Merge: cf87428c 3ee71a71 + # commit c311fe82256a7bc7f6ddd19cb86c8d555ce401bc + # Merge: eee75a29 d398d4ae # Author: Kenneth Benzie (Benie) - # Date: Thu Jan 4 11:03:26 2024 +0000 - # Merge pull request #938 from Bensuo/cmdbuf-fill-memset-l0 - # [EXP][CMDBUF] Implement Fill commands for L0 adapter - set(UNIFIED_RUNTIME_TAG 1d7863601e9ecfffadf0617236a472a3b00fddbe) + # Date: Thu Jan 4 15:12:54 2024 +0000 + # Merge pull request #1222 from sommerlukas/lukas/comgr-include-rocm4 + # [UR][HIP] Fix include for AMD COMGR + set(UNIFIED_RUNTIME_TAG c311fe82256a7bc7f6ddd19cb86c8d555ce401bc) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) set(UNIFIED_RUNTIME_REPO "${SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO}")