Improve hipBLAS support in CMake
This improves the detection of the correct CMAKE_PREFIX_PATH when using different distributions or a self-built ROCm SDK.
This commit is contained in:
parent
9422c5e34b
commit
27d1431463
1 changed files with 7 additions and 4 deletions
|
@ -545,12 +545,15 @@ if (LLAMA_VULKAN)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (LLAMA_HIPBLAS)
|
if (LLAMA_HIPBLAS)
|
||||||
if ($ENV{ROCM_PATH})
|
if (NOT EXISTS $ENV{ROCM_PATH})
|
||||||
set(ROCM_PATH $ENV{ROCM_PATH})
|
if (NOT EXISTS /opt/rocm)
|
||||||
else()
|
set(ROCM_PATH /usr)
|
||||||
set(ROCM_PATH /opt/rocm)
|
else()
|
||||||
|
set(ROCM_PATH /opt/rocm)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH})
|
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH})
|
||||||
|
list(APPEND CMAKE_PREFIX_PATH "$ENV{ROCM_PATH}/lib64/cmake")
|
||||||
|
|
||||||
# CMake on Windows doesn't support the HIP language yet
|
# CMake on Windows doesn't support the HIP language yet
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue