Skip to content

Commit

Permalink
Use rocblas_INCLUDE_DIR to define path to librocblas
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsfriess committed Feb 20, 2024
1 parent 0e397a1 commit 643f610
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmake/FindrocBLAS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,18 @@ find_package_handle_standard_args(rocBLAS
VERSION_VAR
ROCBLAS_VERSION
)

if (DEFINED rocblas_INCLUDE_DIR)
set(ROCBLAS_LIB_PATH "${rocblas_INCLUDE_DIR}/../lib/librocblas.so")
else()
set(ROCBLAS_LIB_PATH "${HIP_PATH}/../rocblas/lib/librocblas.so")
endif()

# OPENCL_INCLUDE_DIR
if(NOT TARGET ONEMKL::rocBLAS::rocBLAS)
add_library(ONEMKL::rocBLAS::rocBLAS SHARED IMPORTED)
set_target_properties(ONEMKL::rocBLAS::rocBLAS PROPERTIES
IMPORTED_LOCATION "${HIP_PATH}/../rocblas/lib/librocblas.so"
IMPORTED_LOCATION "${ROCBLAS_LIB_PATH}"
INTERFACE_INCLUDE_DIRECTORIES "${ROCBLAS_INCLUDE_DIR};${HIP_INCLUDE_DIRS};"
INTERFACE_LINK_LIBRARIES "Threads::Threads;${ROCBLAS_LIBRARIES};"
)
Expand Down

0 comments on commit 643f610

Please sign in to comment.