From eb852bb9e45b1db42a26001ece11ec7cc1f2bbfe Mon Sep 17 00:00:00 2001 From: Teresa Charlin Date: Thu, 30 Sep 2021 12:44:33 +0100 Subject: IVGCVSW-6293 Add Unit test int8 Channel Shuffle Signed-off-by: Teresa Charlin Change-Id: Icf69b4c707014c5ae76425ad326bd2826381f305 --- .../test/layerTests/ChannelShuffleTestImpl.cpp | 20 +++++++++++++++++++- src/backends/cl/test/ClLayerTests.cpp | 1 + src/backends/neon/test/NeonLayerTests.cpp | 1 + src/backends/reference/test/RefLayerTests.cpp | 3 +++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/backends/backendsCommon/test/layerTests/ChannelShuffleTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/ChannelShuffleTestImpl.cpp index 46ee7d960e..b026b4e7e0 100644 --- a/src/backends/backendsCommon/test/layerTests/ChannelShuffleTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/ChannelShuffleTestImpl.cpp @@ -244,6 +244,12 @@ SimpleChannelShuffleTest( const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, const armnn::ITensorHandleFactory& tensorHandleFactory); +template LayerTestResult, 4> +SimpleChannelShuffleTest( + armnn::IWorkloadFactory& workloadFactory, + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory); + template LayerTestResult, 2> ChannelShuffle2DTest( armnn::IWorkloadFactory& workloadFactory, @@ -256,6 +262,12 @@ ChannelShuffle2DTest( const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, const armnn::ITensorHandleFactory& tensorHandleFactory); +template LayerTestResult, 2> +ChannelShuffle2DTest( + armnn::IWorkloadFactory& workloadFactory, + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory); + template LayerTestResult, 4> ChannelShuffle4DTest( armnn::IWorkloadFactory& workloadFactory, @@ -266,4 +278,10 @@ template LayerTestResult, 4> ChannelShuffle4DTest( armnn::IWorkloadFactory& workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, - const armnn::ITensorHandleFactory& tensorHandleFactory); \ No newline at end of file + const armnn::ITensorHandleFactory& tensorHandleFactory); + +template LayerTestResult, 4> +ChannelShuffle4DTest( + armnn::IWorkloadFactory& workloadFactory, + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory); \ No newline at end of file diff --git a/src/backends/cl/test/ClLayerTests.cpp b/src/backends/cl/test/ClLayerTests.cpp index f52126dd4c..db6fe5d690 100644 --- a/src/backends/cl/test/ClLayerTests.cpp +++ b/src/backends/cl/test/ClLayerTests.cpp @@ -1923,6 +1923,7 @@ ARMNN_AUTO_TEST_FIXTURE_WITH_THF(CastFloatToUInt8, ClContextControlFixture, Cast // ChannelShuffle ARMNN_AUTO_TEST_CASE_WITH_THF(ChannelShuffle4DFloat32, ChannelShuffle4DTest) ARMNN_AUTO_TEST_CASE_WITH_THF(ChannelShuffle4DQAsymmU8, ChannelShuffle4DTest) +ARMNN_AUTO_TEST_CASE_WITH_THF(ChannelShuffle4DQAsymmS8, ChannelShuffle4DTest) #if defined(ARMNNREF_ENABLED) diff --git a/src/backends/neon/test/NeonLayerTests.cpp b/src/backends/neon/test/NeonLayerTests.cpp index 65870a319d..7f32236978 100644 --- a/src/backends/neon/test/NeonLayerTests.cpp +++ b/src/backends/neon/test/NeonLayerTests.cpp @@ -1422,6 +1422,7 @@ ARMNN_AUTO_TEST_CASE_WITH_THF(CastFloatToUInt8, CastFloat32ToUInt82dTest) // ChannelShuffle ARMNN_AUTO_TEST_CASE_WITH_THF(ChannelShuffle4DFloat32, ChannelShuffle4DTest) ARMNN_AUTO_TEST_CASE_WITH_THF(ChannelShuffle4DQAsymmU8, ChannelShuffle4DTest) +ARMNN_AUTO_TEST_CASE_WITH_THF(ChannelShuffle4DQAsymmS8, ChannelShuffle4DTest) #if defined(ARMNNREF_ENABLED) diff --git a/src/backends/reference/test/RefLayerTests.cpp b/src/backends/reference/test/RefLayerTests.cpp index b0855151de..4afee79c85 100644 --- a/src/backends/reference/test/RefLayerTests.cpp +++ b/src/backends/reference/test/RefLayerTests.cpp @@ -1401,10 +1401,13 @@ ARMNN_AUTO_TEST_CASE_WITH_THF(ReshapeBoolean, ReshapeBooleanTest) // ChannelShuffle ARMNN_AUTO_TEST_CASE_WITH_THF(SimpleChannelShuffleFloat32, SimpleChannelShuffleTest) ARMNN_AUTO_TEST_CASE_WITH_THF(SimpleChannelShuffleQAsymmU8, SimpleChannelShuffleTest) +ARMNN_AUTO_TEST_CASE_WITH_THF(SimpleChannelShuffleQAsymmS8, SimpleChannelShuffleTest) ARMNN_AUTO_TEST_CASE_WITH_THF(ChannelShuffle2DFloat32, ChannelShuffle2DTest) ARMNN_AUTO_TEST_CASE_WITH_THF(ChannelShuffle2DQAsymmU8, ChannelShuffle2DTest) +ARMNN_AUTO_TEST_CASE_WITH_THF(ChannelShuffle2DQAsymmS8, ChannelShuffle2DTest) ARMNN_AUTO_TEST_CASE_WITH_THF(ChannelShuffle4DFloat32, ChannelShuffle4DTest) ARMNN_AUTO_TEST_CASE_WITH_THF(ChannelShuffle4DQAsymmU8, ChannelShuffle4DTest) +ARMNN_AUTO_TEST_CASE_WITH_THF(ChannelShuffle4DQAsymmS8, ChannelShuffle4DTest) // Rsqrt ARMNN_AUTO_TEST_CASE_WITH_THF(Rsqrt2d, Rsqrt2dTest) -- cgit v1.2.1