Skip to content

Commit

Permalink
[CMake] Remove FindRoc* files (#490)
Browse files Browse the repository at this point in the history
* Some files are deleted.
* These files were not needed, but added potential for issues.
  * Eg. if HIP_PATH was not set, the shared library associated with the target would not be found.
  • Loading branch information
hjabird authored Jun 3, 2024
1 parent 6d6a7b7 commit be002ea
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 178 deletions.
60 changes: 0 additions & 60 deletions cmake/FindrocBLAS.cmake

This file was deleted.

55 changes: 0 additions & 55 deletions cmake/FindrocRAND.cmake

This file was deleted.

56 changes: 0 additions & 56 deletions cmake/FindrocSOLVER.cmake

This file was deleted.

8 changes: 6 additions & 2 deletions src/blas/backends/rocblas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@

set(LIB_NAME onemkl_blas_rocblas)
set(LIB_OBJ ${LIB_NAME}_obj)
find_package(rocBLAS REQUIRED)
find_package(hip REQUIRED)
find_package(rocblas REQUIRED)
find_package(Threads REQUIRED)

set(SOURCES rocblas_level1.cpp
rocblas_level2.cpp
rocblas_level3.cpp
Expand Down Expand Up @@ -55,7 +58,8 @@ else()
target_link_options(ONEMKL::SYCL::SYCL INTERFACE)
endif()

target_link_libraries(${LIB_OBJ} PUBLIC ONEMKL::SYCL::SYCL ONEMKL::rocBLAS::rocBLAS)
target_link_libraries(${LIB_OBJ} PRIVATE roc::rocblas hip::host Threads::Threads)
target_link_libraries(${LIB_OBJ} PUBLIC ONEMKL::SYCL::SYCL)
target_compile_features(${LIB_OBJ} PUBLIC cxx_std_17)
set_target_properties(${LIB_OBJ} PROPERTIES
POSITION_INDEPENDENT_CODE ON)
Expand Down
8 changes: 6 additions & 2 deletions src/lapack/backends/rocsolver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@

set(LIB_NAME onemkl_lapack_rocsolver)
set(LIB_OBJ ${LIB_NAME}_obj)
find_package(rocSOLVER REQUIRED)
find_package(hip REQUIRED)
find_package(rocsolver REQUIRED)
find_package(Threads REQUIRED)

set(SOURCES rocsolver_lapack.cpp
rocsolver_batch.cpp
$<$<STREQUAL:${ONEMKL_SYCL_IMPLEMENTATION},dpc++>:rocsolver_scope_handle.cpp>
Expand All @@ -38,7 +41,8 @@ target_include_directories(${LIB_OBJ}
${ONEMKL_GENERATED_INCLUDE_PATH}
)
target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
target_link_libraries(${LIB_OBJ} PUBLIC ONEMKL::SYCL::SYCL ONEMKL::rocSOLVER::rocSOLVER)
target_link_libraries(${LIB_OBJ} PRIVATE roc::rocsolver hip::host Threads::Threads)
target_link_libraries(${LIB_OBJ} PUBLIC ONEMKL::SYCL::SYCL)
target_compile_features(${LIB_OBJ} PUBLIC cxx_std_17)
set_target_properties(${LIB_OBJ} PROPERTIES
POSITION_INDEPENDENT_CODE ON)
Expand Down
8 changes: 5 additions & 3 deletions src/rng/backends/rocrand/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@

set(LIB_NAME onemkl_rng_rocrand)
set(LIB_OBJ ${LIB_NAME}_obj)
find_package(rocRAND REQUIRED)
find_package(hip REQUIRED)
find_package(rocrand REQUIRED)
find_package(Threads REQUIRED)

set(SOURCES philox4x32x10.cpp mrg32k3a.cpp $<$<BOOL:${BUILD_SHARED_LIBS}>:
mkl_rng_rocrand_wrappers.cpp>)
Expand All @@ -67,8 +69,8 @@ target_include_directories(
${LIB_OBJ} PRIVATE ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin ${MKL_INCLUDE} ${ONEMKL_GENERATED_INCLUDE_PATH})

target_link_libraries(${LIB_OBJ} PUBLIC ONEMKL::SYCL::SYCL
ONEMKL::rocRAND::rocRAND)
target_link_libraries(${LIB_OBJ} PRIVATE roc::rocrand hip::host Threads::Threads)
target_link_libraries(${LIB_OBJ} PUBLIC ONEMKL::SYCL::SYCL)
target_compile_features(${LIB_OBJ} PUBLIC cxx_std_11)
set_target_properties(${LIB_OBJ} PROPERTIES POSITION_INDEPENDENT_CODE ON)

Expand Down

0 comments on commit be002ea

Please sign in to comment.