| 80 | TEST_SUITE(Validate) |
| 81 | |
| 82 | TEST_CASE(SupportedKernelConfigurations, framework::DatasetMode::ALL) |
| 83 | { |
| 84 | using MatMulConfigurationPair = std::pair<MatMulKernelInfo, bool>; |
| 85 | |
| 86 | const std::vector<MatMulConfigurationPair> supported_block_sizes = { |
| 87 | // MatMulKernelInfo(adj_lhs, adj_rhs, M0, N0, K0, export_rhs_to_cl_image = false) |
| 88 | // Lhs not-transposed, Rhs-not-transposed |
| 89 | {MatMulKernelInfo(false, false, 0, 1, 1), false}, // M0 should be > 0 |
| 90 | {MatMulKernelInfo(false, false, 3, 5, 1), false}, // N0 not in {1, 2, 3, 4, 8, 16} |
| 91 | {MatMulKernelInfo(false, false, 3, 6, 1), false}, // N0 not in {1, 2, 3, 4, 8, 16} |
| 92 | {MatMulKernelInfo(false, false, 3, 3, 17), false}, // K0 not in {1, 2, 3, 4, 8, 16} |
| 93 | {MatMulKernelInfo(false, false, 3, 3, 7), false}, // K0 not in {1, 2, 3, 4, 8, 16} |
| 94 | {MatMulKernelInfo(false, false, 9, 1, 2), true}, |
| 95 | {MatMulKernelInfo(false, false, 3, 16, 3), true}, |
| 96 | {MatMulKernelInfo(false, false, 7, 3, 4), true}, |
| 97 | {MatMulKernelInfo(false, false, 7, 3, 4, true), true}, // export to CLImage is unsupported for quantized types |
| 98 | }; |
| 99 | |
| 100 | // Set big enough shapes so that block sizes are not truncated. Also, set all dimensions equal |
| 101 | // so that it doesn't fail for different NT/T configurations. We aim to test the block sizes here, |
| 102 | // not the shapes themselves. |
| 103 | const TensorInfo lhs_info = TensorInfo(TensorShape(100U, 100U), 1, DataType::QASYMM8_SIGNED); |
| 104 | const TensorInfo rhs_info = TensorInfo(TensorShape(100U, 100U), 1, DataType::QASYMM8_SIGNED); |
| 105 | |
| 106 | for (auto &pair : supported_block_sizes) |
| 107 | { |
| 108 | TensorInfo output_info; |
| 109 | Status status = ClMatMulLowpNativeKernel::validate(&lhs_info, &rhs_info, nullptr, &output_info, pair.first); |
| 110 | |
| 111 | ARM_COMPUTE_EXPECT(bool(status) == pair.second, framework::LogLevel::ERRORS); |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | TEST_CASE(ValidateInputShapes, framework::DatasetMode::ALL) |
| 116 | { |
nothing calls this directly
no test coverage detected