From ce48d1dda2d6b32477de129a05ca3adee0f87690 Mon Sep 17 00:00:00 2001 From: Teresa Charlin Date: Wed, 24 Apr 2024 13:30:58 +0100 Subject: IVGCVSW-8206 CreateRescaleTosaOperator() modified Signed-off-by: Teresa Charlin Signed-off-by: Cathal Corbett Change-Id: I520a9d6cc95faeefaf82947a0547292e869aa523 --- .../tosaCommon/operatorMappings/QuantizeOperator.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/backends/tosaCommon/operatorMappings/QuantizeOperator.cpp') diff --git a/src/backends/tosaCommon/operatorMappings/QuantizeOperator.cpp b/src/backends/tosaCommon/operatorMappings/QuantizeOperator.cpp index 1a104d8423..1242d3b2c6 100644 --- a/src/backends/tosaCommon/operatorMappings/QuantizeOperator.cpp +++ b/src/backends/tosaCommon/operatorMappings/QuantizeOperator.cpp @@ -55,7 +55,7 @@ TosaSerializationBasicBlock* ConvertQuantizeToTosaOperator(const Layer* layer, std::vector inputShape0 = GetTosaTensorShape(inputInfo.GetShape()); DType inputDType0 = ArmNNToDType(inputInfo.GetDataType()); - float isFloatInput = inputDType0 == DType::DType_FP16 || inputDType0 == DType::DType_FP32; + bool isFloatInput = inputDType0 == DType::DType_FP16 || inputDType0 == DType::DType_FP32; // Only add input tensors if connected layer is an input layer. // As intermediate or constant tensors will be created separately. @@ -147,19 +147,17 @@ TosaSerializationBasicBlock* ConvertQuantizeToTosaOperator(const Layer* layer, int32_t output_zp = outputs[0]->GetQuantizationOffset(); TosaSerializationOperator* rescaleOp = nullptr; - TosaSerializationTensor* rescaleTensor = nullptr; CreateRescaleTosaOperator(inputName, outputName, - outputDType0, - inputShape0, scale_alpha, input_zp, output_zp, true, true, - &rescaleOp, - &rescaleTensor); - tensors.push_back(rescaleTensor); + &rescaleOp); + tensors.push_back(new TosaSerializationTensor(outputName, + inputShape0, + outputDType0, {})); // operatorInputNames/operatorOutputNames ends up being the same as // blockInputNames/blockOutputNames for one-to-one ArmNN to TOSA mappings -- cgit v1.2.1