aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2019-11-21 15:54:36 +0000
committerKevin May <kevin.may@arm.com>2019-11-21 21:49:23 +0000
commit7a13acc8747a829fe3c912fcad028cbffdae4e49 (patch)
tree54c50aa19ea02a265dd51e8681775a4c8c9b291f
parenta23334e1aa1ffc524ce016edf6250482d1f5330d (diff)
downloadandroid-nn-driver-7a13acc8747a829fe3c912fcad028cbffdae4e49.tar.gz
IVGCVSW-4151 HAL 1_2 Dequantize FP32 Per Channel Tests on CpuAcc Failing
* Quantization dimension other than 0 is not supported. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Ied3914600a754b799e98d5660ad6196c8c4fa23d
-rw-r--r--ConversionUtils.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp
index a284a50a..6f1f100d 100644
--- a/ConversionUtils.hpp
+++ b/ConversionUtils.hpp
@@ -2220,6 +2220,13 @@ bool ConvertDequantize(const Operation& operation, const Model& model, Conversio
return Fail("%s: Operation has invalid input", __func__);
}
+ const armnn::TensorInfo& inputInfo = input.GetTensorInfo();
+ const armnn::Optional<unsigned int>& quantizationDim = inputInfo.GetQuantizationDim();
+ if (quantizationDim.has_value() && quantizationDim.value() != 0)
+ {
+ return Fail("%s: Operation has quantization dimension different than 0", __func__);
+ }
+
const Operand* const outputOperand = GetOutputOperand<HalPolicy>(operation, 0, model);
if (!outputOperand)
{
@@ -2237,8 +2244,8 @@ bool ConvertDequantize(const Operation& operation, const Model& model, Conversio
IsDequantizeSupported,
data.m_Backends,
isSupported,
- input.GetTensorInfo(),
- GetTensorInfoForOperand(*outputOperand));
+ inputInfo,
+ outputInfo);
if (!isSupported)
{
return false;