diff options
author | Derek Lamberti <derek.lamberti@arm.com> | 2020-01-22 15:55:16 +0000 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2020-01-23 15:42:57 +0000 |
commit | d00ad916b72a53eb2488d82899ec7f033294d959 (patch) | |
tree | e46b95711dd762c04ef609d8dfd5a9a16becef31 | |
parent | 00a963bb81bd18e7245dc324b44b7c57baa07c05 (diff) | |
download | android-nn-driver-d00ad916b72a53eb2488d82899ec7f033294d959.tar.gz |
IVGCVSW-4370 Remove use of deprecated per-axis type
!armnn:2620
Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Change-Id: I8d71bac981a7576c7f51783833f76151495c62c0
-rw-r--r-- | Utils.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -9,6 +9,8 @@ #include <armnnUtils/Permute.hpp> +#include <armnn/Utils.hpp> + #include <cassert> #include <cinttypes> @@ -44,7 +46,7 @@ void SwizzleAndroidNn4dTensorToArmNn(const armnn::TensorInfo& tensor, const void case armnn::DataType::Float16: case armnn::DataType::Float32: case armnn::DataType::QAsymmU8: - case armnn::DataType::QuantizedSymm8PerAxis: + case armnn::DataType::QSymmS8: SwizzleAndroidNn4dTensorToArmNn(tensor.GetShape(), input, output, armnn::GetDataTypeSize(dataType), mappings); break; default: @@ -105,6 +107,7 @@ armnn::TensorInfo GetTensorInfoForOperand(const V1_0::Operand& operand) armnn::TensorInfo GetTensorInfoForOperand(const V1_2::Operand& operand) { using namespace armnn; + bool perChannel = false; DataType type; switch (operand.type) @@ -115,12 +118,12 @@ armnn::TensorInfo GetTensorInfoForOperand(const V1_2::Operand& operand) case V1_2::OperandType::TENSOR_FLOAT16: type = armnn::DataType::Float16; break; - case V1_2::OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL: - type = armnn::DataType::QuantizedSymm8PerAxis; - break; case V1_2::OperandType::TENSOR_QUANT8_ASYMM: type = armnn::DataType::QAsymmU8; break; + case V1_2::OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL: + perChannel=true; + ARMNN_FALLTHROUGH; case V1_2::OperandType::TENSOR_QUANT8_SYMM: type = armnn::DataType::QSymmS8; break; @@ -135,7 +138,7 @@ armnn::TensorInfo GetTensorInfoForOperand(const V1_2::Operand& operand) } TensorInfo ret(operand.dimensions.size(), operand.dimensions.data(), type); - if (type == DataType::QuantizedSymm8PerAxis) + if (perChannel) { // ExtraParams is expected to be of type channelQuant BOOST_ASSERT(operand.extraParams.getDiscriminator() == |