From 1257bd930b9da290a967934ed288c23cc892293e Mon Sep 17 00:00:00 2001 From: Evan Harvey Date: Tue, 28 Apr 2020 11:37:42 -0600 Subject: [PATCH] batched/serial: add trtri unit test --- .../KokkosBatched_Trtri_Serial_Impl.hpp | 2 +- .../KokkosBatched_Trtri_Serial_Internal.hpp | 108 +++--- unit_test/batched/Test_Batched_SerialTrmm.hpp | 4 +- .../batched/Test_Batched_SerialTrtri.hpp | 335 ++++++++++++++++++ .../Test_Batched_SerialTrtri_Complex.hpp | 58 +++ .../batched/Test_Batched_SerialTrtri_Real.hpp | 58 +++ .../Test_Cuda_Batched_SerialTrtri_Complex.cpp | 3 + .../Test_Cuda_Batched_SerialTrtri_Real.cpp | 3 + ...est_OpenMP_Batched_SerialTrtri_Complex.cpp | 3 + .../Test_OpenMP_Batched_SerialTrtri_Real.cpp | 3 + ...est_Serial_Batched_SerialTrtri_Complex.cpp | 3 + .../Test_Serial_Batched_SerialTrtri_Real.cpp | 3 + 12 files changed, 529 insertions(+), 54 deletions(-) create mode 100644 unit_test/batched/Test_Batched_SerialTrtri.hpp create mode 100644 unit_test/batched/Test_Batched_SerialTrtri_Complex.hpp create mode 100644 unit_test/batched/Test_Batched_SerialTrtri_Real.hpp create mode 100644 unit_test/cuda/Test_Cuda_Batched_SerialTrtri_Complex.cpp create mode 100644 unit_test/cuda/Test_Cuda_Batched_SerialTrtri_Real.cpp create mode 100644 unit_test/openmp/Test_OpenMP_Batched_SerialTrtri_Complex.cpp create mode 100644 unit_test/openmp/Test_OpenMP_Batched_SerialTrtri_Real.cpp create mode 100644 unit_test/serial/Test_Serial_Batched_SerialTrtri_Complex.cpp create mode 100644 unit_test/serial/Test_Serial_Batched_SerialTrtri_Real.cpp diff --git a/src/batched/KokkosBatched_Trtri_Serial_Impl.hpp b/src/batched/KokkosBatched_Trtri_Serial_Impl.hpp index 08b09c5889..bc2da0e066 100644 --- a/src/batched/KokkosBatched_Trtri_Serial_Impl.hpp +++ b/src/batched/KokkosBatched_Trtri_Serial_Impl.hpp @@ -57,7 +57,7 @@ namespace KokkosBatched { invoke(const AViewType &A) { return SerialTrtriInternalLower::invoke(ArgDiag::use_unit_diag, A.extent(0), A.extent(1), - A.data(), A.stride(0), A.stride(1)); + A.data(), A.stride_0(), A.stride_1()); } }; template diff --git a/src/batched/KokkosBatched_Trtri_Serial_Internal.hpp b/src/batched/KokkosBatched_Trtri_Serial_Internal.hpp index f96070ae14..f3c7f3c960 100644 --- a/src/batched/KokkosBatched_Trtri_Serial_Internal.hpp +++ b/src/batched/KokkosBatched_Trtri_Serial_Internal.hpp @@ -89,36 +89,38 @@ namespace KokkosBatched { return i+1; } - A[(am-1)*as0 + (am-1)*as1] = one / A[(am-1)*as0 + (am-1)*as1]; - #if defined(KOKKOS_ENABLE_PRAGMA_UNROLL) #pragma unroll #endif - for (int i = am - 2; i >= 0; --i) { + for (int i = am - 1; i >= 0; --i) { A[i*as0 + i*as1] = one / A[i*as0 + i*as1]; - if (use_unit_diag) - A_ii = -one; - else - A_ii = -A[i*as0 + i*as1]; - ValueType *__restrict__ A_subblock = &A[(i+1)*as0 + (i+1)*as1]; - int A_subblock_m = am - i - 1, - A_subblock_n = am - i - 1; - ValueType *__restrict__ A_col_vec = &A[(i+1)*as0 + i*as1]; - int A_col_vec_m = am - i - 1, - A_col_vec_n = 1; - // TRMV/TRMM −− x=Ax - // A((j+1):n,j) = A((j+1):n,(j+1):n) ∗ A((j+1):n,j) ; - SerialTrmmInternalLeftLower::invoke(use_unit_diag, - false, - A_subblock_m, A_subblock_n, - A_col_vec_m, A_col_vec_n, - one, - A_subblock, as0, as1, - A_col_vec, as0, as1); - // SCAL -- x=ax - // A((j+1):n,j) = A_ii * A((j+1):n,j) - SerialScaleInternal::invoke(A_col_vec_m, A_col_vec_n, A_ii, A_col_vec, as0, as1); + if (i < am - 1) { + if (use_unit_diag) + A_ii = -one; + else + A_ii = -A[i*as0 + i*as1]; + + ValueType *__restrict__ A_subblock = &A[(i+1)*as0 + (i+1)*as1]; + int A_subblock_m = am - i - 1, + A_subblock_n = am - i - 1; + ValueType *__restrict__ A_col_vec = &A[(i+1)*as0 + i*as1]; + int A_col_vec_m = am - i - 1, + A_col_vec_n = 1; + // TRMV/TRMM −− x=Ax + // A((j+1):n,j) = A((j+1):n,(j+1):n) ∗ A((j+1):n,j) ; + SerialTrmmInternalLeftLower::invoke(use_unit_diag, + false, + A_subblock_m, A_subblock_n, + A_col_vec_m, A_col_vec_n, + one, + A_subblock, as0, as1, + A_col_vec, as0, as1); + + // SCAL -- x=ax + // A((j+1):n,j) = A_ii * A((j+1):n,j) + SerialScaleInternal::invoke(A_col_vec_m, A_col_vec_n, A_ii, A_col_vec, as0, as1); + } } return 0; } @@ -132,6 +134,8 @@ namespace KokkosBatched { const int am, const int an, ValueType *__restrict__ A, const int as0, const int as1) { ValueType one(1.0), zero(0.0), A_ii; + + if (!use_unit_diag) { #if defined(KOKKOS_ENABLE_PRAGMA_UNROLL) #pragma unroll @@ -142,37 +146,39 @@ namespace KokkosBatched { return i+1; } - A[0*as0 + 0*as1] = one / A[0*as0 + 0*as1]; - #if defined(KOKKOS_ENABLE_PRAGMA_UNROLL) #pragma unroll #endif - for (int i = 1; i < am; ++i) { + for (int i = 0; i < am; ++i) { A[i*as0 + i*as1] = one / A[i*as0 + i*as1]; - if (use_unit_diag) - A_ii = -one; - else - A_ii = -A[i*as0 + i*as1]; - ValueType *__restrict__ A_subblock = &A[0*as0 + 0*as1]; - int A_subblock_m = i, - A_subblock_n = i; - ValueType *__restrict__ A_col_vec = &A[0*as0 + i*as1]; - int A_col_vec_m = i, - A_col_vec_n = 1; - // TRMV/TRMM −− x=Ax - // A(1:(j-1),j) = A(1:(j-1),1:(j-1)) ∗ A(1:(j-1),j) ; - //SerialTrmm - SerialTrmmInternalLeftUpper::invoke(use_unit_diag, - false, - A_subblock_m, A_subblock_n, - A_col_vec_m, A_col_vec_n, - one, - A_subblock, as0, as1, - A_col_vec, as0, as1); - // SCAL -- x=ax - // A((j+1):n,j) = A_ii * A((j+1):n,j) - SerialScaleInternal::invoke(A_col_vec_m, A_col_vec_n, A_ii, A_col_vec, as0, as1); + if (i > 0) { + if (use_unit_diag) + A_ii = -one; + else + A_ii = -A[i*as0 + i*as1]; + + ValueType *__restrict__ A_subblock = &A[0*as0 + 0*as1]; + int A_subblock_m = i, + A_subblock_n = i; + ValueType *__restrict__ A_col_vec = &A[0*as0 + i*as1]; + int A_col_vec_m = i, + A_col_vec_n = 1; + // TRMV/TRMM −− x=Ax + // A(1:(j-1),j) = A(1:(j-1),1:(j-1)) ∗ A(1:(j-1),j) ; + //SerialTrmm + SerialTrmmInternalLeftUpper::invoke(use_unit_diag, + false, + A_subblock_m, A_subblock_n, + A_col_vec_m, A_col_vec_n, + one, + A_subblock, as0, as1, + A_col_vec, as0, as1); + + // SCAL -- x=ax + // A((j+1):n,j) = A_ii * A((j+1):n,j) + SerialScaleInternal::invoke(A_col_vec_m, A_col_vec_n, A_ii, A_col_vec, as0, as1); + } } return 0; } diff --git a/unit_test/batched/Test_Batched_SerialTrmm.hpp b/unit_test/batched/Test_Batched_SerialTrmm.hpp index 102e94066a..edb0026cfd 100644 --- a/unit_test/batched/Test_Batched_SerialTrmm.hpp +++ b/unit_test/batched/Test_Batched_SerialTrmm.hpp @@ -130,7 +130,7 @@ namespace Test { std::is_same >::value ? "::ComplexDouble" : "::UnknownValueType" ); std::string name = name_region + name_value_type; Kokkos::Profiling::pushRegion( name.c_str() ); - Kokkos::RangePolicy policy(0, _b.extent(0)); + Kokkos::RangePolicy policy(0, _a.extent(0)); Kokkos::parallel_for(name.c_str(), policy, *this); Kokkos::Profiling::popRegion(); } @@ -298,7 +298,7 @@ int test_batched_trmm() { for (int i=0;i<10;++i) { //printf("Testing: LayoutRight, Blksize %d\n", i); Test::impl_test_batched_trmm(1024, i, 4, &trans); - Test::impl_test_batched_trmm(1024, i, 1), &trans; + Test::impl_test_batched_trmm(1024, i, 1, &trans); } } #endif diff --git a/unit_test/batched/Test_Batched_SerialTrtri.hpp b/unit_test/batched/Test_Batched_SerialTrtri.hpp new file mode 100644 index 0000000000..ad38de8c3e --- /dev/null +++ b/unit_test/batched/Test_Batched_SerialTrtri.hpp @@ -0,0 +1,335 @@ +#include "gtest/gtest.h" +#include "Kokkos_Core.hpp" +#include "Kokkos_Random.hpp" + +#include "KokkosBatched_Trtri_Decl.hpp" +#include "KokkosBatched_Trtri_Serial_Impl.hpp" + +#include "KokkosKernels_TestUtils.hpp" + +#define PRINT_MAT 0 + +using namespace KokkosBatched; + +namespace Test { + + template + struct UnitDiagTRTRI { + ViewTypeA A_; + using ScalarA = typename ViewTypeA::value_type; + + UnitDiagTRTRI (const ViewTypeA& A) : A_(A) {} + + KOKKOS_INLINE_FUNCTION + void operator() (const int& i) const { + A_(i,i) = ScalarA(1); + } + }; + template + struct NonUnitDiagTRTRI { + ViewTypeA A_; + using ScalarA = typename ViewTypeA::value_type; + + NonUnitDiagTRTRI (const ViewTypeA& A) : A_(A) {} + + KOKKOS_INLINE_FUNCTION + void operator() (const int& i) const { + A_(i,i) = A_(i,i)+10; + } + }; + template + struct VanillaGEMM { + bool A_t, B_t, A_c, B_c; + int N,K; + ViewTypeA A; + ViewTypeB B; + ViewTypeC C; + + typedef typename ViewTypeA::value_type ScalarA; + typedef typename ViewTypeB::value_type ScalarB; + typedef typename ViewTypeC::value_type ScalarC; + typedef Kokkos::Details::ArithTraits APT; + typedef typename APT::mag_type mag_type; + ScalarA alpha; + ScalarC beta; + + KOKKOS_INLINE_FUNCTION + void operator() (const typename Kokkos::TeamPolicy::member_type& team) const { +// GNU COMPILER BUG WORKAROUND +#if defined(KOKKOS_COMPILER_GNU) && !defined(__CUDA_ARCH__) + int i = team.league_rank(); +#else + const int i = team.league_rank(); +#endif + Kokkos::parallel_for(Kokkos::TeamThreadRange(team,N), [&] (const int& j) { + ScalarC C_ij = 0.0; + + // GNU 5.3, 5.4 and 6.1 (and maybe more) crash with another nested lambda here + +#if defined(KOKKOS_COMPILER_GNU) && !defined(KOKKOS_COMPILER_NVCC) + for(int k=0; k + struct ParamTag { + typedef U uplo; + typedef D diag; + }; + + template + struct Functor_TestBatchedSerialTrtri { + ViewType _a; + + KOKKOS_INLINE_FUNCTION + Functor_TestBatchedSerialTrtri(const ViewType &a) + : _a(a) {} + + KOKKOS_INLINE_FUNCTION + void operator()(const ParamTagType &, const int k) const { + auto aa = Kokkos::subview(_a, k, Kokkos::ALL(), Kokkos::ALL()); + + SerialTrtri::invoke(aa); + } + + inline + void run() { + typedef typename ViewType::value_type value_type; + std::string name_region("KokkosBatched::Test::SerialTrtri"); + std::string name_value_type = ( std::is_same::value ? "::Float" : + std::is_same::value ? "::Double" : + std::is_same >::value ? "::ComplexFloat" : + std::is_same >::value ? "::ComplexDouble" : "::UnknownValueType" ); + std::string name = name_region + name_value_type; + Kokkos::Profiling::pushRegion( name.c_str() ); + Kokkos::RangePolicy policy(0,_a.extent(0)); + Kokkos::parallel_for("Functor_TestBatchedSerialTrtri", policy, *this); + Kokkos::Profiling::popRegion(); + } + }; + + template + void impl_test_batched_trtri(const int N, const int K) { + typedef typename ViewType::value_type value_type; + typedef typename DeviceType::execution_space execution_space; + typedef Kokkos::Details::ArithTraits ats; + + ScalarType alpha(1.0); + ScalarType beta(0.0); + + // eps is ~ 10^-13 for double + typedef typename ats::mag_type mag_type; + const mag_type eps = 1.0e8 * ats::epsilon(); + bool fail_flag = false; + ScalarType cur_check_val; // Either 1 or 0, to check A_I + + const bool is_A_lower = std::is_same::value; + ViewType A("A", N, K, K); + ViewType A_original("A_original", N, K, K); + ViewType A_I("A_I", N, K, K); + + typename ViewType::HostMirror I_host = Kokkos::create_mirror_view(A_I); + typename ViewType::HostMirror A_host = Kokkos::create_mirror_view(A); + + uint64_t seed = Kokkos::Impl::clock_tic(); + + using ViewTypeSubA = decltype(Kokkos::subview(A, 0, Kokkos::ALL(), Kokkos::ALL())); + + Kokkos::Random_XorShift64_Pool rand_pool(seed); + + if(std::is_same::value) { + // Initialize A with deterministic random numbers + Kokkos::fill_random(A, rand_pool, Kokkos::rand, ScalarType>::max()); + using functor_type = UnitDiagTRTRI; + for (int k = 0; k < N; ++k) { + functor_type udtrtri(Kokkos::subview(A, k, Kokkos::ALL(), Kokkos::ALL())); + // Initialize As diag with 1s + Kokkos::parallel_for("KokkosBlas::Test::UnitDiagTRTRI", Kokkos::RangePolicy(0,K), udtrtri); + } + } else {//(diag[0]=='N')||(diag[0]=='n') + // Initialize A with random numbers + Kokkos::fill_random(A, rand_pool, Kokkos::rand, ScalarType>::max()); + using functor_type = NonUnitDiagTRTRI; + for (int k = 0; k < N; ++k) { + functor_type nudtrtri(Kokkos::subview(A, k, Kokkos::ALL(), Kokkos::ALL())); + // Initialize As diag with A(i,i)+10 + Kokkos::parallel_for("KokkosBlas::Test::NonUnitDiagTRTRI", Kokkos::RangePolicy(0,K), nudtrtri); + } + } + Kokkos::fence(); + + Kokkos::deep_copy(A_host, A); + // Make A_host a lower triangle + for (int k = 0; k < N; k++) { + if (is_A_lower) { + for (int i = 0; i < K-1; i++) + for (int j = i+1; j < K; j++) + A_host(k,i,j) = ScalarType(0); + } + else { + // Make A_host a upper triangle + for (int i = 1; i < K; i++) + for (int j = 0; j < i; j++) + A_host(k,i,j) = ScalarType(0); + } + } + Kokkos::deep_copy(A, A_host); + Kokkos::deep_copy(A_original, A); + Kokkos::fence(); + + #if PRINT_MAT + printf("A_original:\n"); + for (int k = 0; k < N; ++k) { + for (int i = 0; i < K; i++) { + for (int j = 0; j < K; j++) { + printf("%*.13lf ", 20, A_original(k,i,j)); + } + printf("\n"); + } + } + #endif + + #if PRINT_MAT + printf("A:\n"); + for (int k = 0; k < N; ++k) { + for (int i = 0; i < K; i++) { + for (int j = 0; j < K; j++) { + printf("%*.13lf ", 20, A(k,i,j)); + } + printf("\n"); + } + } + #endif + + Functor_TestBatchedSerialTrtri(A).run(); + + #if PRINT_MAT + printf("A_original:\n"); + for (int k = 0; k < N; ++k) { + for (int i = 0; i < K; i++) { + for (int j = 0; j < K; j++) { + printf("%*.13lf ", 20, A_original(k,i,j)); + } + printf("\n"); + } + } + #endif + + #if PRINT_MAT + printf("A:\n"); + for (int k = 0; k < N; ++k) { + for (int i = 0; i < K; i++) { + for (int j = 0; j < K; j++) { + printf("%*.13lf ", 20, A(k,i,j)); + } + printf("\n"); + } + } + #endif + + Kokkos::fence(); + + struct VanillaGEMM vgemm; + vgemm.A_t = false; vgemm.B_t = false; + vgemm.A_c = false; vgemm.B_c = false; + vgemm.N = K; vgemm.K = K; + vgemm.alpha = alpha; + vgemm.beta = beta; + for (int i = 0; i < N; i++) { + vgemm.A = Kokkos::subview(A, i, Kokkos::ALL(), Kokkos::ALL()); + vgemm.B = Kokkos::subview(A_original, i, Kokkos::ALL(), Kokkos::ALL());; + vgemm.C = Kokkos::subview(A_I, i, Kokkos::ALL(), Kokkos::ALL());; + Kokkos::parallel_for("KokkosBlas::Test::VanillaGEMM", Kokkos::TeamPolicy(K,Kokkos::AUTO,16), vgemm); + } + + Kokkos::fence(); + Kokkos::deep_copy(I_host, A_I); + Kokkos::fence(); + + #if PRINT_MAT + printf("I_host:\n"); + for (int k = 0; k < N; ++k) { + for (int i = 0; i < K; i++) { + for (int j = 0; j < K; j++) { + printf("%*.13lf ", 20, I_host(k,i,j)); + } + printf("\n"); + } + } + #endif + + for (int k=0;k eps) { + fail_flag = true; + //printf(" Error: eps ( %g ), I_host ( %.15f ) != cur_check_val (%.15f) (abs result-cur_check_val %g) at (k %d, i %d, j %d)\n", + //eps, I_host(k,i,j), cur_check_val, ats::abs(I_host(k,i,j) - cur_check_val), k, i, j); + } + } + } + } + + if (fail_flag) + ASSERT_EQ( fail_flag, false ); + } +} + + +template +int test_batched_trtri() { +#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) + { + typedef Kokkos::View ViewType; + Test::impl_test_batched_trtri( 0, 10); + //Test::impl_test_batched_trtri( 1, 2); + for (int i=0;i<10;++i) { + //printf("Testing: LayoutLeft, Blksize %d\n", i); + Test::impl_test_batched_trtri(1024, i); + Test::impl_test_batched_trtri(1024, i); + } + } +#endif +#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) + { + typedef Kokkos::View ViewType; + Test::impl_test_batched_trtri( 0, 10); + for (int i=0;i<10;++i) { + //printf("Testing: LayoutRight, Blksize %d\n", i); + Test::impl_test_batched_trtri(1024, i); + Test::impl_test_batched_trtri(1024, i); + } + } +#endif + + return 0; +} + diff --git a/unit_test/batched/Test_Batched_SerialTrtri_Complex.hpp b/unit_test/batched/Test_Batched_SerialTrtri_Complex.hpp new file mode 100644 index 0000000000..fc8b51bdaf --- /dev/null +++ b/unit_test/batched/Test_Batched_SerialTrtri_Complex.hpp @@ -0,0 +1,58 @@ + +#if defined(KOKKOSKERNELS_INST_COMPLEX_FLOAT) +// NO TRANSPOSE +TEST_F( TestCategory, batched_scalar_serial_trtri_u_n_scomplex_scomplex ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri,Kokkos::complex,param_tag_type,algo_tag_type>(); +} +TEST_F( TestCategory, batched_scalar_serial_trtri_u_u_scomplex_scomplex ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri,Kokkos::complex,param_tag_type,algo_tag_type>(); +} +TEST_F( TestCategory, batched_scalar_serial_trtri_l_n_scomplex_scomplex ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri,Kokkos::complex,param_tag_type,algo_tag_type>(); +} +TEST_F( TestCategory, batched_scalar_serial_trtri_l_u_scomplex_scomplex ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri,Kokkos::complex,param_tag_type,algo_tag_type>(); +} +#endif + + +#if defined(KOKKOSKERNELS_INST_COMPLEX_DOUBLE) +// NO TRANSPOSE +TEST_F( TestCategory, batched_scalar_serial_trtri_u_n_dcomplex_dcomplex ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri,Kokkos::complex,param_tag_type,algo_tag_type>(); +} +TEST_F( TestCategory, batched_scalar_serial_trtri_u_u_dcomplex_dcomplex ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri,Kokkos::complex,param_tag_type,algo_tag_type>(); +} +TEST_F( TestCategory, batched_scalar_serial_trtri_l_n_dcomplex_dcomplex ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri,Kokkos::complex,param_tag_type,algo_tag_type>(); +} +TEST_F( TestCategory, batched_scalar_serial_trtri_l_u_dcomplex_dcomplex ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri,Kokkos::complex,param_tag_type,algo_tag_type>(); +} +#endif + diff --git a/unit_test/batched/Test_Batched_SerialTrtri_Real.hpp b/unit_test/batched/Test_Batched_SerialTrtri_Real.hpp new file mode 100644 index 0000000000..6ba687b94f --- /dev/null +++ b/unit_test/batched/Test_Batched_SerialTrtri_Real.hpp @@ -0,0 +1,58 @@ + +#if defined(KOKKOSKERNELS_INST_FLOAT) +// NO TRANSPOSE +TEST_F( TestCategory, batched_scalar_serial_trtri_u_n_float_float ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri(); +} +TEST_F( TestCategory, batched_scalar_serial_trtri_u_u_float_float ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri(); +} +TEST_F( TestCategory, batched_scalar_serial_trtri_l_n_float_float ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri(); +} +TEST_F( TestCategory, batched_scalar_serial_trtri_l_u_float_float ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri(); +} +#endif + + +#if defined(KOKKOSKERNELS_INST_DOUBLE) +// NO TRANSPOSE +TEST_F( TestCategory, batched_scalar_serial_trtri_u_n_double_double ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri(); +} +TEST_F( TestCategory, batched_scalar_serial_trtri_u_u_double_double ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri(); +} +TEST_F( TestCategory, batched_scalar_serial_trtri_l_n_double_double ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri(); +} +TEST_F( TestCategory, batched_scalar_serial_trtri_l_u_double_double ) { + typedef ::Test::ParamTag param_tag_type; + typedef Algo::Trtri::Unblocked algo_tag_type; + + test_batched_trtri(); +} +#endif + diff --git a/unit_test/cuda/Test_Cuda_Batched_SerialTrtri_Complex.cpp b/unit_test/cuda/Test_Cuda_Batched_SerialTrtri_Complex.cpp new file mode 100644 index 0000000000..df492e6231 --- /dev/null +++ b/unit_test/cuda/Test_Cuda_Batched_SerialTrtri_Complex.cpp @@ -0,0 +1,3 @@ +#include "Test_Cuda.hpp" +#include "Test_Batched_SerialTrtri.hpp" +#include "Test_Batched_SerialTrtri_Complex.hpp" diff --git a/unit_test/cuda/Test_Cuda_Batched_SerialTrtri_Real.cpp b/unit_test/cuda/Test_Cuda_Batched_SerialTrtri_Real.cpp new file mode 100644 index 0000000000..e6917691f6 --- /dev/null +++ b/unit_test/cuda/Test_Cuda_Batched_SerialTrtri_Real.cpp @@ -0,0 +1,3 @@ +#include "Test_Cuda.hpp" +#include "Test_Batched_SerialTrtri.hpp" +#include "Test_Batched_SerialTrtri_Real.hpp" diff --git a/unit_test/openmp/Test_OpenMP_Batched_SerialTrtri_Complex.cpp b/unit_test/openmp/Test_OpenMP_Batched_SerialTrtri_Complex.cpp new file mode 100644 index 0000000000..93caef3e8b --- /dev/null +++ b/unit_test/openmp/Test_OpenMP_Batched_SerialTrtri_Complex.cpp @@ -0,0 +1,3 @@ +#include "Test_OpenMP.hpp" +#include "Test_Batched_SerialTrtri.hpp" +#include "Test_Batched_SerialTrtri_Complex.hpp" diff --git a/unit_test/openmp/Test_OpenMP_Batched_SerialTrtri_Real.cpp b/unit_test/openmp/Test_OpenMP_Batched_SerialTrtri_Real.cpp new file mode 100644 index 0000000000..25a74f7867 --- /dev/null +++ b/unit_test/openmp/Test_OpenMP_Batched_SerialTrtri_Real.cpp @@ -0,0 +1,3 @@ +#include "Test_OpenMP.hpp" +#include "Test_Batched_SerialTrtri.hpp" +#include "Test_Batched_SerialTrtri_Real.hpp" diff --git a/unit_test/serial/Test_Serial_Batched_SerialTrtri_Complex.cpp b/unit_test/serial/Test_Serial_Batched_SerialTrtri_Complex.cpp new file mode 100644 index 0000000000..4a92854e8a --- /dev/null +++ b/unit_test/serial/Test_Serial_Batched_SerialTrtri_Complex.cpp @@ -0,0 +1,3 @@ +#include "Test_Serial.hpp" +#include "Test_Batched_SerialTrtri.hpp" +#include "Test_Batched_SerialTrtri_Complex.hpp" diff --git a/unit_test/serial/Test_Serial_Batched_SerialTrtri_Real.cpp b/unit_test/serial/Test_Serial_Batched_SerialTrtri_Real.cpp new file mode 100644 index 0000000000..a44bb8cb68 --- /dev/null +++ b/unit_test/serial/Test_Serial_Batched_SerialTrtri_Real.cpp @@ -0,0 +1,3 @@ +#include "Test_Serial.hpp" +#include "Test_Batched_SerialTrtri.hpp" +#include "Test_Batched_SerialTrtri_Real.hpp"