Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 1 | /* |
Giorgio Arena | 2ab585b | 2021-02-25 15:41:49 +0000 | [diff] [blame] | 2 | * Copyright (c) 2019-2021 Arm Limited. |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 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 | */ |
Gian Marco Iodice | 7026b30 | 2019-06-26 17:18:11 +0100 | [diff] [blame] | 24 | #include "arm_compute/core/KernelDescriptors.h" |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 25 | #include "arm_compute/core/Types.h" |
| 26 | #include "arm_compute/core/utils/misc/ShapeCalculator.h" |
| 27 | #include "arm_compute/runtime/CL/CLTensor.h" |
| 28 | #include "arm_compute/runtime/CL/CLTensorAllocator.h" |
Georgios Pinitas | 856f66e | 2021-04-22 21:13:21 +0100 | [diff] [blame^] | 29 | #include "src/core/gpu/cl/kernels/ClGemmMatrixMultiplyReshapedOnlyRhsKernel.h" |
| 30 | #include "src/core/gpu/cl/kernels/ClGemmReshapeRhsMatrixKernel.h" |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 31 | #include "tests/CL/CLAccessor.h" |
| 32 | #include "tests/CL/Helper.h" |
| 33 | #include "tests/PaddingCalculator.h" |
| 34 | #include "tests/datasets/ShapeDatasets.h" |
| 35 | #include "tests/framework/Asserts.h" |
| 36 | #include "tests/framework/Macros.h" |
| 37 | #include "tests/framework/datasets/Datasets.h" |
| 38 | #include "tests/validation/Validation.h" |
| 39 | #include "tests/validation/fixtures/GEMMFixture.h" |
| 40 | |
| 41 | namespace arm_compute |
| 42 | { |
| 43 | namespace test |
| 44 | { |
| 45 | namespace validation |
| 46 | { |
| 47 | using namespace arm_compute::misc::shape_calculator; |
Georgios Pinitas | 856f66e | 2021-04-22 21:13:21 +0100 | [diff] [blame^] | 48 | using namespace arm_compute::opencl::kernels; |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 49 | |
Georgios Pinitas | 856f66e | 2021-04-22 21:13:21 +0100 | [diff] [blame^] | 50 | // Create function for ClGemmReshapeRhsMatrixKernel |
| 51 | using CLGEMMReshapeRHSMatrix = CLSynthetizeOperator<ClGemmReshapeRhsMatrixKernel>; |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 52 | |
Georgios Pinitas | 856f66e | 2021-04-22 21:13:21 +0100 | [diff] [blame^] | 53 | // Create function for ClGemmMatrixMultiplyReshapedOnlyRhsKernel |
| 54 | using CLGEMMMatrixMultiplyReshapedOnlyRHS = CLSynthetizeOperator<ClGemmMatrixMultiplyReshapedOnlyRhsKernel>; |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 55 | |
| 56 | // Fixture for CLGEMMMatrixMultiplyReshapedOnlyRHS |
| 57 | template <typename T> |
| 58 | using CLGEMMMatrixMultiplyReshapedOnlyRHSFixture = GEMMMatrixMultiplyReshapedOnlyRHSValidationFixture<CLTensor, CLAccessor, T, CLGEMMReshapeRHSMatrix, CLGEMMMatrixMultiplyReshapedOnlyRHS>; |
| 59 | |
| 60 | // Fixture for CLGEMMMatrixMultiplyReshapedOnlyRHS3D |
| 61 | template <typename T> |
| 62 | using CLGEMMMatrixMultiplyReshapedOnlyRHS3DFixture = GEMMMatrixMultiplyReshapedOnlyRHS3DValidationFixture<CLTensor, CLAccessor, T, CLGEMMReshapeRHSMatrix, CLGEMMMatrixMultiplyReshapedOnlyRHS>; |
| 63 | |
| 64 | namespace |
| 65 | { |
| 66 | // *INDENT-OFF* |
| 67 | // clang-format off |
| 68 | RelativeTolerance<float> rel_tolerance_f32(0.001f); |
| 69 | constexpr float abs_tolerance_f32(0.0001f); |
| 70 | |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 71 | RelativeTolerance<float> rel_tolerance_f16(0.001f); |
| 72 | constexpr float abs_tolerance_f16(0.01f); |
| 73 | |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 74 | /** Alpha values to test */ |
| 75 | const auto a_values = framework::dataset::make("alpha", {-0.75f} ); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 76 | |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 77 | /** Beta values to test */ |
Gian Marco Iodice | 6f93134 | 2020-09-15 14:17:41 +0100 | [diff] [blame] | 78 | const auto beta_values = framework::dataset::make("beta", {-0.35f} ); |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame] | 79 | |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 80 | /** M values to test */ |
| 81 | const auto m_values = framework::dataset::make("M", 37); |
| 82 | |
| 83 | /** M_W values to test */ |
| 84 | const auto m_w_values = framework::dataset::make("M_W", 5); |
| 85 | |
| 86 | /** M_H values to test */ |
| 87 | const auto m_h_values = framework::dataset::make("M_H", 7); |
| 88 | |
| 89 | /** N values to test */ |
| 90 | const auto n_values = framework::dataset::make("N", 51); |
| 91 | |
| 92 | /** K values to test */ |
| 93 | const auto k_values = framework::dataset::make("K", 23); |
| 94 | |
| 95 | /** Batch size values to test */ |
Gian Marco Iodice | 9ae06d4 | 2020-10-22 16:37:12 +0100 | [diff] [blame] | 96 | const auto b_values = framework::dataset::make("batch_size", 2); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 97 | |
Gian Marco Iodice | ca1f460 | 2019-07-16 15:46:48 +0100 | [diff] [blame] | 98 | /** Activation values to test */ |
| 99 | const auto act_values = framework::dataset::make("Activation", |
| 100 | { |
Giorgio Arena | 2ab585b | 2021-02-25 15:41:49 +0000 | [diff] [blame] | 101 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 10.f), |
Gian Marco Iodice | ca1f460 | 2019-07-16 15:46:48 +0100 | [diff] [blame] | 102 | }); |
| 103 | |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 104 | /** M0 values to test - precommit */ |
| 105 | const auto m0_values_precommit = framework::dataset::make("M0", { 4 }); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 106 | |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 107 | /** N0 values to test - precommit*/ |
| 108 | const auto n0_values_precommit = framework::dataset::make("N0", { 4 }); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 109 | |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 110 | /** K0 values to test - precommit*/ |
| 111 | const auto k0_values_precommit = framework::dataset::make("K0", { 4 }); |
| 112 | |
| 113 | /** M0 values to test - nightly */ |
| 114 | const auto m0_values_nightly = framework::dataset::make("M0", { 8 }); |
| 115 | |
| 116 | /** N0 values to test - nightly */ |
| 117 | const auto n0_values_nightly = framework::dataset::make("N0", { 16 }); |
| 118 | |
| 119 | /** K0 values to test - nightly */ |
| 120 | const auto k0_values_nightly = framework::dataset::make("K0", { 16 }); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 121 | |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 122 | /** H0 values to test */ |
| 123 | const auto h0_values = framework::dataset::make("H0", 1, 3); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 124 | |
| 125 | /** Interleave values to test with RHS matrix */ |
| 126 | const auto i_values_rhs = framework::dataset::make("interleave_rhs", { true, false }); |
| 127 | |
| 128 | /** Transpose values to test with RHS matrix */ |
Gian Marco Iodice | ba5e096 | 2019-03-11 12:17:44 +0000 | [diff] [blame] | 129 | 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] | 130 | |
Gian Marco Iodice | e16c890 | 2019-06-14 16:11:10 +0100 | [diff] [blame] | 131 | /** Broadcast bias from vector to matrix */ |
Gian Marco Iodice | d820db6 | 2019-08-05 14:23:23 +0100 | [diff] [blame] | 132 | const auto broadcast_bias_values = framework::dataset::make("broadcast_bias", { false, true } ); |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame] | 133 | |
SiCong Li | b972ae6 | 2020-08-03 15:39:45 +0100 | [diff] [blame] | 134 | /** Boundary handling cases for testing partial/non-partial (full) block dimensions, resulting from different combinations |
| 135 | * of M, M0, N and N0 values. |
| 136 | * M0 and N0 are kept constant, while the different test cases need to vary M and N. |
| 137 | * |
| 138 | * Eg. M = 64 and N = 33 result in a block dimension that has no partial blocks (all full blocks) in Y dimension and |
| 139 | * parital blocks in X dimension. |
| 140 | */ |
| 141 | const auto boundary_handling_cases = combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
| 142 | // Large k to force potential out-of-bound reads on input0 |
| 143 | framework::dataset::make("K", 315), |
| 144 | // Batch size == 1 to force potential out-of-bound reads on input0 |
| 145 | framework::dataset::make("batch_size", 1)), |
| 146 | framework::dataset::make("M0", 4)), |
| 147 | framework::dataset::make("N0", 4)), |
| 148 | framework::dataset::make("K0", 4)), |
| 149 | framework::dataset::make("H0", 3)), |
| 150 | i_values_rhs), |
| 151 | t_values_rhs), |
| 152 | framework::dataset::make("export_to_cl_image_rhs", {true, false})), |
| 153 | // Only need to test F32 as F16 shares identical boundary handling logics |
| 154 | framework::dataset::make("DataType", DataType::F32)), |
| 155 | framework::dataset::make("alpha", -0.75f )), |
| 156 | framework::dataset::make("beta", -0.35f )), |
| 157 | broadcast_bias_values), |
| 158 | framework::dataset::make("Activation", ActivationLayerInfo())); |
| 159 | |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 160 | /** Configuration test */ |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 161 | bool validate_configuration(unsigned int m_value, unsigned int n_value, unsigned int k_value, unsigned int b_value, |
| 162 | unsigned int m0_value, unsigned int n0_value, unsigned int k0_value, unsigned int h0_value, |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 163 | bool i_value_rhs, bool t_value_rhs, bool export_to_cl_image, bool broadcast_bias, bool input_as_3d, unsigned int depth_output_gemm3d, const ActivationLayerInfo &act_info, |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 164 | DataType dt_input0, DataType dt_input1, DataType dt_input2, DataType dt_output, float alpha, float beta) |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 165 | { |
| 166 | const unsigned int M = m_value; |
| 167 | const unsigned int N = n_value; |
| 168 | const unsigned int K = k_value; |
| 169 | |
| 170 | GEMMLHSMatrixInfo lhs_info; |
| 171 | lhs_info.m0 = m0_value; |
| 172 | lhs_info.k0 = k0_value; |
| 173 | |
| 174 | GEMMRHSMatrixInfo rhs_info; |
| 175 | rhs_info.n0 = n0_value; |
| 176 | rhs_info.k0 = k0_value; |
| 177 | rhs_info.h0 = h0_value; |
| 178 | rhs_info.interleave = i_value_rhs; |
Gian Marco Iodice | ba5e096 | 2019-03-11 12:17:44 +0000 | [diff] [blame] | 179 | rhs_info.transpose = t_value_rhs; |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 180 | rhs_info.export_to_cl_image = export_to_cl_image; |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 181 | |
Gian Marco Iodice | 7026b30 | 2019-06-26 17:18:11 +0100 | [diff] [blame] | 182 | GEMMKernelInfo kernel_info; |
| 183 | kernel_info.m = M; |
| 184 | kernel_info.n = N; |
| 185 | kernel_info.k = K; |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 186 | kernel_info.depth_output_gemm3d = depth_output_gemm3d; |
| 187 | kernel_info.reinterpret_input_as_3d = input_as_3d; |
Gian Marco Iodice | 7026b30 | 2019-06-26 17:18:11 +0100 | [diff] [blame] | 188 | kernel_info.broadcast_bias = broadcast_bias; |
Gian Marco Iodice | ca1f460 | 2019-07-16 15:46:48 +0100 | [diff] [blame] | 189 | kernel_info.activation_info = act_info; |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 190 | |
| 191 | const TensorShape lhs_shape(K, M, b_value); |
| 192 | const TensorShape rhs_shape(N, K, b_value); |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 193 | const TensorShape rhs_shape_reshaped = compute_rhs_reshaped_shape(TensorInfo(rhs_shape, 1, dt_input1), |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 194 | rhs_info); |
| 195 | |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 196 | const TensorShape dst_shape = compute_mm_shape(TensorInfo(lhs_shape, 1, dt_input0), |
| 197 | TensorInfo(rhs_shape_reshaped, 1, dt_input1), |
Gian Marco Iodice | 7026b30 | 2019-06-26 17:18:11 +0100 | [diff] [blame] | 198 | kernel_info); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 199 | |
Gian Marco Iodice | e16c890 | 2019-06-14 16:11:10 +0100 | [diff] [blame] | 200 | const TensorShape bias_shape(N, |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 201 | M, // Correct calculation should be: broadcast_bias? 1 : M, it's wrong here on purpose just for validation test |
Gian Marco Iodice | e16c890 | 2019-06-14 16:11:10 +0100 | [diff] [blame] | 202 | broadcast_bias? 1 : b_value); |
| 203 | |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 204 | // Create tensor info |
| 205 | TensorInfo lhs = TensorInfo(lhs_shape, 1, dt_input0); |
| 206 | TensorInfo rhs_reshaped = TensorInfo(rhs_shape_reshaped, 1, dt_input1); |
| 207 | TensorInfo bias = TensorInfo(bias_shape, 1, dt_input2); |
| 208 | TensorInfo dst = TensorInfo(dst_shape, 1, dt_output); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 209 | |
| 210 | // Create and configure function |
| 211 | CLGEMMMatrixMultiplyReshapedOnlyRHS gemm; |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 212 | return bool(gemm.validate(&lhs, &rhs_reshaped, &bias, &dst, alpha, beta, lhs_info, rhs_info, kernel_info)); |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 213 | } |
| 214 | } // namespace |
| 215 | |
| 216 | TEST_SUITE(CL) |
| 217 | TEST_SUITE(GEMMMatrixMultiplyReshapedOnlyRHS) |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 218 | |
| 219 | /** Validate tests |
| 220 | * |
| 221 | * A series of validation tests on configurations which according to the API specification |
| 222 | * the function should fail against. |
| 223 | * |
| 224 | * Checks performed in order: |
| 225 | * - Mismachting data type: input1, input2 and output need to have same data type as input0. Support data type: F32/F16. |
| 226 | * - Unsupported M0: MO can only be 1,2,3,4,5,6,7,8 |
| 227 | * - Unsupported N0: NO can only be 2,3,4,8,16 |
| 228 | * - Unsupported K0: KO can only be 2,3,4,8,16 |
| 229 | * - Unsupported bias addition: bias broadcast mode is 0 if the input or output has to be reinterpreted as 3D |
| 230 | * - Incorrect bias diemension when bias broadcast mode is 1 and beta is not 0.0f, should be (n, 1), not (n, m) |
| 231 | * - Incorrect input0 dimension when input is reinterpreted as 3D: input0->dimension(1) * input0->dimension(2) != m |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 232 | * - Correct support for creating an OpenCL image object from buffer |
| 233 | * - Incorrect support for creating an OpenCL image object from buffer. N0 is 2 but it can only be 4,8 and 16 |
SiCong Li | 5bdde85 | 2020-08-26 13:55:15 +0100 | [diff] [blame] | 234 | * - Correct F16 support for creating an OpenCL image object from buffer. |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 235 | */ |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 236 | DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zip(zip(zip(zip(zip(zip(zip( |
| 237 | framework::dataset::make("batch_size", { 1, 1, 1, 1, 1, 1, 2, 1, 1, 1 }), |
| 238 | framework::dataset::make("M0", { 4, 9, 4, 4, 4, 4, 4, 4, 4, 4 })), |
| 239 | framework::dataset::make("N0", { 4, 4, 18, 4, 4, 4, 4, 8, 2, 8 })), |
| 240 | framework::dataset::make("K0", { 4, 4, 4, 1, 4, 4, 4, 4, 4, 4 })), |
| 241 | framework::dataset::make("broadcast_bias", { false, false, false, false, false, true, true, false, false, false })), |
| 242 | framework::dataset::make("input_as_3d", { 0, 0, 0, 0, 1, 0, 1, 0, 0, 0 })), |
| 243 | framework::dataset::make("depth_output_gemm3d", { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 })), |
| 244 | framework::dataset::make("export_to_cl_image", { false, false, false, false, false, false, false, true, true, true })), |
| 245 | framework::dataset::make("data_type_input0", { DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F16})), |
| 246 | framework::dataset::make("data_type_input1", { DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F16})), |
| 247 | framework::dataset::make("data_type_input2", { DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F16})), |
| 248 | framework::dataset::make("data_type_output", { DataType::F16, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F32, DataType::F16})), |
| 249 | framework::dataset::make("Beta", { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f , 1.0f})), |
SiCong Li | 5bdde85 | 2020-08-26 13:55:15 +0100 | [diff] [blame] | 250 | framework::dataset::make("Expected", { false, false, false, false, false, false, false, true, false, true })), |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 251 | b_value, m0_value, n0_value, k0_value, broadcast_bias, input_as_3d, depth_output_gemm3d, export_to_cl_image, dt_input0, dt_intpu1, dt_input2, dt_output, beta, expected) |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 252 | { |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 253 | bool expected_value = expected; |
| 254 | |
| 255 | // Change expected to false if the target platform does not support the OpenCL cl_khr_image2d_from_buffer extension |
| 256 | if(!image2d_from_buffer_supported(CLKernelLibrary::get().get_device()) && export_to_cl_image) |
| 257 | { |
| 258 | expected_value = false; |
| 259 | } |
| 260 | |
| 261 | bool status = validate_configuration(37, 51, 23, b_value, m0_value, n0_value, k0_value, 1, false, false, export_to_cl_image, broadcast_bias, input_as_3d, depth_output_gemm3d, ActivationLayerInfo(), dt_input0, dt_intpu1, dt_input2, dt_output, 1.0f, beta); |
| 262 | ARM_COMPUTE_EXPECT(status == expected_value, framework::LogLevel::ERRORS); |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 263 | } |
| 264 | |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 265 | TEST_SUITE(Float) |
| 266 | TEST_SUITE(FP32) |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 267 | |
SiCong Li | b972ae6 | 2020-08-03 15:39:45 +0100 | [diff] [blame] | 268 | FIXTURE_DATA_TEST_CASE(RunPrecommitBoundaryHandlingPartialInXPartialInY, CLGEMMMatrixMultiplyReshapedOnlyRHSFixture<float>, framework::DatasetMode::PRECOMMIT, |
| 269 | combine(combine( |
| 270 | framework::dataset::make("M", 3), |
| 271 | framework::dataset::make("N", 1)), |
| 272 | boundary_handling_cases)) |
| 273 | { |
| 274 | // Validate output |
Sheri Zhang | cc3e53c | 2020-11-16 21:17:28 +0000 | [diff] [blame] | 275 | if(validate_result) |
| 276 | { |
| 277 | validate(CLAccessor(_target), _reference, rel_tolerance_f32, 0.f, abs_tolerance_f32); |
| 278 | } |
| 279 | else |
| 280 | { |
| 281 | ARM_COMPUTE_TEST_INFO("cl_khr_image2d_from_buffer not supported. TEST skipped"); |
| 282 | framework::ARM_COMPUTE_PRINT_INFO(); |
| 283 | } |
SiCong Li | b972ae6 | 2020-08-03 15:39:45 +0100 | [diff] [blame] | 284 | } |
| 285 | |
| 286 | FIXTURE_DATA_TEST_CASE(RunPrecommitBoundaryHandlingPartialInXFullInY, CLGEMMMatrixMultiplyReshapedOnlyRHSFixture<float>, framework::DatasetMode::PRECOMMIT, |
| 287 | combine(combine( |
| 288 | framework::dataset::make("M", 64), |
| 289 | framework::dataset::make("N", 43)), |
| 290 | boundary_handling_cases)) |
| 291 | { |
| 292 | // Validate output |
Sheri Zhang | cc3e53c | 2020-11-16 21:17:28 +0000 | [diff] [blame] | 293 | if(validate_result) |
| 294 | { |
| 295 | validate(CLAccessor(_target), _reference, rel_tolerance_f32, 0.f, abs_tolerance_f32); |
| 296 | } |
| 297 | else |
| 298 | { |
| 299 | ARM_COMPUTE_TEST_INFO("cl_khr_image2d_from_buffer not supported. TEST skipped"); |
| 300 | framework::ARM_COMPUTE_PRINT_INFO(); |
| 301 | } |
SiCong Li | b972ae6 | 2020-08-03 15:39:45 +0100 | [diff] [blame] | 302 | } |
| 303 | |
| 304 | FIXTURE_DATA_TEST_CASE(RunPrecommitBoundaryHandlingFullInXFullInY, CLGEMMMatrixMultiplyReshapedOnlyRHSFixture<float>, framework::DatasetMode::PRECOMMIT, |
| 305 | combine(combine( |
| 306 | framework::dataset::make("M", 64), |
| 307 | framework::dataset::make("N", 32)), |
| 308 | boundary_handling_cases)) |
| 309 | { |
| 310 | // Validate output |
Sheri Zhang | cc3e53c | 2020-11-16 21:17:28 +0000 | [diff] [blame] | 311 | if(validate_result) |
| 312 | { |
| 313 | validate(CLAccessor(_target), _reference, rel_tolerance_f32, 0.f, abs_tolerance_f32); |
| 314 | } |
| 315 | else |
| 316 | { |
| 317 | ARM_COMPUTE_TEST_INFO("cl_khr_image2d_from_buffer not supported. TEST skipped"); |
| 318 | framework::ARM_COMPUTE_PRINT_INFO(); |
| 319 | } |
SiCong Li | b972ae6 | 2020-08-03 15:39:45 +0100 | [diff] [blame] | 320 | } |
| 321 | |
| 322 | FIXTURE_DATA_TEST_CASE(RunPrecommitBoundaryHandlingFullInXPartialInY, CLGEMMMatrixMultiplyReshapedOnlyRHSFixture<float>, framework::DatasetMode::PRECOMMIT, |
| 323 | combine(combine( |
| 324 | framework::dataset::make("M", 37), |
| 325 | framework::dataset::make("N", 32)), |
| 326 | boundary_handling_cases)) |
| 327 | { |
| 328 | // Validate output |
Sheri Zhang | cc3e53c | 2020-11-16 21:17:28 +0000 | [diff] [blame] | 329 | if(validate_result) |
| 330 | { |
| 331 | validate(CLAccessor(_target), _reference, rel_tolerance_f32, 0.f, abs_tolerance_f32); |
| 332 | } |
| 333 | else |
| 334 | { |
| 335 | ARM_COMPUTE_TEST_INFO("cl_khr_image2d_from_buffer not supported. TEST skipped"); |
| 336 | framework::ARM_COMPUTE_PRINT_INFO(); |
| 337 | } |
SiCong Li | b972ae6 | 2020-08-03 15:39:45 +0100 | [diff] [blame] | 338 | } |
| 339 | |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 340 | FIXTURE_DATA_TEST_CASE(RunPrecommit, CLGEMMMatrixMultiplyReshapedOnlyRHSFixture<float>, framework::DatasetMode::PRECOMMIT, |
| 341 | combine(combine(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] | 342 | m_values, |
| 343 | n_values), |
| 344 | k_values), |
| 345 | b_values), |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 346 | m0_values_precommit), |
| 347 | n0_values_precommit), |
| 348 | k0_values_precommit), |
Sheri Zhang | 1a37810 | 2020-04-30 12:59:39 +0100 | [diff] [blame] | 349 | h0_values), |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 350 | i_values_rhs), |
| 351 | t_values_rhs), |
Manuel Bottini | 827817e | 2020-11-19 12:12:06 +0000 | [diff] [blame] | 352 | framework::dataset::make("export_to_cl_image_rhs", {false, true})), |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 353 | framework::dataset::make("DataType", DataType::F32)), |
| 354 | a_values), |
| 355 | beta_values), |
| 356 | broadcast_bias_values), |
| 357 | act_values)) |
| 358 | { |
| 359 | // Validate output only if the target platform supports the OpenCL cl_khr_image2d_from_buffer extension |
Sheri Zhang | cc3e53c | 2020-11-16 21:17:28 +0000 | [diff] [blame] | 360 | if(validate_result) |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 361 | { |
| 362 | validate(CLAccessor(_target), _reference, rel_tolerance_f32, 0.f, abs_tolerance_f32); |
| 363 | } |
| 364 | else |
| 365 | { |
| 366 | ARM_COMPUTE_TEST_INFO("cl_khr_image2d_from_buffer not supported. TEST skipped"); |
| 367 | framework::ARM_COMPUTE_PRINT_INFO(); |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | FIXTURE_DATA_TEST_CASE(RunNightly, CLGEMMMatrixMultiplyReshapedOnlyRHSFixture<float>, framework::DatasetMode::NIGHTLY, |
| 372 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
| 373 | m_values, |
| 374 | n_values), |
| 375 | k_values), |
| 376 | b_values), |
| 377 | m0_values_nightly), |
| 378 | n0_values_nightly), |
| 379 | k0_values_nightly), |
| 380 | h0_values), |
| 381 | i_values_rhs), |
| 382 | t_values_rhs), |
Manuel Bottini | 827817e | 2020-11-19 12:12:06 +0000 | [diff] [blame] | 383 | framework::dataset::make("export_to_cl_image_rhs", {false, true})), |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 384 | framework::dataset::make("DataType", DataType::F32)), |
| 385 | a_values), |
| 386 | beta_values), |
| 387 | broadcast_bias_values), |
| 388 | act_values)) |
| 389 | { |
| 390 | // Validate output only if the target platform supports the OpenCL cl_khr_image2d_from_buffer extension |
Sheri Zhang | cc3e53c | 2020-11-16 21:17:28 +0000 | [diff] [blame] | 391 | if(validate_result) |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 392 | { |
| 393 | validate(CLAccessor(_target), _reference, rel_tolerance_f32, 0.f, abs_tolerance_f32); |
| 394 | } |
| 395 | else |
| 396 | { |
| 397 | ARM_COMPUTE_TEST_INFO("cl_khr_image2d_from_buffer not supported. TEST skipped"); |
| 398 | framework::ARM_COMPUTE_PRINT_INFO(); |
| 399 | } |
| 400 | } |
| 401 | |
| 402 | FIXTURE_DATA_TEST_CASE(RunPrecommit3D, CLGEMMMatrixMultiplyReshapedOnlyRHS3DFixture<float>, framework::DatasetMode::PRECOMMIT, |
Gian Marco Iodice | 9ae06d4 | 2020-10-22 16:37:12 +0100 | [diff] [blame] | 403 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 404 | m_w_values, |
| 405 | m_h_values), |
| 406 | n_values), |
| 407 | k_values), |
| 408 | b_values), |
| 409 | m0_values_precommit), |
| 410 | n0_values_precommit), |
| 411 | k0_values_precommit), |
| 412 | h0_values), |
| 413 | i_values_rhs), |
| 414 | t_values_rhs), |
Manuel Bottini | 827817e | 2020-11-19 12:12:06 +0000 | [diff] [blame] | 415 | framework::dataset::make("export_to_cl_image_rhs", {false, true})), |
Gian Marco Iodice | 9ae06d4 | 2020-10-22 16:37:12 +0100 | [diff] [blame] | 416 | framework::dataset::make("has_pad_y", {false, true})), |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 417 | framework::dataset::make("DataType", DataType::F32)), |
| 418 | a_values), |
| 419 | beta_values), |
| 420 | act_values)) |
| 421 | { |
Sheri Zhang | cc3e53c | 2020-11-16 21:17:28 +0000 | [diff] [blame] | 422 | // Validate output only if the target platform supports the OpenCL cl_khr_image2d_from_buffer extension |
| 423 | if(validate_result) |
| 424 | { |
| 425 | validate(CLAccessor(_target), _reference, rel_tolerance_f32, 0.f, abs_tolerance_f32); |
| 426 | } |
| 427 | else |
| 428 | { |
| 429 | ARM_COMPUTE_TEST_INFO("cl_khr_image2d_from_buffer not supported. TEST skipped"); |
| 430 | framework::ARM_COMPUTE_PRINT_INFO(); |
| 431 | } |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 432 | } |
| 433 | |
| 434 | FIXTURE_DATA_TEST_CASE(RunNightly3D, CLGEMMMatrixMultiplyReshapedOnlyRHS3DFixture<float>, framework::DatasetMode::NIGHTLY, |
Gian Marco Iodice | 9ae06d4 | 2020-10-22 16:37:12 +0100 | [diff] [blame] | 435 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 436 | m_w_values, |
| 437 | m_h_values), |
| 438 | n_values), |
| 439 | k_values), |
| 440 | b_values), |
| 441 | m0_values_nightly), |
| 442 | n0_values_nightly), |
| 443 | k0_values_nightly), |
| 444 | h0_values), |
| 445 | i_values_rhs), |
| 446 | t_values_rhs), |
Manuel Bottini | 827817e | 2020-11-19 12:12:06 +0000 | [diff] [blame] | 447 | framework::dataset::make("export_to_cl_image_rhs", {false, true})), |
Gian Marco Iodice | 9ae06d4 | 2020-10-22 16:37:12 +0100 | [diff] [blame] | 448 | framework::dataset::make("has_pad_y", {false, true})), |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 449 | framework::dataset::make("DataType", DataType::F32)), |
| 450 | a_values), |
| 451 | beta_values), |
| 452 | act_values)) |
| 453 | { |
Sheri Zhang | cc3e53c | 2020-11-16 21:17:28 +0000 | [diff] [blame] | 454 | // Validate output only if the target platform supports the OpenCL cl_khr_image2d_from_buffer extension |
| 455 | if(validate_result) |
| 456 | { |
| 457 | validate(CLAccessor(_target), _reference, rel_tolerance_f32, 0.f, abs_tolerance_f32); |
| 458 | } |
| 459 | else |
| 460 | { |
| 461 | ARM_COMPUTE_TEST_INFO("cl_khr_image2d_from_buffer not supported. TEST skipped"); |
| 462 | framework::ARM_COMPUTE_PRINT_INFO(); |
| 463 | } |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 464 | } |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 465 | TEST_SUITE_END() // FP32 |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 466 | |
| 467 | TEST_SUITE(FP16) |
| 468 | FIXTURE_DATA_TEST_CASE(RunPrecommit, CLGEMMMatrixMultiplyReshapedOnlyRHSFixture<half>, framework::DatasetMode::PRECOMMIT, |
| 469 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
| 470 | m_values, |
| 471 | n_values), |
| 472 | k_values), |
| 473 | b_values), |
| 474 | m0_values_precommit), |
| 475 | n0_values_precommit), |
| 476 | k0_values_precommit), |
| 477 | h0_values), |
| 478 | i_values_rhs), |
| 479 | t_values_rhs), |
Gian Marco Iodice | 6f93134 | 2020-09-15 14:17:41 +0100 | [diff] [blame] | 480 | framework::dataset::make("export_to_cl_image_rhs", true)), |
| 481 | framework::dataset::make("DataType", DataType::F16)), |
| 482 | a_values), |
| 483 | beta_values), |
| 484 | broadcast_bias_values), |
| 485 | act_values)) |
| 486 | { |
| 487 | // Validate output only if the target platform supports the OpenCL cl_khr_image2d_from_buffer extension |
Sheri Zhang | cc3e53c | 2020-11-16 21:17:28 +0000 | [diff] [blame] | 488 | if(validate_result) |
Gian Marco Iodice | 6f93134 | 2020-09-15 14:17:41 +0100 | [diff] [blame] | 489 | { |
| 490 | validate(CLAccessor(_target), _reference, rel_tolerance_f16, 0.f, abs_tolerance_f16); |
| 491 | } |
| 492 | else |
| 493 | { |
| 494 | ARM_COMPUTE_TEST_INFO("cl_khr_image2d_from_buffer not supported. TEST skipped"); |
| 495 | framework::ARM_COMPUTE_PRINT_INFO(); |
| 496 | } |
| 497 | } |
| 498 | |
| 499 | FIXTURE_DATA_TEST_CASE(RunNightly, CLGEMMMatrixMultiplyReshapedOnlyRHSFixture<half>, framework::DatasetMode::NIGHTLY, |
| 500 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
| 501 | m_values, |
| 502 | n_values), |
| 503 | k_values), |
| 504 | b_values), |
| 505 | m0_values_nightly), |
| 506 | n0_values_nightly), |
| 507 | k0_values_nightly), |
| 508 | h0_values), |
| 509 | i_values_rhs), |
| 510 | t_values_rhs), |
| 511 | framework::dataset::make("export_to_cl_image_rhs", true)), |
| 512 | framework::dataset::make("DataType", DataType::F16)), |
| 513 | a_values), |
| 514 | beta_values), |
| 515 | broadcast_bias_values), |
| 516 | act_values)) |
| 517 | { |
| 518 | // Validate output only if the target platform supports the OpenCL cl_khr_image2d_from_buffer extension |
Sheri Zhang | cc3e53c | 2020-11-16 21:17:28 +0000 | [diff] [blame] | 519 | if(validate_result) |
Gian Marco Iodice | 6f93134 | 2020-09-15 14:17:41 +0100 | [diff] [blame] | 520 | { |
| 521 | validate(CLAccessor(_target), _reference, rel_tolerance_f16, 0.f, abs_tolerance_f16); |
| 522 | } |
| 523 | else |
| 524 | { |
| 525 | ARM_COMPUTE_TEST_INFO("cl_khr_image2d_from_buffer not supported. TEST skipped"); |
| 526 | framework::ARM_COMPUTE_PRINT_INFO(); |
| 527 | } |
| 528 | } |
| 529 | |
| 530 | FIXTURE_DATA_TEST_CASE(RunPrecommit3D, CLGEMMMatrixMultiplyReshapedOnlyRHS3DFixture<half>, framework::DatasetMode::PRECOMMIT, |
Gian Marco Iodice | 9ae06d4 | 2020-10-22 16:37:12 +0100 | [diff] [blame] | 531 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
Gian Marco Iodice | 6f93134 | 2020-09-15 14:17:41 +0100 | [diff] [blame] | 532 | m_w_values, |
| 533 | m_h_values), |
| 534 | n_values), |
| 535 | k_values), |
| 536 | b_values), |
| 537 | m0_values_precommit), |
| 538 | n0_values_precommit), |
| 539 | k0_values_precommit), |
| 540 | h0_values), |
| 541 | i_values_rhs), |
| 542 | t_values_rhs), |
| 543 | framework::dataset::make("export_to_cl_image_rhs", true)), |
Gian Marco Iodice | 9ae06d4 | 2020-10-22 16:37:12 +0100 | [diff] [blame] | 544 | framework::dataset::make("has_pad_y", {false, true})), |
Gian Marco Iodice | 6f93134 | 2020-09-15 14:17:41 +0100 | [diff] [blame] | 545 | framework::dataset::make("DataType", DataType::F16)), |
| 546 | a_values), |
| 547 | beta_values), |
| 548 | act_values)) |
| 549 | { |
Sheri Zhang | cc3e53c | 2020-11-16 21:17:28 +0000 | [diff] [blame] | 550 | // Validate output only if the target platform supports the OpenCL cl_khr_image2d_from_buffer extension |
| 551 | if(validate_result) |
| 552 | { |
| 553 | validate(CLAccessor(_target), _reference, rel_tolerance_f16, 0.f, abs_tolerance_f16); |
| 554 | } |
| 555 | else |
| 556 | { |
| 557 | ARM_COMPUTE_TEST_INFO("cl_khr_image2d_from_buffer not supported. TEST skipped"); |
| 558 | framework::ARM_COMPUTE_PRINT_INFO(); |
| 559 | } |
Gian Marco Iodice | 6f93134 | 2020-09-15 14:17:41 +0100 | [diff] [blame] | 560 | } |
| 561 | |
| 562 | FIXTURE_DATA_TEST_CASE(RunNightly3D, CLGEMMMatrixMultiplyReshapedOnlyRHS3DFixture<half>, framework::DatasetMode::NIGHTLY, |
Gian Marco Iodice | 9ae06d4 | 2020-10-22 16:37:12 +0100 | [diff] [blame] | 563 | combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine(combine( |
Gian Marco Iodice | 6f93134 | 2020-09-15 14:17:41 +0100 | [diff] [blame] | 564 | m_w_values, |
| 565 | m_h_values), |
| 566 | n_values), |
| 567 | k_values), |
| 568 | b_values), |
| 569 | m0_values_nightly), |
| 570 | n0_values_nightly), |
| 571 | k0_values_nightly), |
| 572 | h0_values), |
| 573 | i_values_rhs), |
| 574 | t_values_rhs), |
| 575 | framework::dataset::make("export_to_cl_image_rhs", true)), |
Gian Marco Iodice | 9ae06d4 | 2020-10-22 16:37:12 +0100 | [diff] [blame] | 576 | framework::dataset::make("has_pad_y", {false, true})), |
Gian Marco Iodice | 6f93134 | 2020-09-15 14:17:41 +0100 | [diff] [blame] | 577 | framework::dataset::make("DataType", DataType::F16)), |
| 578 | a_values), |
| 579 | beta_values), |
| 580 | act_values)) |
| 581 | { |
Sheri Zhang | cc3e53c | 2020-11-16 21:17:28 +0000 | [diff] [blame] | 582 | // Validate output only if the target platform supports the OpenCL cl_khr_image2d_from_buffer extension |
| 583 | if(validate_result) |
| 584 | { |
| 585 | validate(CLAccessor(_target), _reference, rel_tolerance_f16, 0.f, abs_tolerance_f16); |
| 586 | } |
| 587 | else |
| 588 | { |
| 589 | ARM_COMPUTE_TEST_INFO("cl_khr_image2d_from_buffer not supported. TEST skipped"); |
| 590 | framework::ARM_COMPUTE_PRINT_INFO(); |
| 591 | } |
Gian Marco Iodice | 6f93134 | 2020-09-15 14:17:41 +0100 | [diff] [blame] | 592 | } |
Gian Marco Iodice | 781cba7 | 2020-06-19 16:56:57 +0100 | [diff] [blame] | 593 | TEST_SUITE_END() // FP16 |
| 594 | |
Gian Marco Iodice | adc5395 | 2019-02-15 11:10:31 +0000 | [diff] [blame] | 595 | TEST_SUITE_END() // Float |
| 596 | TEST_SUITE_END() // GEMMMatrixMulipltyReshapedOnlyRHS |
| 597 | TEST_SUITE_END() // CL |
| 598 | } // namespace validation |
| 599 | } // namespace test |
Georgios Pinitas | b0f342e | 2019-05-21 13:32:43 +0100 | [diff] [blame] | 600 | } // namespace arm_compute |