Skip to content

Commit

Permalink
Kokkos 4.2.00 minimum: Removing old code branch ahead of 4.3.00
Browse files Browse the repository at this point in the history
This removes support for Kokkos versions older than 4.2.00 which
we won't support once 4.3.00 is released. This removes a lot of
code that use the macro for printing on device. It also removes
the definition of Kokkos::Half_t from Kokkos Kernels since it is
now supported directly in Kokkos Core.
  • Loading branch information
lucbv committed Mar 13, 2024
1 parent 8f2945d commit 5023972
Show file tree
Hide file tree
Showing 24 changed files with 0 additions and 2,187 deletions.
42 changes: 0 additions & 42 deletions batched/dense/impl/KokkosBatched_Axpy_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,31 +199,17 @@ KOKKOS_INLINE_FUNCTION int SerialAxpy::invoke(const alphaViewType& alpha,

// Check compatibility of dimensions at run time.
if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) {
#if KOKKOS_VERSION < 40199
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
"KokkosBatched::axpy: Dimensions of X and Y do not match: X: %d x %d, "
"Y: %d x %d\n",
(int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1));
#else
Kokkos::printf(
"KokkosBatched::axpy: Dimensions of X and Y do not match: X: %d x %d, "
"Y: %d x %d\n",
(int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1));
#endif
return 1;
}
if (X.extent(0) != alpha.extent(0)) {
#if KOKKOS_VERSION < 40199
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
"KokkosBatched::axpy: First dimension of X and alpha do not match: X: "
"%d x %d, alpha: %d\n",
(int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0));
#else
Kokkos::printf(
"KokkosBatched::axpy: First dimension of X and alpha do not match: X: "
"%d x %d, alpha: %d\n",
(int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0));
#endif
return 1;
}
#endif
Expand Down Expand Up @@ -263,31 +249,17 @@ KOKKOS_INLINE_FUNCTION int TeamAxpy<MemberType>::invoke(

// Check compatibility of dimensions at run time.
if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) {
#if KOKKOS_VERSION < 40199
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
"KokkosBatched::axpy: Dimensions of X and Y do not match: X: %d x %d, "
"Y: %d x %d\n",
(int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1));
#else
Kokkos::printf(
"KokkosBatched::axpy: Dimensions of X and Y do not match: X: %d x %d, "
"Y: %d x %d\n",
(int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1));
#endif
return 1;
}
if (X.extent(0) != alpha.extent(0)) {
#if KOKKOS_VERSION < 40199
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
"KokkosBatched::axpy: First dimension of X and alpha do not match: X: "
"%d x %d, alpha: %d\n",
(int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0));
#else
Kokkos::printf(
"KokkosBatched::axpy: First dimension of X and alpha do not match: X: "
"%d x %d, alpha: %d\n",
(int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0));
#endif
return 1;
}
#endif
Expand Down Expand Up @@ -332,31 +304,17 @@ KOKKOS_INLINE_FUNCTION int TeamVectorAxpy<MemberType>::invoke(

// Check compatibility of dimensions at run time.
if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) {
#if KOKKOS_VERSION < 40199
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
"KokkosBatched::axpy: Dimensions of X and Y do not match: X: %d x %d, "
"Y: %d x %d\n",
(int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1));
#else
Kokkos::printf(
"KokkosBatched::axpy: Dimensions of X and Y do not match: X: %d x %d, "
"Y: %d x %d\n",
(int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1));
#endif
return 1;
}
if (X.extent(0) != alpha.extent(0)) {
#if KOKKOS_VERSION < 40199
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
"KokkosBatched::axpy: First dimension of X and alpha do not match: X: "
"%d x %d, alpha: %d\n",
(int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0));
#else
Kokkos::printf(
"KokkosBatched::axpy: First dimension of X and alpha do not match: X: "
"%d x %d, alpha: %d\n",
(int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0));
#endif
return 1;
}
#endif
Expand Down
50 changes: 0 additions & 50 deletions batched/dense/impl/KokkosBatched_Copy_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,10 @@ KOKKOS_INLINE_FUNCTION int SerialCopy<Trans::NoTranspose, 2>::invoke(

// Check compatibility of dimensions at run time.
if (A.extent(0) != B.extent(0) || A.extent(1) != B.extent(1)) {
#if KOKKOS_VERSION < 40199
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
"KokkosBatched::copy: Dimensions of A and B do not match: A: %d x %d, "
"B: %d x %d\n",
(int)A.extent(0), (int)A.extent(1), (int)B.extent(0), (int)B.extent(1));
#else
Kokkos::printf(
"KokkosBatched::copy: Dimensions of A and B do not match: A: %d x %d, "
"B: %d x %d\n",
(int)A.extent(0), (int)A.extent(1), (int)B.extent(0), (int)B.extent(1));
#endif
return 1;
}
#endif
Expand All @@ -94,17 +87,10 @@ KOKKOS_INLINE_FUNCTION int SerialCopy<Trans::Transpose, 2>::invoke(

// Check compatibility of dimensions at run time.
if (A.extent(0) != B.extent(0) || A.extent(1) != B.extent(1)) {
#if KOKKOS_VERSION < 40199
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
"KokkosBatched::copy: Dimensions of A and B do not match: A: %d x %d, "
"B: %d x %d\n",
(int)A.extent(0), (int)A.extent(1), (int)B.extent(0), (int)B.extent(1));
#else
Kokkos::printf(
"KokkosBatched::copy: Dimensions of A and B do not match: A: %d x %d, "
"B: %d x %d\n",
(int)A.extent(0), (int)A.extent(1), (int)B.extent(0), (int)B.extent(1));
#endif
return 1;
}
#endif
Expand Down Expand Up @@ -157,21 +143,12 @@ struct TeamCopy<MemberType, Trans::NoTranspose, 2> {

// Check compatibility of dimensions at run time.
if (A.extent(0) != B.extent(0) || A.extent(1) != B.extent(1)) {
#if KOKKOS_VERSION < 40199
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
"KokkosBatched::copy: Dimensions of A and B do not match: A: %d x "
"%d, "
"B: %d x %d\n",
(int)A.extent(0), (int)A.extent(1), (int)B.extent(0),
(int)B.extent(1));
#else
Kokkos::printf(
"KokkosBatched::copy: Dimensions of A and B do not match: A: %d x "
"%d, "
"B: %d x %d\n",
(int)A.extent(0), (int)A.extent(1), (int)B.extent(0),
(int)B.extent(1));
#endif
return 1;
}
#endif
Expand Down Expand Up @@ -204,21 +181,12 @@ struct TeamCopy<MemberType, Trans::Transpose, 2> {

// Check compatibility of dimensions at run time.
if (A.extent(0) != B.extent(0) || A.extent(1) != B.extent(1)) {
#if KOKKOS_VERSION < 40199
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
"KokkosBatched::copy: Dimensions of A and B do not match: A: %d x "
"%d, "
"B: %d x %d\n",
(int)A.extent(0), (int)A.extent(1), (int)B.extent(0),
(int)B.extent(1));
#else
Kokkos::printf(
"KokkosBatched::copy: Dimensions of A and B do not match: A: %d x "
"%d, "
"B: %d x %d\n",
(int)A.extent(0), (int)A.extent(1), (int)B.extent(0),
(int)B.extent(1));
#endif
return 1;
}
#endif
Expand Down Expand Up @@ -277,21 +245,12 @@ struct TeamVectorCopy<MemberType, Trans::NoTranspose, 2> {

// Check compatibility of dimensions at run time.
if (A.extent(0) != B.extent(0) || A.extent(1) != B.extent(1)) {
#if KOKKOS_VERSION < 40199
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
"KokkosBatched::copy: Dimensions of A and B do not match: A: %d x "
"%d, "
"B: %d x %d\n",
(int)A.extent(0), (int)A.extent(1), (int)B.extent(0),
(int)B.extent(1));
#else
Kokkos::printf(
"KokkosBatched::copy: Dimensions of A and B do not match: A: %d x "
"%d, "
"B: %d x %d\n",
(int)A.extent(0), (int)A.extent(1), (int)B.extent(0),
(int)B.extent(1));
#endif
return 1;
}
#endif
Expand Down Expand Up @@ -324,21 +283,12 @@ struct TeamVectorCopy<MemberType, Trans::Transpose, 2> {

// Check compatibility of dimensions at run time.
if (A.extent(0) != B.extent(0) || A.extent(1) != B.extent(1)) {
#if KOKKOS_VERSION < 40199
KOKKOS_IMPL_DO_NOT_USE_PRINTF(
"KokkosBatched::copy: Dimensions of A and B do not match: A: %d x "
"%d, "
"B: %d x %d\n",
(int)A.extent(0), (int)A.extent(1), (int)B.extent(0),
(int)B.extent(1));
#else
Kokkos::printf(
"KokkosBatched::copy: Dimensions of A and B do not match: A: %d x "
"%d, "
"B: %d x %d\n",
(int)A.extent(0), (int)A.extent(1), (int)B.extent(0),
(int)B.extent(1));
#endif
return 1;
}
#endif
Expand Down
Loading

0 comments on commit 5023972

Please sign in to comment.