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

Rotg fixes for issue #1577 #1578

Merged
merged 2 commits into from
Oct 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions blas/tpls/KokkosBlas1_rotg_tpl_spec_avail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ KOKKOSBLAS1_ROTG_TPL_SPEC_AVAIL_CUBLAS(double, Kokkos::LayoutRight,
Kokkos::Cuda, Kokkos::CudaSpace)
KOKKOSBLAS1_ROTG_TPL_SPEC_AVAIL_CUBLAS(float, Kokkos::LayoutLeft, Kokkos::Cuda,
Kokkos::CudaSpace)
KOKKOSBLAS1_ROTG_TPL_SPEC_AVAIL_CUBLAS(float, Kokkos::LayoutLeft, Kokkos::Cuda,
KOKKOSBLAS1_ROTG_TPL_SPEC_AVAIL_CUBLAS(float, Kokkos::LayoutRight, Kokkos::Cuda,
Kokkos::CudaSpace)
KOKKOSBLAS1_ROTG_TPL_SPEC_AVAIL_CUBLAS(Kokkos::complex<double>,
Kokkos::LayoutLeft, Kokkos::Cuda,
Expand All @@ -160,7 +160,7 @@ KOKKOSBLAS1_ROTG_TPL_SPEC_AVAIL_CUBLAS(double, Kokkos::LayoutRight,
Kokkos::Cuda, Kokkos::CudaUVMSpace)
KOKKOSBLAS1_ROTG_TPL_SPEC_AVAIL_CUBLAS(float, Kokkos::LayoutLeft, Kokkos::Cuda,
Kokkos::CudaUVMSpace)
KOKKOSBLAS1_ROTG_TPL_SPEC_AVAIL_CUBLAS(float, Kokkos::LayoutLeft, Kokkos::Cuda,
KOKKOSBLAS1_ROTG_TPL_SPEC_AVAIL_CUBLAS(float, Kokkos::LayoutRight, Kokkos::Cuda,
Kokkos::CudaUVMSpace)
KOKKOSBLAS1_ROTG_TPL_SPEC_AVAIL_CUBLAS(Kokkos::complex<double>,
Kokkos::LayoutLeft, Kokkos::Cuda,
Expand Down
72 changes: 36 additions & 36 deletions blas/tpls/KokkosBlas1_rotg_tpl_spec_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,44 +318,44 @@ namespace Impl {
} \
};

#define KOKKOSBLAS1_ZROTG_TPL_SPEC_DECL_CUBLAS(LAYOUT, EXECSPACE, MEMSPACE, \
ETI_SPEC_AVAIL) \
template <class MEMSPACE> \
struct Rotg< \
EXECSPACE, \
Kokkos::View<Kokkos::complex<double>, LAYOUT, \
Kokkos::Device<EXECSPACE, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<double, LAYOUT, Kokkos::Device<EXECSPACE, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
true, ETI_SPEC_AVAIL> { \
using SViewTypeKokkos::View<Kokkos::complex<double>, LAYOUT, \
Kokkos::Device<EXECSPACE, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using MViewType = \
Kokkos::View<double, LAYOUT, Kokkos::Device<EXECSPACE, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
static void rotg(EXECSPACE const& space, SViewType const& a, \
SViewType const& b, MViewType const& c, \
SViewType const& s) { \
Kokkos::Profiling::pushRegion( \
"KokkosBlas::nrm1[TPL_CUBLAS,complex<double>]"); \
rotg_print_specialization<Kokkos::complex<double>, EXECSPACE>(); \
KokkosBlas::Impl::CudaBlasSingleton& singleton = \
KokkosBlas::Impl::CudaBlasSingleton::singleton(); \
KOKKOS_CUBLAS_SAFE_CALL_IMPL( \
cublasSetStream(singleton.handle, space.cuda_stream())); \
cublasZrotg(singleton.handle, \
reinterpret_cast<cuDoubleComplex*>(a.data()), \
reinterpret_cast<cuDoubleComplex*>(b.data()), c.data(), \
reinterpret_cast<cuDoubleComplex*>(s.data())); \
Kokkos::Profiling::popRegion(); \
} \
#define KOKKOSBLAS1_ZROTG_TPL_SPEC_DECL_CUBLAS(LAYOUT, EXECSPACE, MEMSPACE, \
ETI_SPEC_AVAIL) \
template <> \
struct Rotg< \
EXECSPACE, \
Kokkos::View<Kokkos::complex<double>, LAYOUT, \
Kokkos::Device<EXECSPACE, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<double, LAYOUT, Kokkos::Device<EXECSPACE, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
true, ETI_SPEC_AVAIL> { \
using SViewType = Kokkos::View<Kokkos::complex<double>, LAYOUT, \
Kokkos::Device<EXECSPACE, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using MViewType = \
Kokkos::View<double, LAYOUT, Kokkos::Device<EXECSPACE, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
static void rotg(EXECSPACE const& space, SViewType const& a, \
SViewType const& b, MViewType const& c, \
SViewType const& s) { \
Kokkos::Profiling::pushRegion( \
"KokkosBlas::nrm1[TPL_CUBLAS,complex<double>]"); \
rotg_print_specialization<Kokkos::complex<double>, EXECSPACE>(); \
KokkosBlas::Impl::CudaBlasSingleton& singleton = \
KokkosBlas::Impl::CudaBlasSingleton::singleton(); \
KOKKOS_CUBLAS_SAFE_CALL_IMPL( \
cublasSetStream(singleton.handle, space.cuda_stream())); \
cublasZrotg(singleton.handle, \
reinterpret_cast<cuDoubleComplex*>(a.data()), \
reinterpret_cast<cuDoubleComplex*>(b.data()), c.data(), \
reinterpret_cast<cuDoubleComplex*>(s.data())); \
Kokkos::Profiling::popRegion(); \
} \
};

#define KOKKOSBLAS1_CROTG_TPL_SPEC_DECL_CUBLAS(LAYOUT, EXECSPACE, MEMSPACE, \
ETI_SPEC_AVAIL) \
template <class MEMSPACE> \
template <> \
struct Rotg<EXECSPACE, \
Kokkos::View<Kokkos::complex<float>, LAYOUT, \
Kokkos::Device<EXECSPACE, MEMSPACE>, \
Expand Down Expand Up @@ -529,7 +529,7 @@ namespace Impl {

#define KOKKOSBLAS1_ZROTG_TPL_SPEC_DECL_ROCBLAS(LAYOUT, EXECSPACE, MEMSPACE, \
ETI_SPEC_AVAIL) \
template <class MEMSPACE> \
template <> \
struct Rotg< \
EXECSPACE, \
Kokkos::View<Kokkos::complex<double>, LAYOUT, \
Expand Down Expand Up @@ -565,7 +565,7 @@ namespace Impl {

#define KOKKOSBLAS1_CROTG_TPL_SPEC_DECL_ROCBLAS(LAYOUT, EXECSPACE, MEMSPACE, \
ETI_SPEC_AVAIL) \
template <class MEMSPACE> \
template <> \
struct Rotg<EXECSPACE, \
Kokkos::View<Kokkos::complex<float>, LAYOUT, \
Kokkos::Device<EXECSPACE, MEMSPACE>, \
Expand Down