Skip to content

Commit f58ef5a

Browse files
committed
Improving HIP search logic
1 parent 101ae56 commit f58ef5a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,10 +736,10 @@ int main(int argc, char *argv[]) {
736736
endif( PARSEC_GPU_WITH_CUDA )
737737

738738
if( PARSEC_GPU_WITH_HIP )
739-
if (NOT DEFINED ROCM_ROOT_DIR)
740-
set(ROCM_ROOT_DIR /opt/rocm)
739+
if( NOT DEFINED ROCM_ROOT_DIR )
740+
set(ROCM_ROOT_DIR /opt/rocm/)
741741
endif()
742-
list (APPEND CMAKE_PREFIX_PATH ${ROCM_ROOT_DIR}/hip ${ROCM_ROOT_DIR})
742+
list(APPEND CMAKE_PREFIX_PATH ${ROCM_ROOT_DIR}/hip ${ROCM_ROOT_DIR})
743743
find_package(HIP QUIET) #quiet because hip-config.cmake is not part of core-cmake and will spam a loud warning when hip/rocm is not installed
744744
if(HIP_FOUND AND HIP_VERSION VERSION_LESS 5) # find_package(HIP 5...6) does not work for some reason
745745
message(FATAL_ERROR "Found HIP version ${HIP_VERSION} in ${HIP_LIB_INSTALL_DIR} is too old, use HIP_ROOT to select another version")

cmake_modules/PaRSECConfig.cmake.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ endif(@PARSEC_HAVE_CUDA@)
6969

7070
if(@PARSEC_HAVE_HIP@)
7171
enable_language(CXX)
72-
list (APPEND CMAKE_PREFIX_PATH ${ROCM_ROOT_DIR}/hip ${ROCM_ROOT_DIR})
72+
list (APPEND CMAKE_PREFIX_PATH @ROCM_ROOT_DIR@/hip @ROCM_ROOT_DIR@)
7373
find_package(HIP REQUIRED)
7474
set(PARSEC_HAVE_HIP TRUE)
7575
endif(@PARSEC_HAVE_HIP@)

0 commit comments

Comments
 (0)