Skip to content

Commit

Permalink
FindOrFetchBTAS: tell linalg++ to look for CUDA or HIP
Browse files Browse the repository at this point in the history
  • Loading branch information
evaleev committed Sep 18, 2023
1 parent fd60c28 commit d3f4260
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmake/modules/FindOrFetchBTAS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ if (NOT TARGET BTAS::BTAS)
set(_linalgpp_use_standard_linalg_kits TRUE)
endif(DEFINED BLA_VENDOR)

if (NOT TILEDARRAY_HAS_CUDA)
# tell BLAS++/LAPACK++ to ignore CUDA
if (TILEDARRAY_HAS_CUDA)
# tell BLAS++/LAPACK++ to also look for CUDA
set(gpu_backend cuda CACHE STRING "The device backend to use for Linalg++")
elseif (TILEDARRAY_HAS_HIP)
# tell BLAS++/LAPACK++ to also look for HIP
set(gpu_backend hip CACHE STRING "The device backend to use for Linalg++")
else ()
# tell BLAS++/LAPACK++ to not look for device backends
set(gpu_backend none CACHE STRING "The device backend to use for Linalg++")
endif()

Expand Down

0 comments on commit d3f4260

Please sign in to comment.