Debian Codegraph @

packages/kokkos-kernels/batched/dense/unit_test/Test_Batched_SerialGemm_Real.hpp

raw
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_serial_gemm_nt_nt_bhalf_bhalf) {
18 typedef ::Test::Gemm::ParamTag<Trans::NoTranspose, Trans::NoTranspose> param_tag_type;
19
20 test_batched_gemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type,
21 Algo::Gemm::Blocked>();
22 test_batched_gemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type,
23 Algo::Gemm::Unblocked>();
24 }
25 TEST_F(TestCategory, batched_scalar_serial_gemm_t_nt_bhalf_bhalf) {
26 typedef ::Test::Gemm::ParamTag<Trans::Transpose, Trans::NoTranspose> param_tag_type;
27
28 test_batched_gemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type,
29 Algo::Gemm::Blocked>();
30 test_batched_gemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type,
31 Algo::Gemm::Unblocked>();
32 }
33 TEST_F(TestCategory, batched_scalar_serial_gemm_nt_t_bhalf_bhalf) {
34 typedef ::Test::Gemm::ParamTag<Trans::NoTranspose, Trans::Transpose> param_tag_type;
35
36 test_batched_gemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type,
37 Algo::Gemm::Blocked>();
38 test_batched_gemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type,
39 Algo::Gemm::Unblocked>();
40 }
41 TEST_F(TestCategory, batched_scalar_serial_gemm_t_t_bhalf_bhalf) {
42 typedef ::Test::Gemm::ParamTag<Trans::Transpose, Trans::Transpose> param_tag_type;
43
44 test_batched_gemm<TestDevice, ::Test::bhalfScalarType, ::Test::bhalfScalarType, param_tag_type,
45 Algo::Gemm::Blocked>();
46 test_batched_gemm<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_serial_gemm_nt_nt_half_half) {
53 typedef ::Test::Gemm::ParamTag<Trans::NoTranspose, Trans::NoTranspose> param_tag_type;
54
55 test_batched_gemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type, Algo::Gemm::Blocked>();
56 test_batched_gemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type,
57 Algo::Gemm::Unblocked>();
58 }
59 TEST_F(TestCategory, batched_scalar_serial_gemm_t_nt_half_half) {
60 typedef ::Test::Gemm::ParamTag<Trans::Transpose, Trans::NoTranspose> param_tag_type;
61
62 test_batched_gemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type, Algo::Gemm::Blocked>();
63 test_batched_gemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type,
64 Algo::Gemm::Unblocked>();
65 }
66 TEST_F(TestCategory, batched_scalar_serial_gemm_nt_t_half_half) {
67 typedef ::Test::Gemm::ParamTag<Trans::NoTranspose, Trans::Transpose> param_tag_type;
68
69 test_batched_gemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type, Algo::Gemm::Blocked>();
70 test_batched_gemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type,
71 Algo::Gemm::Unblocked>();
72 }
73 TEST_F(TestCategory, batched_scalar_serial_gemm_t_t_half_half) {
74 typedef ::Test::Gemm::ParamTag<Trans::Transpose, Trans::Transpose> param_tag_type;
75
76 test_batched_gemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type, Algo::Gemm::Blocked>();
77 test_batched_gemm<TestDevice, ::Test::halfScalarType, ::Test::halfScalarType, param_tag_type,
78 Algo::Gemm::Unblocked>();
79 }
80 #endif // KOKKOS_HALF_T_IS_FLOAT
81
82 #if defined(KOKKOSKERNELS_INST_FLOAT)
83 TEST_F(TestCategory, batched_scalar_serial_gemm_nt_nt_float_float) {
84 typedef ::Test::Gemm::ParamTag<Trans::NoTranspose, Trans::NoTranspose> param_tag_type;
85 typedef Algo::Gemm::Blocked algo_tag_type;
86 test_batched_gemm<TestDevice, float, float, param_tag_type, algo_tag_type>();
87 }
88 TEST_F(TestCategory, batched_scalar_serial_gemm_t_nt_float_float) {
89 typedef ::Test::Gemm::ParamTag<Trans::Transpose, Trans::NoTranspose> param_tag_type;
90 typedef Algo::Gemm::Blocked algo_tag_type;
91 test_batched_gemm<TestDevice, float, float, param_tag_type, algo_tag_type>();
92 }
93 TEST_F(TestCategory, batched_scalar_serial_gemm_nt_t_float_float) {
94 typedef ::Test::Gemm::ParamTag<Trans::NoTranspose, Trans::Transpose> param_tag_type;
95 typedef Algo::Gemm::Blocked algo_tag_type;
96 test_batched_gemm<TestDevice, float, float, param_tag_type, algo_tag_type>();
97 }
98 TEST_F(TestCategory, batched_scalar_serial_gemm_t_t_float_float) {
99 typedef ::Test::Gemm::ParamTag<Trans::Transpose, Trans::Transpose> param_tag_type;
100 typedef Algo::Gemm::Blocked algo_tag_type;
101 test_batched_gemm<TestDevice, float, float, param_tag_type, algo_tag_type>();
102 }
103 #endif
104
105 #if defined(KOKKOSKERNELS_INST_DOUBLE)
106 TEST_F(TestCategory, batched_scalar_serial_gemm_nt_nt_double_double) {
107 typedef ::Test::Gemm::ParamTag<Trans::NoTranspose, Trans::NoTranspose> param_tag_type;
108 typedef Algo::Gemm::Blocked algo_tag_type;
109 test_batched_gemm<TestDevice, double, double, param_tag_type, algo_tag_type>();
110 }
111 TEST_F(TestCategory, batched_scalar_serial_gemm_t_nt_double_double) {
112 typedef ::Test::Gemm::ParamTag<Trans::Transpose, Trans::NoTranspose> param_tag_type;
113 typedef Algo::Gemm::Blocked algo_tag_type;
114 test_batched_gemm<TestDevice, double, double, param_tag_type, algo_tag_type>();
115 }
116 TEST_F(TestCategory, batched_scalar_serial_gemm_nt_t_double_double) {
117 typedef ::Test::Gemm::ParamTag<Trans::NoTranspose, Trans::Transpose> param_tag_type;
118 typedef Algo::Gemm::Blocked algo_tag_type;
119 test_batched_gemm<TestDevice, double, double, param_tag_type, algo_tag_type>();
120 }
121 TEST_F(TestCategory, batched_scalar_serial_gemm_t_t_double_double) {
122 typedef ::Test::Gemm::ParamTag<Trans::Transpose, Trans::Transpose> param_tag_type;
123 typedef Algo::Gemm::Blocked algo_tag_type;
124 test_batched_gemm<TestDevice, double, double, param_tag_type, algo_tag_type>();
125 }
126 #endif