Skip to content

Commit

Permalink
Kokkos Kernels: removing old code branches ahead of 4.3.00 release
Browse files Browse the repository at this point in the history
Some old code branches kept for compatibility with Kokkos Core
versions less than 4.2.00 are dropped after release 4.3.00.
The largest changes are the removal of support the Kokkos print
macro in favor of Kokkos::printf() and the removal of half support
from Kokkos Kernels since it is now in Kokkos Core.
  • Loading branch information
lucbv committed Mar 13, 2024
1 parent 8f2945d commit 6e9543c
Show file tree
Hide file tree
Showing 24 changed files with 0 additions and 1,585 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 6e9543c

Please sign in to comment.