Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2019 ARM Limited. |
| 3 | * |
| 4 | * SPDX-License-Identifier: MIT |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | * of this software and associated documentation files (the "Software"), to |
| 8 | * deal in the Software without restriction, including without limitation the |
| 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 10 | * sell copies of the Software, and to permit persons to whom the Software is |
| 11 | * furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included in all |
| 14 | * copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 22 | * SOFTWARE. |
| 23 | */ |
| 24 | #include "arm_compute/core/CL/kernels/CLGEMMMatrixMultiplyReshapedOnlyRHSKernel.h" |
| 25 | #include "arm_compute/core/CL/kernels/CLGEMMReshapeRHSMatrixKernel.h" |
| 26 | #include "arm_compute/core/Types.h" |
| 27 | #include "arm_compute/core/utils/misc/ShapeCalculator.h" |
| 28 | #include "arm_compute/runtime/CL/CLTensor.h" |
| 29 | #include "arm_compute/runtime/CL/CLTensorAllocator.h" |
| 30 | #include "tests/CL/CLAccessor.h" |
| 31 | #include "tests/CL/Helper.h" |
| 32 | #include "tests/PaddingCalculator.h" |
| 33 | #include "tests/datasets/ShapeDatasets.h" |
| 34 | #include "tests/framework/Asserts.h" |
| 35 | #include "tests/framework/Macros.h" |
| 36 | #include "tests/framework/datasets/Datasets.h" |
| 37 | #include "tests/validation/Validation.h" |
| 38 | #include "tests/validation/fixtures/GEMMFixture.h" |
| 39 | |
| 40 | namespace arm_compute |
| 41 | { |
| 42 | namespace test |
| 43 | { |
| 44 | namespace validation |
| 45 | { |
| 46 | using namespace arm_compute::misc::shape_calculator; |
| 47 | |
| 48 | // Create function for CLGEMMReshapeRHSMatrixKernel |
| 49 | using CLGEMMReshapeRHSMatrix = CLSynthetizeFunction<CLGEMMReshapeRHSMatrixKernel>; |
| 50 | |
| 51 | // Create function for CLGEMMMatrixMultiplyReshapedOnlyRHSKernel |
| 52 | using CLGEMMMatrixMultiplyReshapedOnlyRHS = CLSynthetizeFunction<CLGEMMMatrixMultiplyReshapedOnlyRHSKernel>; |
| 53 | |
| 54 | // Fixture for CLGEMMMatrixMultiplyReshapedOnlyRHS |
| 55 | template <typename T> |
| 56 | using CLGEMMMatrixMultiplyReshapedOnlyRHSFixture = GEMMMatrixMultiplyReshapedOnlyRHSValidationFixture<CLTensor, CLAccessor, T, CLGEMMReshapeRHSMatrix, CLGEMMMatrixMultiplyReshapedOnlyRHS>; |
| 57 | |
| 58 | // Fixture for CLGEMMMatrixMultiplyReshapedOnlyRHS3D |
| 59 | template <typename T> |
| 60 | using CLGEMMMatrixMultiplyReshapedOnlyRHS3DFixture = GEMMMatrixMultiplyReshapedOnlyRHS3DValidationFixture<CLTensor, CLAccessor, T, CLGEMMReshapeRHSMatrix, CLGEMMMatrixMultiplyReshapedOnlyRHS>; |
| 61 | |
| 62 | namespace |
| 63 | { |
| 64 | // *INDENT-OFF* |
| 65 | // clang-format off |
| 66 | RelativeTolerance<float> rel_tolerance_f32(0.001f); |
| 67 | constexpr float abs_tolerance_f32(0.0001f); |
| 68 | |
| 69 | RelativeTolerance<half> rel_tolerance_f16(half(0.2)); |
| 70 | constexpr float tolerance_num_f16 = 0.02f; |
| 71 | |
| 72 | /** Alpha values to test - Precommit */ |
| 73 | const auto a_values = framework::dataset::make("alpha", {1.0f, -0.75f} ); |
| 74 | |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 75 | /** Beta values to test - Precommit */ |
| 76 | const auto beta_values = framework::dataset::make("beta", {-0.75f, 0.0f} ); |
| 77 | |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 78 | /** M values to test */ |
| 79 | const auto m_values = framework::dataset::make("M", 37); |
| 80 | |
| 81 | /** M_W values to test */ |
| 82 | const auto m_w_values = framework::dataset::make("M_W", 5); |
| 83 | |
| 84 | /** M_H values to test */ |
| 85 | const auto m_h_values = framework::dataset::make("M_H", 7); |
| 86 | |
| 87 | /** N values to test */ |
| 88 | const auto n_values = framework::dataset::make("N", 51); |
| 89 | |
| 90 | /** K values to test */ |
| 91 | const auto k_values = framework::dataset::make("K", 23); |
| 92 | |
| 93 | /** Batch size values to test */ |
| 94 | const auto b_values = framework::dataset::make("batch_size", 1, 3); |
| 95 | |
| 96 | /** M0 values to test - Precommit */ |
| 97 | const auto m0_values_precommit = framework::dataset::make("M0", {4, 6}); |
| 98 | |
| 99 | /** N0 values to test - Precommit */ |
| 100 | const auto n0_values_precommit = framework::dataset::make("N0", { 2, 4 }); |
| 101 | |
| 102 | /** K0 values to test - Precommit */ |
| 103 | const auto k0_values_precommit = framework::dataset::make("K0", { 4 }); |
| 104 | |
| 105 | /** H0 values to test - Precommit */ |
| 106 | const auto h0_values_precommit = framework::dataset::make("H0", 1, 3); |
| 107 | |
| 108 | /** M0 values to test - Nightly */ |
Gian Marco Iodice | ba5e096 | 2019-03-11 12:17:44 +0000 | [diff] [blame] | 109 | const auto m0_values_nightly = framework::dataset::make("M0", 1, 8); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 110 | |
| 111 | /** N0 values to test - Nightly */ |
| 112 | const auto n0_values_nightly = framework::dataset::make("N0", { 2, 3, 4, 8 }); |
| 113 | |
| 114 | /** K0 values to test - Nightly */ |
| 115 | const auto k0_values_nightly = framework::dataset::make("K0", { 2, 3, 4, 8 }); |
| 116 | |
| 117 | /** H0 values to test - Nightly */ |
| 118 | const auto h0_values_nightly = framework::dataset::make("H0", 1, 4); |
| 119 | |
| 120 | /** Interleave values to test with RHS matrix */ |
| 121 | const auto i_values_rhs = framework::dataset::make("interleave_rhs", { true, false }); |
| 122 | |
| 123 | /** Transpose values to test with RHS matrix */ |
Gian Marco Iodice | ba5e096 | 2019-03-11 12:17:44 +0000 | [diff] [blame] | 124 | const auto t_values_rhs = framework::dataset::make("transpose_rhs", { true, false }); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 125 | |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 126 | /**Broadcast bias from vector to matrix */ |
| 127 | const auto broadcast_bias_values = framework::dataset::make("broadcast_bias", {false, true} ); |
| 128 | |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 129 | /** Configuration test */ |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 130 | void validate_configuration(unsigned int m_value, unsigned int n_value, unsigned int k_value, unsigned int b_value, unsigned int m0_value, unsigned int n0_value, unsigned int k0_value, unsigned int h0_value, bool i_value_rhs, bool t_value_rhs, bool broadcast_bias, DataType data_type) |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 131 | { |
| 132 | const unsigned int M = m_value; |
| 133 | const unsigned int N = n_value; |
| 134 | const unsigned int K = k_value; |
| 135 | |
| 136 | GEMMLHSMatrixInfo lhs_info; |
| 137 | lhs_info.m0 = m0_value; |
| 138 | lhs_info.k0 = k0_value; |
| 139 | |
| 140 | GEMMRHSMatrixInfo rhs_info; |
| 141 | rhs_info.n0 = n0_value; |
| 142 | rhs_info.k0 = k0_value; |
| 143 | rhs_info.h0 = h0_value; |
| 144 | rhs_info.interleave = i_value_rhs; |
Gian Marco Iodice | ba5e096 | 2019-03-11 12:17:44 +0000 | [diff] [blame] | 145 | rhs_info.transpose = t_value_rhs; |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 146 | |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 147 | GEMMReshapeInfo gemm_info(M, N, K, false, false, 0, false, broadcast_bias); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 148 | |
| 149 | const TensorShape lhs_shape(K, M, b_value); |
| 150 | const TensorShape rhs_shape(N, K, b_value); |
| 151 | const TensorShape rhs_shape_reshaped = compute_rhs_reshaped_shape(TensorInfo(rhs_shape, 1, data_type), |
| 152 | rhs_info); |
| 153 | |
| 154 | const TensorShape dst_shape = compute_mm_shape(TensorInfo(lhs_shape, 1, data_type), |
| 155 | TensorInfo(rhs_shape_reshaped, 1, data_type), |
| 156 | gemm_info); |
| 157 | |
| 158 | // Create tensors |
| 159 | CLTensor lhs = create_tensor<CLTensor>(lhs_shape, data_type); |
| 160 | CLTensor rhs_reshaped = create_tensor<CLTensor>(rhs_shape_reshaped, data_type); |
| 161 | CLTensor dst = create_tensor<CLTensor>(dst_shape, data_type); |
| 162 | |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 163 | TensorShape bias_shape = dst_shape; |
| 164 | if (broadcast_bias) |
| 165 | { |
| 166 | bias_shape[1] = 1; |
| 167 | bias_shape[2] = 1; |
| 168 | } |
| 169 | CLTensor bias = create_tensor<CLTensor>(bias_shape, data_type); |
| 170 | |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 171 | ARM_COMPUTE_EXPECT(lhs.info()->is_resizable(), framework::LogLevel::ERRORS); |
| 172 | ARM_COMPUTE_EXPECT(rhs_reshaped.info()->is_resizable(), framework::LogLevel::ERRORS); |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 173 | ARM_COMPUTE_EXPECT(bias.info()->is_resizable(), framework::LogLevel::ERRORS); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 174 | ARM_COMPUTE_EXPECT(dst.info()->is_resizable(), framework::LogLevel::ERRORS); |
| 175 | |
| 176 | // Create and configure function |
| 177 | CLGEMMMatrixMultiplyReshapedOnlyRHS gemm; |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 178 | gemm.configure(&lhs, &rhs_reshaped, &bias, &dst, 1.0f, 1.0f, lhs_info, rhs_info, gemm_info); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 179 | } |
| 180 | } // namespace |
| 181 | |
| 182 | TEST_SUITE(CL) |
| 183 | TEST_SUITE(GEMMMatrixMultiplyReshapedOnlyRHS) |
| 184 | TEST_SUITE(Float) |
| 185 | TEST_SUITE(FP32) |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 186 | DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 187 | m_values, |
| 188 | n_values), |
| 189 | k_values), |
| 190 | framework::dataset::make("batch_size", 1)), |
| 191 | m0_values_precommit), |
| 192 | n0_values_precommit), |
| 193 | k0_values_precommit), |
| 194 | h0_values_precommit), |
| 195 | i_values_rhs), |
Gian Marco Iodice | ba5e096 | 2019-03-11 12:17:44 +0000 | [diff] [blame] | 196 | t_values_rhs), |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 197 | broadcast_bias_values), |
| 198 | m_value, n_value, k_value, b_value, m0_value, n0_value, k0_value, h0_value, i_value_rhs, t_value_rhs, broadcast_bias) |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 199 | { |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 200 | validate_configuration(m_value, n_value, k_value, b_value, m0_value, n0_value, k0_value, h0_value, i_value_rhs, t_value_rhs, broadcast_bias, DataType::F32); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 201 | } |
| 202 | |
| 203 | FIXTURE_DATA_TEST_CASE(RunSmall, CLGEMMMatrixMultiplyReshapedOnlyRHSFixture<float>, framework::DatasetMode::ALL, |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 204 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 205 | m_values, |
| 206 | n_values), |
| 207 | k_values), |
| 208 | b_values), |
| 209 | m0_values_precommit), |
| 210 | n0_values_precommit), |
| 211 | k0_values_precommit), |
| 212 | h0_values_precommit), |
| 213 | i_values_rhs), |
| 214 | t_values_rhs), |
| 215 | framework::dataset::make("DataType", DataType::F32)), |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 216 | a_values), |
| 217 | beta_values), |
| 218 | broadcast_bias_values)) |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 219 | { |
| 220 | // Validate output |
| 221 | validate(CLAccessor(_target), _reference, rel_tolerance_f32, 0.f, abs_tolerance_f32); |
| 222 | } |
| 223 | |
| 224 | FIXTURE_DATA_TEST_CASE(RunLarge, CLGEMMMatrixMultiplyReshapedOnlyRHSFixture<float>, framework::DatasetMode::NIGHTLY, |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 225 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 226 | m_values, |
| 227 | n_values), |
| 228 | k_values), |
| 229 | b_values), |
| 230 | m0_values_nightly), |
| 231 | n0_values_nightly), |
| 232 | k0_values_nightly), |
| 233 | h0_values_nightly), |
| 234 | i_values_rhs), |
| 235 | t_values_rhs), |
| 236 | framework::dataset::make("DataType", DataType::F32)), |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 237 | a_values), |
| 238 | beta_values), |
| 239 | broadcast_bias_values)) |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 240 | { |
| 241 | // Validate output |
| 242 | validate(CLAccessor(_target), _reference, rel_tolerance_f32, 0.f, abs_tolerance_f32); |
| 243 | } |
| 244 | |
| 245 | FIXTURE_DATA_TEST_CASE(RunSmall3D, CLGEMMMatrixMultiplyReshapedOnlyRHS3DFixture<float>, framework::DatasetMode::ALL, |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 246 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 247 | m_w_values, |
| 248 | m_h_values), |
| 249 | n_values), |
| 250 | k_values), |
| 251 | b_values), |
| 252 | m0_values_precommit), |
| 253 | n0_values_precommit), |
| 254 | k0_values_precommit), |
| 255 | h0_values_precommit), |
| 256 | i_values_rhs), |
| 257 | t_values_rhs), |
| 258 | framework::dataset::make("DataType", DataType::F32)), |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 259 | a_values), |
| 260 | b_values)) |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 261 | { |
| 262 | // Validate output |
| 263 | validate(CLAccessor(_target), _reference, rel_tolerance_f32, 0.f, abs_tolerance_f32); |
| 264 | } |
| 265 | |
| 266 | FIXTURE_DATA_TEST_CASE(RunLarge3D, CLGEMMMatrixMultiplyReshapedOnlyRHS3DFixture<float>, framework::DatasetMode::NIGHTLY, |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 267 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 268 | m_w_values, |
| 269 | m_h_values), |
| 270 | n_values), |
| 271 | k_values), |
| 272 | b_values), |
| 273 | m0_values_nightly), |
| 274 | n0_values_nightly), |
| 275 | k0_values_nightly), |
| 276 | h0_values_nightly), |
| 277 | i_values_rhs), |
| 278 | t_values_rhs), |
| 279 | framework::dataset::make("DataType", DataType::F32)), |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 280 | a_values), |
| 281 | b_values)) |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 282 | { |
| 283 | // Validate output |
| 284 | validate(CLAccessor(_target), _reference, rel_tolerance_f32, 0.f, abs_tolerance_f32); |
| 285 | } |
| 286 | TEST_SUITE_END() // FP32 |
| 287 | |
| 288 | TEST_SUITE(FP16) |
| 289 | FIXTURE_DATA_TEST_CASE(RunSmall, CLGEMMMatrixMultiplyReshapedOnlyRHSFixture<half>, framework::DatasetMode::ALL, |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 290 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 291 | m_values, |
| 292 | n_values), |
| 293 | k_values), |
| 294 | b_values), |
| 295 | m0_values_precommit), |
| 296 | n0_values_precommit), |
| 297 | k0_values_precommit), |
| 298 | h0_values_precommit), |
| 299 | i_values_rhs), |
| 300 | t_values_rhs), |
| 301 | framework::dataset::make("DataType", DataType::F16)), |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 302 | a_values), |
| 303 | b_values), |
| 304 | broadcast_bias_values)) |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 305 | { |
| 306 | // Validate output |
| 307 | validate(CLAccessor(_target), _reference, rel_tolerance_f16, tolerance_num_f16); |
| 308 | } |
| 309 | |
| 310 | FIXTURE_DATA_TEST_CASE(RunLarge, CLGEMMMatrixMultiplyReshapedOnlyRHSFixture<half>, framework::DatasetMode::NIGHTLY, |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 311 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 312 | m_values, |
| 313 | n_values), |
| 314 | k_values), |
| 315 | b_values), |
| 316 | m0_values_nightly), |
| 317 | n0_values_nightly), |
| 318 | k0_values_nightly), |
| 319 | h0_values_nightly), |
| 320 | i_values_rhs), |
| 321 | t_values_rhs), |
| 322 | framework::dataset::make("DataType", DataType::F16)), |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 323 | a_values), |
| 324 | b_values), |
| 325 | broadcast_bias_values)) |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 326 | { |
| 327 | // Validate output |
| 328 | validate(CLAccessor(_target), _reference, rel_tolerance_f16, tolerance_num_f16); |
| 329 | } |
| 330 | |
| 331 | FIXTURE_DATA_TEST_CASE(RunSmall3D, CLGEMMMatrixMultiplyReshapedOnlyRHS3DFixture<half>, framework::DatasetMode::ALL, |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 332 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 333 | m_w_values, |
| 334 | m_h_values), |
| 335 | n_values), |
| 336 | k_values), |
| 337 | b_values), |
| 338 | m0_values_precommit), |
| 339 | n0_values_precommit), |
| 340 | k0_values_precommit), |
| 341 | h0_values_precommit), |
| 342 | i_values_rhs), |
| 343 | t_values_rhs), |
| 344 | framework::dataset::make("DataType", DataType::F16)), |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 345 | a_values), |
| 346 | b_values)) |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 347 | { |
| 348 | // Validate output |
| 349 | validate(CLAccessor(_target), _reference, rel_tolerance_f16, tolerance_num_f16); |
| 350 | } |
| 351 | |
| 352 | FIXTURE_DATA_TEST_CASE(RunLarge3D, CLGEMMMatrixMultiplyReshapedOnlyRHS3DFixture<half>, framework::DatasetMode::NIGHTLY, |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 353 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 354 | m_w_values, |
| 355 | m_h_values), |
| 356 | n_values), |
| 357 | k_values), |
| 358 | b_values), |
| 359 | m0_values_nightly), |
| 360 | n0_values_nightly), |
| 361 | k0_values_nightly), |
| 362 | h0_values_nightly), |
| 363 | i_values_rhs), |
| 364 | t_values_rhs), |
| 365 | framework::dataset::make("DataType", DataType::F16)), |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 366 | a_values), |
| 367 | b_values)) |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 368 | { |
| 369 | // Validate output |
| 370 | validate(CLAccessor(_target), _reference, rel_tolerance_f16, tolerance_num_f16); |
| 371 | } |
| 372 | TEST_SUITE_END() // FP16 |
| 373 | TEST_SUITE_END() // Float |
| 374 | TEST_SUITE_END() // GEMMMatrixMulipltyReshapedOnlyRHS |
| 375 | TEST_SUITE_END() // CL |
| 376 | } // namespace validation |
| 377 | } // namespace test |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame^] | 378 | } // namespace arm_compute |