Skip to content

Commit

Permalink
HIP: since Kokkos has moved it out of experimental we should clean up
Browse files Browse the repository at this point in the history
Just reflecting the move of HIP and HIPSpace out of experimental
so that we do not get deprecation warning and even failures down
the road. This was really done in Kokkos Core 4.0.0 so it is time
to catch up...
  • Loading branch information
lucbv committed Oct 17, 2023
1 parent c9093bb commit ef296cc
Show file tree
Hide file tree
Showing 30 changed files with 112 additions and 112 deletions.
2 changes: 1 addition & 1 deletion batched/dense/impl/KokkosBatched_HostLevel_Gemm_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ constexpr KOKKOS_INLINE_FUNCTION int kk_gemm_dbl_buf_tile_k() {
#if defined(KOKKOS_ENABLE_HIP) && defined(KOKKOS_ARCH_VEGA908)
template <>
constexpr KOKKOS_INLINE_FUNCTION int
kk_gemm_dbl_buf_tile_k<Kokkos::Experimental::HIP>() {
kk_gemm_dbl_buf_tile_k<Kokkos::HIP>() {
return 16;
}
#endif
Expand Down
16 changes: 8 additions & 8 deletions batched/dense/src/KokkosBatched_Vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,21 +120,21 @@ struct DefaultVectorLength<Kokkos::complex<double>, Kokkos::CudaUVMSpace> {

#if defined(KOKKOS_ENABLE_HIP)
template <>
struct DefaultVectorLength<float, Kokkos::Experimental::HIPSpace> {
struct DefaultVectorLength<float, Kokkos::HIPSpace> {
enum : int { value = 16 };
};
template <>
struct DefaultVectorLength<double, Kokkos::Experimental::HIPSpace> {
struct DefaultVectorLength<double, Kokkos::HIPSpace> {
enum : int { value = 16 };
};
template <>
struct DefaultVectorLength<Kokkos::complex<float>,
Kokkos::Experimental::HIPSpace> {
Kokkos::HIPSpace> {
enum : int { value = 16 };
};
template <>
struct DefaultVectorLength<Kokkos::complex<double>,
Kokkos::Experimental::HIPSpace> {
Kokkos::HIPSpace> {
enum : int { value = 16 };
};
#endif
Expand Down Expand Up @@ -189,21 +189,21 @@ struct DefaultInternalVectorLength<Kokkos::complex<double>,

#if defined(KOKKOS_ENABLE_HIP)
template <>
struct DefaultInternalVectorLength<float, Kokkos::Experimental::HIPSpace> {
struct DefaultInternalVectorLength<float, Kokkos::HIPSpace> {
enum : int { value = 8 };
};
template <>
struct DefaultInternalVectorLength<double, Kokkos::Experimental::HIPSpace> {
struct DefaultInternalVectorLength<double, Kokkos::HIPSpace> {
enum : int { value = 4 };
};
template <>
struct DefaultInternalVectorLength<Kokkos::complex<float>,
Kokkos::Experimental::HIPSpace> {
Kokkos::HIPSpace> {
enum : int { value = 4 };
};
template <>
struct DefaultInternalVectorLength<Kokkos::complex<double>,
Kokkos::Experimental::HIPSpace> {
Kokkos::HIPSpace> {
enum : int { value = 2 };
};
#endif
Expand Down
2 changes: 1 addition & 1 deletion blas/impl/KokkosBlas3_gemm_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct impl_gemm_choose_copy_layout<Kokkos::Cuda, LayoutA, LayoutAScratch> {

#ifdef KOKKOS_ENABLE_HIP
template <class LayoutA, class LayoutAScratch>
struct impl_gemm_choose_copy_layout<Kokkos::Experimental::HIP, LayoutA,
struct impl_gemm_choose_copy_layout<Kokkos::HIP, LayoutA,
LayoutAScratch> {
using type = LayoutA;
};
Expand Down
2 changes: 1 addition & 1 deletion blas/impl/KokkosBlas3_gemm_spec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ struct GEMM {
team_size = blockA0;
#endif
#if defined(KOKKOS_ENABLE_HIP)
if (std::is_same<execution_space, Kokkos::Experimental::HIP>::value)
if (std::is_same<execution_space, Kokkos::HIP>::value)
team_size = blockA0;
#endif
#if defined(KOKKOS_ENABLE_ROCM)
Expand Down
2 changes: 1 addition & 1 deletion blas/src/KokkosBlas2_gemv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void gemv(const ExecutionSpace& space, const char trans[],
std::is_same<typename AViewType::array_layout,
Kokkos::LayoutRight>::value &&
std::is_same<typename AViewType::memory_space,
Kokkos::Experimental::HIPSpace>::value);
Kokkos::HIPSpace>::value);
#endif
#ifdef KOKKOSKERNELS_ENABLE_TPL_BLAS
useFallback = useFallback || (tolower(*trans) == 'c' &&
Expand Down
12 changes: 6 additions & 6 deletions blas/tpls/KokkosBlas2_gemv_tpl_spec_avail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,16 @@ KOKKOSBLAS2_GEMV_TPL_SPEC_AVAIL_CUBLAS(Kokkos::complex<float>,
struct gemv_tpl_spec_avail< \
ExecSpace, \
Kokkos::View<const SCALAR**, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, \
Kokkos::Experimental::HIPSpace>, \
Kokkos::Device<Kokkos::HIP, \
Kokkos::HIPSpace>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<const SCALAR*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, \
Kokkos::Experimental::HIPSpace>, \
Kokkos::Device<Kokkos::HIP, \
Kokkos::HIPSpace>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<SCALAR*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, \
Kokkos::Experimental::HIPSpace>, \
Kokkos::Device<Kokkos::HIP, \
Kokkos::HIPSpace>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > > { \
enum : bool { value = true }; \
};
Expand Down
80 changes: 40 additions & 40 deletions blas/tpls/KokkosBlas2_gemv_tpl_spec_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,26 +553,26 @@ namespace Impl {
struct GEMV< \
ExecSpace, \
Kokkos::View<const double**, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<const double*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<double*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
true, ETI_SPEC_AVAIL> { \
typedef double SCALAR; \
typedef Kokkos::View<const SCALAR**, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > \
AViewType; \
typedef Kokkos::View<const SCALAR*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > \
XViewType; \
typedef Kokkos::View<SCALAR*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > \
YViewType; \
\
Expand Down Expand Up @@ -600,26 +600,26 @@ namespace Impl {
struct GEMV< \
ExecSpace, \
Kokkos::View<const float**, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<const float*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<float*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
true, ETI_SPEC_AVAIL> { \
typedef float SCALAR; \
typedef Kokkos::View<const SCALAR**, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > \
AViewType; \
typedef Kokkos::View<const SCALAR*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > \
XViewType; \
typedef Kokkos::View<SCALAR*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > \
YViewType; \
\
Expand Down Expand Up @@ -647,26 +647,26 @@ namespace Impl {
struct GEMV< \
ExecSpace, \
Kokkos::View<const Kokkos::complex<double>**, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<const Kokkos::complex<double>*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<Kokkos::complex<double>*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
true, ETI_SPEC_AVAIL> { \
typedef Kokkos::complex<double> SCALAR; \
typedef Kokkos::View<const SCALAR**, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > \
AViewType; \
typedef Kokkos::View<const SCALAR*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > \
XViewType; \
typedef Kokkos::View<SCALAR*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > \
YViewType; \
\
Expand Down Expand Up @@ -699,26 +699,26 @@ namespace Impl {
struct GEMV< \
ExecSpace, \
Kokkos::View<const Kokkos::complex<float>**, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<const Kokkos::complex<float>*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<Kokkos::complex<float>*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
true, ETI_SPEC_AVAIL> { \
typedef Kokkos::complex<float> SCALAR; \
typedef Kokkos::View<const SCALAR**, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > \
AViewType; \
typedef Kokkos::View<const SCALAR*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > \
XViewType; \
typedef Kokkos::View<SCALAR*, LAYOUT, \
Kokkos::Device<Kokkos::Experimental::HIP, MEM_SPACE>, \
Kokkos::Device<Kokkos::HIP, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > \
YViewType; \
\
Expand Down Expand Up @@ -746,40 +746,40 @@ namespace Impl {
} \
};

KOKKOSBLAS2_DGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_DGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::HIPSpace,
true)
KOKKOSBLAS2_DGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_DGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::HIPSpace,
false)
KOKKOSBLAS2_DGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_DGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::HIPSpace,
true)
KOKKOSBLAS2_DGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_DGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::HIPSpace,
false)

KOKKOSBLAS2_SGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_SGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::HIPSpace,
true)
KOKKOSBLAS2_SGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_SGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::HIPSpace,
false)
KOKKOSBLAS2_SGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_SGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::HIPSpace,
true)
KOKKOSBLAS2_SGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_SGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::HIPSpace,
false)

KOKKOSBLAS2_ZGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_ZGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::HIPSpace,
true)
KOKKOSBLAS2_ZGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_ZGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::HIPSpace,
false)
KOKKOSBLAS2_ZGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_ZGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::HIPSpace,
true)
KOKKOSBLAS2_ZGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_ZGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::HIPSpace,
false)

KOKKOSBLAS2_CGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_CGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::HIPSpace,
true)
KOKKOSBLAS2_CGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_CGEMV_ROCBLAS(Kokkos::LayoutLeft, Kokkos::HIPSpace,
false)
KOKKOSBLAS2_CGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_CGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::HIPSpace,
true)
KOKKOSBLAS2_CGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::Experimental::HIPSpace,
KOKKOSBLAS2_CGEMV_ROCBLAS(Kokkos::LayoutRight, Kokkos::HIPSpace,
false)

} // namespace Impl
Expand Down
16 changes: 8 additions & 8 deletions blas/tpls/KokkosBlas3_gemm_tpl_spec_avail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,26 +164,26 @@ KOKKOSBLAS3_GEMM_TPL_SPEC_AVAIL_CUBLAS(Kokkos::complex<float>,
};

KOKKOSBLAS3_GEMM_TPL_SPEC_AVAIL_ROCBLAS(double, Kokkos::LayoutLeft,
Kokkos::Experimental::HIPSpace)
Kokkos::HIPSpace)
KOKKOSBLAS3_GEMM_TPL_SPEC_AVAIL_ROCBLAS(float, Kokkos::LayoutLeft,
Kokkos::Experimental::HIPSpace)
Kokkos::HIPSpace)
KOKKOSBLAS3_GEMM_TPL_SPEC_AVAIL_ROCBLAS(Kokkos::complex<double>,
Kokkos::LayoutLeft,
Kokkos::Experimental::HIPSpace)
Kokkos::HIPSpace)
KOKKOSBLAS3_GEMM_TPL_SPEC_AVAIL_ROCBLAS(Kokkos::complex<float>,
Kokkos::LayoutLeft,
Kokkos::Experimental::HIPSpace)
Kokkos::HIPSpace)

KOKKOSBLAS3_GEMM_TPL_SPEC_AVAIL_ROCBLAS(double, Kokkos::LayoutRight,
Kokkos::Experimental::HIPSpace)
Kokkos::HIPSpace)
KOKKOSBLAS3_GEMM_TPL_SPEC_AVAIL_ROCBLAS(float, Kokkos::LayoutRight,
Kokkos::Experimental::HIPSpace)
Kokkos::HIPSpace)
KOKKOSBLAS3_GEMM_TPL_SPEC_AVAIL_ROCBLAS(Kokkos::complex<double>,
Kokkos::LayoutRight,
Kokkos::Experimental::HIPSpace)
Kokkos::HIPSpace)
KOKKOSBLAS3_GEMM_TPL_SPEC_AVAIL_ROCBLAS(Kokkos::complex<float>,
Kokkos::LayoutRight,
Kokkos::Experimental::HIPSpace)
Kokkos::HIPSpace)

#endif
} // namespace Impl
Expand Down
Loading

0 comments on commit ef296cc

Please sign in to comment.