Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jchlanda committed Dec 11, 2023
1 parent 2ce86c2 commit 5d1dddd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/adapters/hip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,22 @@ set(UR_HIP_PLATFORM "AMD" CACHE STRING "UR HIP platform, AMD or NVIDIA")

# Set default ROCm installation directory
set(UR_HIP_ROCM_DIR "/opt/rocm" CACHE STRING "ROCm installation dir")
set(UR_HIP_INCLUDE_DIR "" CACHE FILEPATH "Custom ROCm HIP include dir")
set(UR_HIP_HSA_INCLUDE_DIR "" CACHE FILEPATH "Custom ROCm HSA include dir")
set(UR_HIP_LIB_DIR "" CACHE FILEPATH "Custom ROCm HIP library dir")

# Allow custom location of HIP/HSA include and HIP library directories
if("${SYCL_BUILD_PI_HIP_INCLUDE_DIR}" STREQUAL "")
if("${UR_HIP_INCLUDE_DIR}" STREQUAL "")
set(UR_HIP_INCLUDE_DIR "${UR_HIP_ROCM_DIR}/include")
else()
set(UR_HIP_INCLUDE_DIR "${SYCL_BUILD_PI_HIP_INCLUDE_DIR}")
endif()
if("${SYCL_BUILD_PI_HIP_HSA_INCLUDE_DIR}" STREQUAL "")
if("${UR_HIP_HSA_INCLUDE_DIR}" STREQUAL "")
set(UR_HIP_HSA_INCLUDE_DIR "${UR_HIP_ROCM_DIR}/hsa/include")
else()
set(UR_HIP_HSA_INCLUDE_DIR "${SYCL_BUILD_PI_HIP_INCLUDE_DIR}")
endif()
if("${SYCL_BUILD_PI_HIP_LIB_DIR}" STREQUAL "")
if("${UR_HIP_LIB_DIR}" STREQUAL "")
set(UR_HIP_LIB_DIR "${UR_HIP_ROCM_DIR}/lib")
else()
set(UR_HIP_LIB_DIR "${SYCL_BUILD_PI_HIP_LIB_DIR}")
Expand Down

0 comments on commit 5d1dddd

Please sign in to comment.