Skip to content

[SYCL][UR] Fix include for COMGR #12286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions sycl/plugins/hip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions sycl/plugins/unified_runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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) <[email protected]>
# 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}")
Expand Down