From d87a7b297a5bfc2bad3ba78ea97754d7894e82ef Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Tue, 10 Sep 2019 10:42:27 +0100 Subject: COMPMID-2650: Add support for QASYMM16 in CLQuantizationLayer Change-Id: I51dda621975f522a65d770304bed0ff0f30d1235 Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/1902 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas --- .../validation/fixtures/QuantizationLayerFixture.h | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'tests/validation/fixtures/QuantizationLayerFixture.h') diff --git a/tests/validation/fixtures/QuantizationLayerFixture.h b/tests/validation/fixtures/QuantizationLayerFixture.h index 84d4d7a7b3..4ffc659027 100644 --- a/tests/validation/fixtures/QuantizationLayerFixture.h +++ b/tests/validation/fixtures/QuantizationLayerFixture.h @@ -42,15 +42,15 @@ namespace test { namespace validation { -template +template class QuantizationValidationFixture : public framework::Fixture { public: template - void setup(TensorShape shape, DataType data_type, QuantizationInfo quant_info) + void setup(TensorShape shape, DataType data_type_in, DataType data_type_out, QuantizationInfo qinfo) { - _target = compute_target(shape, data_type, quant_info); - _reference = compute_reference(shape, data_type, quant_info); + _target = compute_target(shape, data_type_in, data_type_out, qinfo); + _reference = compute_reference(shape, data_type_in, data_type_out, qinfo); } protected: @@ -60,11 +60,11 @@ protected: library->fill_tensor_uniform(tensor, 0); } - TensorType compute_target(const TensorShape &shape, DataType data_type, QuantizationInfo quant_info) + TensorType compute_target(const TensorShape &shape, DataType data_type_in, DataType data_type_out, QuantizationInfo qinfo) { // Create tensors - TensorType src = create_tensor(shape, data_type); - TensorType dst = create_tensor(shape, DataType::QASYMM8, 1, quant_info); + TensorType src = create_tensor(shape, data_type_in); + TensorType dst = create_tensor(shape, data_type_out, 1, qinfo); // Create and configure function FunctionType quantization_layer; @@ -89,19 +89,19 @@ protected: return dst; } - SimpleTensor compute_reference(const TensorShape &shape, DataType data_type, QuantizationInfo quant_info) + SimpleTensor compute_reference(const TensorShape &shape, DataType data_type_in, DataType data_type_out, QuantizationInfo qinfo) { // Create reference - SimpleTensor src{ shape, data_type }; + SimpleTensor src{ shape, data_type_in }; // Fill reference fill(src); - return reference::quantization_layer(src, quant_info); + return reference::quantization_layer(src, data_type_out, qinfo); } - TensorType _target{}; - SimpleTensor _reference{}; + TensorType _target{}; + SimpleTensor _reference{}; }; } // namespace validation -- cgit v1.2.1