diff --git a/cmake/utils/FindCUDA.cmake b/cmake/utils/FindCUDA.cmake index aaddfb054366..8f3f638309cd 100644 --- a/cmake/utils/FindCUDA.cmake +++ b/cmake/utils/FindCUDA.cmake @@ -89,12 +89,16 @@ macro(find_cuda use_cuda use_cudnn) ${CUDA_TOOLKIT_ROOT_DIR}/lib64 ${CUDA_TOOLKIT_ROOT_DIR}/lib NO_DEFAULT_PATH) + # search default path if cannot find cublas in non-default + find_library(CUDA_CUBLAS_LIBRARY cublas) find_library(CUDA_CUBLASLT_LIBRARY NAMES cublaslt cublasLt PATHS ${CUDA_TOOLKIT_ROOT_DIR}/lib64 ${CUDA_TOOLKIT_ROOT_DIR}/lib NO_DEFAULT_PATH) + # search default path if cannot find cublaslt in non-default + find_library(CUDA_CUBLASLT_LIBRARY NAMES cublaslt cublasLt) endif(MSVC) # find cuDNN