IVGCVSW-3860 Per-channel QSymm8 support of DepthwiseConvolution2d in Cl
authorTeresa Charlin <teresa.charlinreyes@arm.com>
Fri, 29 Nov 2019 13:59:18 +0000 (13:59 +0000)
committerTeresa Charlin <teresa.charlinreyes@arm.com>
Fri, 29 Nov 2019 13:59:18 +0000 (13:59 +0000)
    *Add the call to ReorderWeightChannelsForAcl for QuantizedSymm8PerAxis weights

Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: I0d2e4c8328753ad15858130945b4fbb193943dfa

src/backends/backendsCommon/WorkloadUtils.cpp
src/backends/cl/test/ClLayerTests.cpp

index 385d970..73946c6 100644 (file)
@@ -172,6 +172,9 @@ armnn::ConstTensor ConvertWeightTensorFromArmnnToAcl(const ConstCpuTensorHandle*
             case DataType::QuantisedAsymm8:
                 weightPermuted = ReorderWeightChannelsForAcl<uint8_t>(weightPermuted, dataLayout, permuteBuffer);
                 break;
+            case DataType::QuantizedSymm8PerAxis:
+                weightPermuted = ReorderWeightChannelsForAcl<int8_t>(weightPermuted, dataLayout, permuteBuffer);
+                break;
             default:
                 break;
         }
index 16fe07c..c821dd9 100644 (file)
@@ -183,6 +183,11 @@ ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dAsymmetricNhwc,
 
 ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthMul64, DepthwiseConvolution2dDepthMul64Test);
 
+ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dPerAxisQuantTestNchw, DepthwiseConvolution2dPerAxisQuantTest,
+                     DataLayout::NCHW);
+ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dPerAxisQuantTestNhwc, DepthwiseConvolution2dPerAxisQuantTest,
+                     DataLayout::NHWC);
+
 // Splitter
 ARMNN_AUTO_TEST_CASE(SimpleSplitterFloat32, SplitterFloat32Test)
 ARMNN_AUTO_TEST_CASE(SimpleSplitterUint8, SplitterUint8Test)