aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/Helpers.h
diff options
context:
space:
mode:
authorGunes Bayir <gunes.bayir@arm.com>2023-04-13 18:22:58 +0100
committerGunes Bayir <gunes.bayir@arm.com>2023-04-17 15:54:44 +0000
commit9d0c4deb760efc2ca07e5e0b8218995201ad8a1f (patch)
tree8f64b754d05768e2f69cfae387137140a6bb22b5 /tests/validation/Helpers.h
parent99145f787e9e99b45522f16d861c8527583f2b4e (diff)
downloadComputeLibrary-9d0c4deb760efc2ca07e5e0b8218995201ad8a1f.tar.gz
Add quantized CL MatMul kernels for Lhs NT/T, Rhs NT
Implement OpenCL kernels for batched Matrix Multiplication for the quantized data types QASYMM8 and QASYMM8_SIGNED. Quantized MatMul is supported with the following MatMul attributes: * adj_x = false, adj_y = false * adj_x = true, adj_y = false We consider native format kernels only. In other words, no reshaping of the operand matrices is done. Resolves: COMPMID-5921, COMPMID-5922 Change-Id: I99e0f68054a2bd635c60ec2641acc2e7ff398473 Signed-off-by: Omar Al Khatib <omar.alkhatib@arm.com> Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Signed-off-by: Jakub Sujak <jakub.sujak@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9435 Reviewed-by: SiCong Li <sicong.li@arm.com> Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/Helpers.h')
-rw-r--r--tests/validation/Helpers.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/validation/Helpers.h b/tests/validation/Helpers.h
index 2e48a6b8c6..3449239e45 100644
--- a/tests/validation/Helpers.h
+++ b/tests/validation/Helpers.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2022 Arm Limited.
+ * Copyright (c) 2017-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -21,8 +21,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef ARM_COMPUTE_TEST_VALIDATION_HELPERS_H
-#define ARM_COMPUTE_TEST_VALIDATION_HELPERS_H
+#ifndef ACL_TESTS_VALIDATION_HELPERS
+#define ACL_TESTS_VALIDATION_HELPERS
#include "arm_compute/core/Types.h"
#include "arm_compute/core/Utils.h"
@@ -250,7 +250,12 @@ void add_padding_x(std::initializer_list<ITensor *> tensors, const DataLayout &d
* @note This function adds padding to the input tensors only if data_layout == DataLayout::NHWC
*/
void add_padding_y(std::initializer_list<ITensor *> tensors, const DataLayout &data_layout = DataLayout::NHWC);
+
+/** For MatMulLowp, given the Lhs/Rhs matrix quantization informations and the matrix multiplication dimensions,
+ * calculate a suitable output quantization for obtaining non-saturated outputs with high probability.
+ */
+QuantizationInfo calculate_mat_mul_dst_q_info(const QuantizationInfo &lhs_q_info, const QuantizationInfo &rhs_q_info, int m, int n, int k, DataType data_type);
} // namespace validation
} // namespace test
} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_VALIDATION_HELPERS_H */
+#endif /* ACL_TESTS_VALIDATION_HELPERS */