27 #include "tests/datasets/LargeMatMulMMULDataset.h"
28 #include "tests/datasets/SmallMatMulMMULDataset.h"
32 #include "tests/validation/fixtures/MatMulKernelFixture.h"
48 constexpr
float abs_tolerance_f16(
84 using MatMulConfigurationPair = std::pair<MatMulKernelInfo, bool>;
86 const std::vector<MatMulConfigurationPair> supported_block_sizes =
135 for(
auto &pair : supported_block_sizes)
154 using ShapeConfigurationTuple = std::tuple<TensorShape, TensorShape, TensorShape, bool>;
155 const std::vector<ShapeConfigurationTuple> shape_configurations =
159 { TensorShape(8U, 4U), TensorShape(2U, 8U), TensorShape(2U),
true },
160 { TensorShape(8U, 4U), TensorShape(2U, 4U), TensorShape(2U),
false },
161 { TensorShape(5U, 0U), TensorShape(2U, 5U), TensorShape(2U),
false },
162 { TensorShape(5U, 7U), TensorShape(2U, 5U), TensorShape(2U),
false },
163 { TensorShape(8U, 4U, 3U, 4U, 5U, 6U), TensorShape(2U, 8U, 3U, 4U, 5U, 6U), TensorShape(2U),
true },
164 { TensorShape(5U, 4U, 3U, 4U, 5U, 1U), TensorShape(2U, 5U, 3U, 4U, 5U, 6U), TensorShape(2U),
false },
165 { TensorShape(5U, 4U, 3U, 4U, 9U, 6U), TensorShape(2U, 5U, 3U, 4U, 5U, 6U), TensorShape(2U),
false },
166 { TensorShape(4U, 1U), TensorShape(3U, 4U), TensorShape(1U),
false },
167 { TensorShape(4U, 1U), TensorShape(3U, 4U), TensorShape(5U, 6U),
false },
170 for(
auto &tuple : shape_configurations)
172 const bool expected = std::get<3>(tuple);
184 TensorShape lhs_shape = std::get<0>(tuple);
185 TensorShape rhs_shape = std::get<1>(tuple);
186 TensorShape bia_shape = std::get<2>(tuple);
198 const TensorInfo lhs_info = TensorInfo(lhs_shape, 1,
DataType::F32);
199 const TensorInfo rhs_info = TensorInfo(rhs_shape, 1,
DataType::F32);
200 const TensorInfo bia_info = TensorInfo(bia_shape, 1,
DataType::F32);
203 MatMulKernelInfo matmul_kernel_info{ adj_lhs, adj_rhs, 1, 1, 1,
false };
223 using DataTypeConfigurationTuple = std::tuple<DataType, DataType, DataType, DataType, bool>;
224 const std::vector<DataTypeConfigurationTuple> data_type_configurations =
248 const TensorShape
shape = TensorShape(8U, 8U);
249 const TensorShape bia_shape = TensorShape(8U);
250 const MatMulKernelInfo matmul_kernel_info{
false,
false, 1, 1, 1,
false };
251 for(
auto &tuple : data_type_configurations)
253 const bool expected = std::get<4>(tuple);
255 const TensorInfo lhs_info(
shape, 1, std::get<0>(tuple));
256 const TensorInfo rhs_info(
shape, 1, std::get<1>(tuple));
257 const TensorInfo bia_info(bia_shape, 1, std::get<2>(tuple));
277 framework::dataset::
make("TransposeA", {
false,
true })),
286 if(_device_supports_mmul)
301 if(_device_supports_mmul)
316 if(_device_supports_mmul)
332 if(_device_supports_mmul)
349 if(_device_supports_mmul)
366 if(_device_supports_mmul)
383 if(_device_supports_mmul)
401 if(_device_supports_mmul)
413 framework::dataset::
make("TransposeA", {
false,
true })),
422 if(_device_supports_mmul)
438 if(_device_supports_mmul)
454 if(_device_supports_mmul)
471 if(_device_supports_mmul)
488 if(_device_supports_mmul)