| 1 |
//@HEADER |
| 2 |
// ************************************************************************ |
| 3 |
// |
| 4 |
// Kokkos v. 4.0 |
| 5 |
// Copyright (2022) National Technology & Engineering |
| 6 |
// Solutions of Sandia, LLC (NTESS). |
| 7 |
// |
| 8 |
// Under the terms of Contract DE-NA0003525 with NTESS, |
| 9 |
// the U.S. Government retains certain rights in this software. |
| 10 |
// |
| 11 |
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions. |
| 12 |
// See https://kokkos.org/LICENSE for license information. |
| 13 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 14 |
// |
| 15 |
//@HEADER |
| 16 |
#if defined(KOKKOS_BHALF_T_IS_FLOAT) |
| 17 |
TEST_F(TestCategory, batched_scalar_team_gemm_nt_nt_bhalf_bhalf) { |
| 18 |
typedef ::Test::TeamGemm::ParamTag<Trans::NoTranspose, Trans::NoTranspose> param_tag_type; |
| 19 |
|
| 20 |
test_batched_teamgemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type, |
| 21 |
Algo::Gemm::Blocked>(); |
| 22 |
test_batched_teamgemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type, |
| 23 |
Algo::Gemm::Unblocked>(); |
| 24 |
} |
| 25 |
TEST_F(TestCategory, batched_scalar_team_gemm_t_nt_bhalf_bhalf) { |
| 26 |
typedef ::Test::TeamGemm::ParamTag<Trans::Transpose, Trans::NoTranspose> param_tag_type; |
| 27 |
|
| 28 |
test_batched_teamgemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type, |
| 29 |
Algo::Gemm::Blocked>(); |
| 30 |
test_batched_teamgemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type, |
| 31 |
Algo::Gemm::Unblocked>(); |
| 32 |
} |
| 33 |
TEST_F(TestCategory, batched_scalar_team_gemm_nt_t_bhalf_bhalf) { |
| 34 |
typedef ::Test::TeamGemm::ParamTag<Trans::NoTranspose, Trans::Transpose> param_tag_type; |
| 35 |
|
| 36 |
test_batched_teamgemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type, |
| 37 |
Algo::Gemm::Blocked>(); |
| 38 |
test_batched_teamgemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type, |
| 39 |
Algo::Gemm::Unblocked>(); |
| 40 |
} |
| 41 |
TEST_F(TestCategory, batched_scalar_team_gemm_t_t_bhalf_bhalf) { |
| 42 |
typedef ::Test::TeamGemm::ParamTag<Trans::Transpose, Trans::Transpose> param_tag_type; |
| 43 |
|
| 44 |
test_batched_teamgemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type, |
| 45 |
Algo::Gemm::Blocked>(); |
| 46 |
test_batched_teamgemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type, |
| 47 |
Algo::Gemm::Unblocked>(); |
| 48 |
} |
| 49 |
#endif // KOKKOS_BHALF_T_IS_FLOAT |
| 50 |
|
| 51 |
#if defined(KOKKOS_HALF_T_IS_FLOAT) |
| 52 |
TEST_F(TestCategory, batched_scalar_team_gemm_nt_nt_half_half) { |
| 53 |
typedef ::Test::TeamGemm::ParamTag<Trans::NoTranspose, Trans::NoTranspose> param_tag_type; |
| 54 |
|
| 55 |
test_batched_teamgemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type, |
| 56 |
Algo::Gemm::Blocked>(); |
| 57 |
test_batched_teamgemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type, |
| 58 |
Algo::Gemm::Unblocked>(); |
| 59 |
} |
| 60 |
TEST_F(TestCategory, batched_scalar_team_gemm_t_nt_half_half) { |
| 61 |
typedef ::Test::TeamGemm::ParamTag<Trans::Transpose, Trans::NoTranspose> param_tag_type; |
| 62 |
|
| 63 |
test_batched_teamgemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type, |
| 64 |
Algo::Gemm::Blocked>(); |
| 65 |
test_batched_teamgemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type, |
| 66 |
Algo::Gemm::Unblocked>(); |
| 67 |
} |
| 68 |
TEST_F(TestCategory, batched_scalar_team_gemm_nt_t_half_half) { |
| 69 |
typedef ::Test::TeamGemm::ParamTag<Trans::NoTranspose, Trans::Transpose> param_tag_type; |
| 70 |
|
| 71 |
test_batched_teamgemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type, |
| 72 |
Algo::Gemm::Blocked>(); |
| 73 |
test_batched_teamgemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type, |
| 74 |
Algo::Gemm::Unblocked>(); |
| 75 |
} |
| 76 |
TEST_F(TestCategory, batched_scalar_team_gemm_t_t_half_half) { |
| 77 |
typedef ::Test::TeamGemm::ParamTag<Trans::Transpose, Trans::Transpose> param_tag_type; |
| 78 |
|
| 79 |
test_batched_teamgemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type, |
| 80 |
Algo::Gemm::Blocked>(); |
| 81 |
test_batched_teamgemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type, |
| 82 |
Algo::Gemm::Unblocked>(); |
| 83 |
} |
| 84 |
#endif // KOKKOS_HALF_T_IS_FLOAT |
| 85 |
|
| 86 |
#if defined(KOKKOSKERNELS_INST_FLOAT) |
| 87 |
TEST_F(TestCategory, batched_scalar_team_gemm_nt_nt_float_float) { |
| 88 |
typedef ::Test::TeamGemm::ParamTag<Trans::NoTranspose, Trans::NoTranspose> param_tag_type; |
| 89 |
typedef Algo::Gemm::Blocked algo_tag_type; |
| 90 |
test_batched_teamgemm<TestDevice, float, float, param_tag_type, algo_tag_type>(); |
| 91 |
} |
| 92 |
TEST_F(TestCategory, batched_scalar_team_gemm_t_nt_float_float) { |
| 93 |
typedef ::Test::TeamGemm::ParamTag<Trans::Transpose, Trans::NoTranspose> param_tag_type; |
| 94 |
typedef Algo::Gemm::Blocked algo_tag_type; |
| 95 |
test_batched_teamgemm<TestDevice, float, float, param_tag_type, algo_tag_type>(); |
| 96 |
} |
| 97 |
TEST_F(TestCategory, batched_scalar_team_gemm_nt_t_float_float) { |
| 98 |
typedef ::Test::TeamGemm::ParamTag<Trans::NoTranspose, Trans::Transpose> param_tag_type; |
| 99 |
typedef Algo::Gemm::Blocked algo_tag_type; |
| 100 |
test_batched_teamgemm<TestDevice, float, float, param_tag_type, algo_tag_type>(); |
| 101 |
} |
| 102 |
TEST_F(TestCategory, batched_scalar_team_gemm_t_t_float_float) { |
| 103 |
typedef ::Test::TeamGemm::ParamTag<Trans::Transpose, Trans::Transpose> param_tag_type; |
| 104 |
typedef Algo::Gemm::Blocked algo_tag_type; |
| 105 |
test_batched_teamgemm<TestDevice, float, float, param_tag_type, algo_tag_type>(); |
| 106 |
} |
| 107 |
#endif |
| 108 |
|
| 109 |
#if defined(KOKKOSKERNELS_INST_DOUBLE) |
| 110 |
TEST_F(TestCategory, batched_scalar_team_gemm_nt_nt_double_double) { |
| 111 |
typedef ::Test::TeamGemm::ParamTag<Trans::NoTranspose, Trans::NoTranspose> param_tag_type; |
| 112 |
typedef Algo::Gemm::Blocked algo_tag_type; |
| 113 |
test_batched_teamgemm<TestDevice, double, double, param_tag_type, algo_tag_type>(); |
| 114 |
} |
| 115 |
TEST_F(TestCategory, batched_scalar_team_gemm_t_nt_double_double) { |
| 116 |
typedef ::Test::TeamGemm::ParamTag<Trans::Transpose, Trans::NoTranspose> param_tag_type; |
| 117 |
typedef Algo::Gemm::Blocked algo_tag_type; |
| 118 |
test_batched_teamgemm<TestDevice, double, double, param_tag_type, algo_tag_type>(); |
| 119 |
} |
| 120 |
TEST_F(TestCategory, batched_scalar_team_gemm_nt_t_double_double) { |
| 121 |
typedef ::Test::TeamGemm::ParamTag<Trans::NoTranspose, Trans::Transpose> param_tag_type; |
| 122 |
typedef Algo::Gemm::Blocked algo_tag_type; |
| 123 |
test_batched_teamgemm<TestDevice, double, double, param_tag_type, algo_tag_type>(); |
| 124 |
} |
| 125 |
TEST_F(TestCategory, batched_scalar_team_gemm_t_t_double_double) { |
| 126 |
typedef ::Test::TeamGemm::ParamTag<Trans::Transpose, Trans::Transpose> param_tag_type; |
| 127 |
typedef Algo::Gemm::Blocked algo_tag_type; |
| 128 |
test_batched_teamgemm<TestDevice, double, double, param_tag_type, algo_tag_type>(); |
| 129 |
} |
| 130 |
#endif |