Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correcting BLAS test failures with cuda when ETI_ONLY = OFF (issue #2061) #2077

Merged
merged 14 commits into from
Dec 18, 2023
18 changes: 8 additions & 10 deletions blas/tpls/KokkosBlas2_ger_tpl_spec_decl_blas.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ namespace Impl {
Kokkos::MemoryTraits<Kokkos::Unmanaged>> \
AViewType; \
\
static void ger(const EXEC_SPACE& /* space */ \
, \
const char trans[], \
static void ger(const EXEC_SPACE& space, const char trans[], \
typename AViewType::const_value_type& alpha, \
const XViewType& X, const YViewType& Y, \
const AViewType& A) { \
Expand Down Expand Up @@ -183,8 +181,9 @@ namespace Impl {
reinterpret_cast<const std::complex<double>*>(X.data()), one, \
reinterpret_cast<std::complex<double>*>(A.data()), LDA); \
} else { \
throw std::runtime_error( \
"Error: blasZgerc() requires LayoutLeft views."); \
/* blasgerc() + ~A_ll => call kokkos-kernels' implementation */ \
GER<EXEC_SPACE, XViewType, YViewType, AViewType, false, \
ETI_SPEC_AVAIL>::ger(space, trans, alpha, X, Y, A); \
} \
} \
Kokkos::Profiling::popRegion(); \
Expand Down Expand Up @@ -218,9 +217,7 @@ namespace Impl {
Kokkos::MemoryTraits<Kokkos::Unmanaged>> \
AViewType; \
\
static void ger(const EXEC_SPACE& /* space */ \
, \
const char trans[], \
static void ger(const EXEC_SPACE& space, const char trans[], \
typename AViewType::const_value_type& alpha, \
const XViewType& X, const YViewType& Y, \
const AViewType& A) { \
Expand Down Expand Up @@ -252,8 +249,9 @@ namespace Impl {
reinterpret_cast<const std::complex<float>*>(X.data()), one, \
reinterpret_cast<std::complex<float>*>(A.data()), LDA); \
} else { \
throw std::runtime_error( \
"Error: blasCgerc() requires LayoutLeft views."); \
/* blasgerc() + ~A_ll => call kokkos-kernels' implementation */ \
GER<EXEC_SPACE, XViewType, YViewType, AViewType, false, \
ETI_SPEC_AVAIL>::ger(space, trans, alpha, X, Y, A); \
} \
} \
Kokkos::Profiling::popRegion(); \
Expand Down
10 changes: 6 additions & 4 deletions blas/tpls/KokkosBlas2_ger_tpl_spec_decl_cublas.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,9 @@ namespace Impl {
reinterpret_cast<const cuDoubleComplex*>(X.data()), one, \
reinterpret_cast<cuDoubleComplex*>(A.data()), LDA)); \
} else { \
throw std::runtime_error( \
"Error: cublasZgerc() requires LayoutLeft views."); \
/* cublasZgerc() + ~A_ll => call kokkos-kernels' implementation */ \
GER<EXEC_SPACE, XViewType, YViewType, AViewType, false, \
ETI_SPEC_AVAIL>::ger(space, trans, alpha, X, Y, A); \
} \
} \
KOKKOS_CUBLAS_SAFE_CALL_IMPL(cublasSetStream(s.handle, NULL)); \
Expand Down Expand Up @@ -266,8 +267,9 @@ namespace Impl {
reinterpret_cast<const cuComplex*>(X.data()), one, \
reinterpret_cast<cuComplex*>(A.data()), LDA)); \
} else { \
throw std::runtime_error( \
"Error: cublasCgerc() requires LayoutLeft views."); \
/* cublasCgerc() + ~A_ll => call kokkos-kernels' implementation */ \
GER<EXEC_SPACE, XViewType, YViewType, AViewType, false, \
ETI_SPEC_AVAIL>::ger(space, trans, alpha, X, Y, A); \
} \
} \
KOKKOS_CUBLAS_SAFE_CALL_IMPL(cublasSetStream(s.handle, NULL)); \
Expand Down
10 changes: 6 additions & 4 deletions blas/tpls/KokkosBlas2_ger_tpl_spec_decl_rocblas.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,9 @@ namespace Impl {
reinterpret_cast<const rocblas_double_complex*>(X.data()), one, \
reinterpret_cast<rocblas_double_complex*>(A.data()), LDA)); \
} else { \
throw std::runtime_error( \
"Error: rocblasZgerc() requires LayoutLeft views."); \
/* rocblas_zgerc() + ~A_ll => call k-kernels' implementation */ \
GER<EXEC_SPACE, XViewType, YViewType, AViewType, false, \
ETI_SPEC_AVAIL>::ger(space, trans, alpha, X, Y, A); \
} \
} \
KOKKOS_ROCBLAS_SAFE_CALL_IMPL(rocblas_set_stream(s.handle, NULL)); \
Expand Down Expand Up @@ -273,8 +274,9 @@ namespace Impl {
reinterpret_cast<const rocblas_float_complex*>(X.data()), one, \
reinterpret_cast<rocblas_float_complex*>(A.data()), LDA)); \
} else { \
throw std::runtime_error( \
"Error: rocblasCgec() requires LayoutLeft views."); \
/* rocblas_cgerc() + ~A_ll => call k-kernels' implementation */ \
GER<EXEC_SPACE, XViewType, YViewType, AViewType, false, \
ETI_SPEC_AVAIL>::ger(space, trans, alpha, X, Y, A); \
} \
} \
KOKKOS_ROCBLAS_SAFE_CALL_IMPL(rocblas_set_stream(s.handle, NULL)); \
Expand Down
Loading