From ecf522b627ee6ded79f003df842785ed9b8d0c0a Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Tue, 29 Oct 2024 08:46:29 -0600 Subject: [PATCH] Deprecate __KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__ In favor of KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED Signed-off-by: Carl Pearson --- batched/KokkosBatched_Util.hpp | 18 +++++++++++++++++- .../impl/KokkosBatched_Gemm_Serial_Impl.hpp | 8 ++++---- .../KokkosBatched_InverseLU_Serial_Impl.hpp | 2 +- .../impl/KokkosBatched_LU_Serial_Impl.hpp | 2 +- .../impl/KokkosBatched_Trsm_Serial_Impl.hpp | 10 +++++----- .../impl/KokkosBatched_Trsv_Serial_Impl.hpp | 8 ++++---- .../blas/blas3/KokkosBlas3_gemm_perf_test.hpp | 6 +++--- 7 files changed, 35 insertions(+), 19 deletions(-) diff --git a/batched/KokkosBatched_Util.hpp b/batched/KokkosBatched_Util.hpp index 76c2594329..520427e8c6 100644 --- a/batched/KokkosBatched_Util.hpp +++ b/batched/KokkosBatched_Util.hpp @@ -74,7 +74,23 @@ #include "mkl_version.h" #if __INTEL_MKL__ >= 2018 -#define __KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__ 1 + +#if defined(KOKKOS_COMPILER_MSVC) +#define KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED \ + (__pragma(message( \ + "warning: __KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__ is deprecated and will be removed in a future version")) 1) +#elif defined(KOKKOS_COMPILER_GNU) || defined(KOKKOS_COMPILER_CLANG) +#define KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED \ + (__extension__({ \ + _Pragma( \ + "warning: __KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__ is deprecated and will be removed in a future version"); \ + 1; \ + })) +#else +#define KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED 1 // no good way to deprecate? +#endif +#define __KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__ KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED + #define __KOKKOSBATCHED_ENABLE_INTEL_MKL_COMPACT_BATCHED__ 1 #include "mkl.h" // #include "mkl_types.h" diff --git a/batched/dense/impl/KokkosBatched_Gemm_Serial_Impl.hpp b/batched/dense/impl/KokkosBatched_Gemm_Serial_Impl.hpp index cd644d56a0..fae44c8f83 100644 --- a/batched/dense/impl/KokkosBatched_Gemm_Serial_Impl.hpp +++ b/batched/dense/impl/KokkosBatched_Gemm_Serial_Impl.hpp @@ -36,7 +36,7 @@ namespace KokkosBatched { /// NT/NT /// -#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__) && \ +#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED) && \ defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_COMPACT_BATCHED__) template <> template @@ -95,7 +95,7 @@ KOKKOS_INLINE_FUNCTION int SerialGemm template @@ -154,7 +154,7 @@ KOKKOS_INLINE_FUNCTION int SerialGemm template @@ -213,7 +213,7 @@ KOKKOS_INLINE_FUNCTION int SerialGemm template diff --git a/batched/dense/impl/KokkosBatched_InverseLU_Serial_Impl.hpp b/batched/dense/impl/KokkosBatched_InverseLU_Serial_Impl.hpp index 1041f78822..216b5f9652 100644 --- a/batched/dense/impl/KokkosBatched_InverseLU_Serial_Impl.hpp +++ b/batched/dense/impl/KokkosBatched_InverseLU_Serial_Impl.hpp @@ -32,7 +32,7 @@ namespace KokkosBatched { /// InverseLU no piv /// -#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__) && \ +#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED) && \ defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_COMPACT_BATCHED__) template <> template diff --git a/batched/dense/impl/KokkosBatched_LU_Serial_Impl.hpp b/batched/dense/impl/KokkosBatched_LU_Serial_Impl.hpp index 2f393dd3d0..b25b9bbc2e 100644 --- a/batched/dense/impl/KokkosBatched_LU_Serial_Impl.hpp +++ b/batched/dense/impl/KokkosBatched_LU_Serial_Impl.hpp @@ -31,7 +31,7 @@ namespace KokkosBatched { /// SerialLU no piv /// -#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__) && \ +#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED) && \ defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_COMPACT_BATCHED__) template <> template diff --git a/batched/dense/impl/KokkosBatched_Trsm_Serial_Impl.hpp b/batched/dense/impl/KokkosBatched_Trsm_Serial_Impl.hpp index 3a8886fab3..dc459d23d0 100644 --- a/batched/dense/impl/KokkosBatched_Trsm_Serial_Impl.hpp +++ b/batched/dense/impl/KokkosBatched_Trsm_Serial_Impl.hpp @@ -29,7 +29,7 @@ namespace KokkosBatched { /// B := inv(tril(A)) (alpha*B) /// A(m x m), B(m x n) -#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__) && \ +#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED) && \ defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_COMPACT_BATCHED__) template struct SerialTrsm { @@ -88,7 +88,7 @@ struct SerialTrsm struct SerialTrsm { @@ -167,7 +167,7 @@ struct SerialTrsm struct SerialTrsm { @@ -227,7 +227,7 @@ struct SerialTrsm struct SerialTrsm { @@ -285,7 +285,7 @@ struct SerialTrsm struct SerialTrsm { diff --git a/batched/dense/impl/KokkosBatched_Trsv_Serial_Impl.hpp b/batched/dense/impl/KokkosBatched_Trsv_Serial_Impl.hpp index 2cd6a431a8..d7db47375a 100644 --- a/batched/dense/impl/KokkosBatched_Trsv_Serial_Impl.hpp +++ b/batched/dense/impl/KokkosBatched_Trsv_Serial_Impl.hpp @@ -38,7 +38,7 @@ namespace KokkosBatched { /// L/NT /// -#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__) && \ +#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED) && \ defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_COMPACT_BATCHED__) template struct SerialTrsv { @@ -94,7 +94,7 @@ struct SerialTrsv /// L/T /// -#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__) && \ +#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED) && \ defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_COMPACT_BATCHED__) template struct SerialTrsv { @@ -150,7 +150,7 @@ struct SerialTrsv { /// U/NT /// -#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__) && \ +#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED) && \ defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_COMPACT_BATCHED__) template struct SerialTrsv { @@ -206,7 +206,7 @@ struct SerialTrsv /// U/T /// -#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__) && \ +#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED) && \ defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_COMPACT_BATCHED__) template struct SerialTrsv { diff --git a/perf_test/blas/blas3/KokkosBlas3_gemm_perf_test.hpp b/perf_test/blas/blas3/KokkosBlas3_gemm_perf_test.hpp index bda83070de..75a3c4c004 100644 --- a/perf_test/blas/blas3/KokkosBlas3_gemm_perf_test.hpp +++ b/perf_test/blas/blas3/KokkosBlas3_gemm_perf_test.hpp @@ -1975,7 +1975,7 @@ void do_gemm_serial_simd_batched_blocked_parallel(options_t options) { return; } -#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__) && \ +#if defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) && defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED) && \ defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_COMPACT_BATCHED__) void do_gemm_serial_batched_compact_mkl_parallel(options_t options) { STATUS; @@ -1994,9 +1994,9 @@ void do_gemm_serial_batched_compact_mkl_parallel(options_t) { #if !defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL) std::cerr << std::string(__func__) << " disabled since KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL is undefined." << std::endl; -#elif !defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__) +#elif !defined(KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED) std::cerr << std::string(__func__) - << " disabled since __KOKKOSBATCHED_ENABLE_INTEL_MKL_BATCHED__ is " + << " disabled since KOKKOSBATCHED_IMPL_ENABLE_INTEL_MKL_BATCHED is " "undefined." << std::endl; #elif !defined(__KOKKOSBATCHED_ENABLE_INTEL_MKL_COMPACT_BATCHED__)