diff options
author | Teresa Charlin <teresa.charlinreyes@arm.com> | 2020-07-15 12:37:51 +0100 |
---|---|---|
committer | Teresa Charlin <teresa.charlinreyes@arm.com> | 2020-07-15 12:37:51 +0100 |
commit | 896572b9c5c9f28ac7f10d65954f0be25a1af2a3 (patch) | |
tree | 9b51a2a317af1ca78c1132e52aa0fb149f56696c | |
parent | 8f3d33ef6f86a4512f268931e09de0b0487e0ecd (diff) | |
download | android-nn-driver-896572b9c5c9f28ac7f10d65954f0be25a1af2a3.tar.gz |
IVGCVSW-5105 Fix CTS R 1.3 all backends Graph INT32 RANK1 ArgMinMax
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: Ia1c28623438ebd720d447dbbf29d44fc01d502b5
-rw-r--r-- | Utils.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -172,6 +172,7 @@ armnn::TensorInfo GetTensorInfoForOperand(const V1_3::Operand& operand) { using namespace armnn; bool perChannel = false; + bool isScalar = false; DataType type; switch (operand.type) @@ -202,6 +203,7 @@ armnn::TensorInfo GetTensorInfoForOperand(const V1_3::Operand& operand) break; case V1_3::OperandType::INT32: type = armnn::DataType::Signed32; + isScalar = true; break; case V1_3::OperandType::TENSOR_QUANT8_ASYMM_SIGNED: type = armnn::DataType::QAsymmS8; @@ -211,14 +213,13 @@ armnn::TensorInfo GetTensorInfoForOperand(const V1_3::Operand& operand) } TensorInfo ret; - // 0 dimensional tensors will be flagged as scalars - if ( operand.dimensions.size() != 0) + if (isScalar) { - ret = TensorInfo(operand.dimensions.size(), operand.dimensions.data(), type); + ret = TensorInfo(TensorShape(armnn::Dimensionality::Scalar), type); } else { - ret = TensorInfo(TensorShape(armnn::Dimensionality::Scalar), type); + ret = TensorInfo(operand.dimensions.size(), operand.dimensions.data(), type); } if (perChannel) |