Skip to content

Commit

Permalink
BLAS - ROT: calling appropriate cuBLAS function (#2473)
Browse files Browse the repository at this point in the history
After changing the rot interface from using all real to a mix
of real and complex coefficients, the cuBLAS call needs to be made
to {Z,C}rot instead of {Zd,Cs}rot.

Signed-off-by: Luc Berger-Vergiat <[email protected]>
  • Loading branch information
lucbv authored Jan 7, 2025
1 parent 0adc88b commit f321baf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions blas/tpls/KokkosBlas1_rot_tpl_spec_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ namespace Impl {
cublasPointerMode_t pointer_mode; \
KOKKOSBLAS_IMPL_CUBLAS_SAFE_CALL(cublasGetPointerMode(singleton.handle, &pointer_mode)); \
KOKKOSBLAS_IMPL_CUBLAS_SAFE_CALL(cublasSetPointerMode(singleton.handle, CUBLAS_POINTER_MODE_DEVICE)); \
cublasZdrot(singleton.handle, X.extent_int(0), reinterpret_cast<cuDoubleComplex*>(X.data()), 1, \
reinterpret_cast<cuDoubleComplex*>(Y.data()), 1, c.data(), \
reinterpret_cast<cuDoubleComplex*>(s.data())); \
cublasZrot(singleton.handle, X.extent_int(0), reinterpret_cast<cuDoubleComplex*>(X.data()), 1, \
reinterpret_cast<cuDoubleComplex*>(Y.data()), 1, c.data(), \
reinterpret_cast<cuDoubleComplex*>(s.data())); \
KOKKOSBLAS_IMPL_CUBLAS_SAFE_CALL(cublasSetPointerMode(singleton.handle, pointer_mode)); \
Kokkos::Profiling::popRegion(); \
} \
Expand Down Expand Up @@ -295,8 +295,8 @@ namespace Impl {
cublasPointerMode_t pointer_mode; \
KOKKOSBLAS_IMPL_CUBLAS_SAFE_CALL(cublasGetPointerMode(singleton.handle, &pointer_mode)); \
KOKKOSBLAS_IMPL_CUBLAS_SAFE_CALL(cublasSetPointerMode(singleton.handle, CUBLAS_POINTER_MODE_DEVICE)); \
cublasCsrot(singleton.handle, X.extent_int(0), reinterpret_cast<cuComplex*>(X.data()), 1, \
reinterpret_cast<cuComplex*>(Y.data()), 1, c.data(), reinterpret_cast<cuComplex*>(s.data())); \
cublasCrot(singleton.handle, X.extent_int(0), reinterpret_cast<cuComplex*>(X.data()), 1, \
reinterpret_cast<cuComplex*>(Y.data()), 1, c.data(), reinterpret_cast<cuComplex*>(s.data())); \
KOKKOSBLAS_IMPL_CUBLAS_SAFE_CALL(cublasSetPointerMode(singleton.handle, pointer_mode)); \
Kokkos::Profiling::popRegion(); \
} \
Expand Down

0 comments on commit f321baf

Please sign in to comment.