aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeresa Charlin <teresa.charlinreyes@arm.com>2019-11-11 17:06:23 +0000
committerTeresaARM <teresa.charlinreyes@arm.com>2019-11-12 10:35:40 +0000
commit02dce097d4fc643c790609e750dfa3c84abe1a34 (patch)
tree487979e6b82310a9c998beeb7750ac44635303fa
parentf76a876d88b841d147c29e08ee83b314ca768027 (diff)
downloadandroid-nn-driver-02dce097d4fc643c790609e750dfa3c84abe1a34.tar.gz
IVGCVSW-4079 Modify the channel dimension accordingly with the weights permutation
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ie4a27d805d6d953fc54264ef9a0947f82c5b1ff8
-rw-r--r--ConversionUtils.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp
index 88c15375..bcccd272 100644
--- a/ConversionUtils.hpp
+++ b/ConversionUtils.hpp
@@ -755,6 +755,12 @@ ConstTensorPin ConvertOperandToConstTensorPin(const HalOperand& operand,
}
armnn::TensorInfo tensorInfo = GetTensorInfoForOperand(operand);
+ // Android datalayout might be different than armnn datalayout, e.g. the kernel for the depthwise convolution.
+ if (tensorInfo.HasPerAxisQuantization())
+ {
+ tensorInfo.SetQuantizationDim(dimensionMappings[tensorInfo.GetQuantizationDim().value()]);
+ }
+
if (overrideTensorShape != nullptr)
{
tensorInfo.SetShape(*overrideTensorShape);