Skip to content

Commit

Permalink
PR feedback 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jchlanda committed Dec 13, 2023
1 parent ae98e37 commit 5d83dc8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ List of options provided by CMake:
| UR_ENABLE_COMGR | Enable comgr lib usage | AMD/NVIDIA | AMD |
| UR_DPCXX | Path of the DPC++ compiler executable to build CTS device binaries | File path | `""` |
| UR_SYCL_LIBRARY_DIR | Path of the SYCL runtime library directory to build CTS device binaries | Directory path | `""` |
| UR_HIP_ROCM_DIR | Path of the default ROCm HIP installation | Directory path | `/opt/rocm` |
| UR_HIP_INCLUDE_DIR | Path of the ROCm HIP include directory | Directory path | `${UR_HIP_ROCM_DIR}/include` |
| UR_HIP_HSA_INCLUDE_DIR | Path of the ROCm HSA include directory | Directory path | `${UR_HIP_ROCM_DIR}/hsa/include""` |
| UR_HIP_LIB_DIR | Path of the ROCm HIP library directory | Directory path | `${UR_HIP_ROCM_DIR}/lib""` |

### Additional make targets

Expand Down
15 changes: 6 additions & 9 deletions source/adapters/hip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ 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")
# Allow custom location of HIP/HSA include and HIP library directories
if("${UR_HIP_INCLUDE_DIR}" STREQUAL "")
set(UR_HIP_INCLUDE_DIR "${UR_HIP_ROCM_DIR}/include")
endif()
if("${UR_HIP_HSA_INCLUDE_DIR}" STREQUAL "")
set(UR_HIP_HSA_INCLUDE_DIR "${UR_HIP_ROCM_DIR}/hsa/include")
endif()
if("${UR_HIP_LIB_DIR}" STREQUAL "")
set(UR_HIP_LIB_DIR "${UR_HIP_ROCM_DIR}/lib")
endif()
set(UR_HIP_INCLUDE_DIR "${UR_HIP_ROCM_DIR}/include" CACHE FILEPATH
"Custom ROCm HIP include dir")
set(UR_HIP_HSA_INCLUDE_DIR "${UR_HIP_ROCM_DIR}/hsa/include" CACHE FILEPATH
"Custom ROCm HSA include dir")
set(UR_HIP_LIB_DIR "${UR_HIP_ROCM_DIR}/lib" CACHE FILEPATH
"Custom ROCm HIP library dir")

# Check if HIP library path exists (AMD platform only)
if("${UR_HIP_PLATFORM}" STREQUAL "AMD")
Expand Down

0 comments on commit 5d83dc8

Please sign in to comment.