From 7b9ce8d48b74a3487f0597eedc38523c4a8e02ee Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Tue, 21 Apr 2020 10:39:28 +0100 Subject: IVGCVSW-4679 Fix VTS DeadlineTest failures 1.3 CpuAcc CpuRef * Optional timeline parameters are not supported yet. Signed-off-by: Sadik Armagan Change-Id: Ic5d6cd6af0cd87d4acba102a48fc94ec8b406377 --- ConversionUtils.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ConversionUtils.hpp') diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp index ebfc43b7..d19131ce 100644 --- a/ConversionUtils.hpp +++ b/ConversionUtils.hpp @@ -3193,10 +3193,12 @@ bool ConvertPad(HalOperation& operation, const HalModel& model, ConversionData& return Fail("%s: Could not convert paddings", __func__); } + // For a ANEURALNETWORKS_TENSOR_QUANT8_ASYMM and ANEURALNETWORKS_TENSOR_QUANT8_ASYMM_SIGNED tensor, + // the scale and zeroPoint must be the same as input0 // Before Android Q, the pad value for ANEURALNETWORKS_TENSOR_QUANT8_ASYMM was undefined. Since Android Q the pad // value must be "logical zero" we set it to be equal to the QuantizationOffset so effectively it ends up as // (QuantizationOffset - QuantizationOffset) * scale = 0. - if (inputInfo.GetDataType() == armnn::DataType::QAsymmU8) + if (inputInfo.GetDataType() == armnn::DataType::QAsymmU8 || inputInfo.GetDataType() == armnn::DataType::QAsymmS8) { descriptor.m_PadValue = inputInfo.GetQuantizationOffset(); } -- cgit v1.2.1