From 9c7c2d2d23693877867bb3284c577b33cfbff471 Mon Sep 17 00:00:00 2001 From: Viet-Hoa Do Date: Tue, 11 Apr 2023 17:16:27 +0100 Subject: Add quantized support for CPU MatMul Resolves: COMPMID-5899 Signed-off-by: Viet-Hoa Do Change-Id: I89d96e292c3492ba9b1900a3e5683f9dcd11dfc6 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9440 Tested-by: Arm Jenkins Reviewed-by: Gunes Bayir Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- tests/SimpleTensor.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'tests/SimpleTensor.h') diff --git a/tests/SimpleTensor.h b/tests/SimpleTensor.h index c1bd7f87b5..9ea171d492 100644 --- a/tests/SimpleTensor.h +++ b/tests/SimpleTensor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2020, 2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -173,6 +173,15 @@ public: */ QuantizationInfo quantization_info() const override; + /** Set the quantization information of the tensor. + * + * This function does not have any effect on the raw quantized data of the tensor. + * It simply changes the quantization information, hence changes the dequantized values. + * + * @return A reference to the current object. + */ + SimpleTensor &quantization_info(const QuantizationInfo &qinfo); + /** Constant pointer to the underlying buffer. * * @return a constant pointer to the data. @@ -334,6 +343,13 @@ QuantizationInfo SimpleTensor::quantization_info() const return _quantization_info; } +template +SimpleTensor &SimpleTensor::quantization_info(const QuantizationInfo &qinfo) +{ + _quantization_info = qinfo; + return *this; +} + template size_t SimpleTensor::size() const { -- cgit v1.2.1