From 33a626f14c8db13967ba2a933388223d5bf733c3 Mon Sep 17 00:00:00 2001 From: Keith Davis Date: Thu, 27 Aug 2020 15:38:12 +0100 Subject: IVGCVSW-5231 Remove CreateTensorHandle in the test where there is NO_DEPRECATE_WARN * Done for all elementwise layers, Activation, BatchNorm, BatchToSpace Signed-off-by: Keith Davis Change-Id: Id1d15a0960233026aecf7a07e0d3f006e07e4abf --- .../test/layerTests/SubtractionTestImpl.cpp | 78 +++++++++++++++------- 1 file changed, 54 insertions(+), 24 deletions(-) (limited to 'src/backends/backendsCommon/test/layerTests/SubtractionTestImpl.cpp') diff --git a/src/backends/backendsCommon/test/layerTests/SubtractionTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/SubtractionTestImpl.cpp index eb1ba6b369..3c4946e44a 100644 --- a/src/backends/backendsCommon/test/layerTests/SubtractionTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/SubtractionTestImpl.cpp @@ -18,7 +18,8 @@ std::unique_ptr CreateWorkload SubtractionUint8Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 1, 2, 2 }; const unsigned int shape1[] = { 1, 1, 2, 2 }; @@ -40,13 +41,15 @@ LayerTestResult SubtractionUint8Test( 0, shape0, output, + tensorHandleFactory, 1.0f, 0); } LayerTestResult SubtractionBroadcast1ElementUint8Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 1, 2, 2 }; const unsigned int shape1[] = { 1, 1, 1, 1 }; @@ -70,13 +73,15 @@ LayerTestResult SubtractionBroadcast1ElementUint8Test( 0, shape0, output, + tensorHandleFactory, 1.0f, 3); } LayerTestResult SubtractionBroadcastUint8Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 1, 2, 2 }; const unsigned int shape1[] = { 1, 1, 2, 1 }; @@ -95,12 +100,14 @@ LayerTestResult SubtractionBroadcastUint8Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult SubtractionTest( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 1, 2, 2 }; const unsigned int shape1[] = { 1, 1, 2, 2 }; @@ -117,12 +124,14 @@ LayerTestResult SubtractionTest( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult SubtractionBroadcast1ElementTest( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 1, 2, 2 }; const unsigned int shape1[] = { 1, 1, 1, 1 }; @@ -141,12 +150,14 @@ LayerTestResult SubtractionBroadcast1ElementTest( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult SubtractionBroadcastTest( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 1, 2, 2 }; const unsigned int shape1[] = { 1, 1, 1, 2 }; @@ -165,12 +176,14 @@ LayerTestResult SubtractionBroadcastTest( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult SubtractionFloat16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { using namespace half_float::literal; @@ -189,12 +202,14 @@ LayerTestResult SubtractionFloat16Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult SubtractionBroadcast1ElementFloat16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { using namespace half_float::literal; @@ -215,12 +230,14 @@ LayerTestResult SubtractionBroadcast1ElementFloat16Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult SubtractionBroadcastFloat16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { using namespace half_float::literal; @@ -241,12 +258,14 @@ LayerTestResult SubtractionBroadcastFloat16Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult SubtractionInt16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape[] = { 1, 1, 2, 2 }; @@ -267,13 +286,15 @@ LayerTestResult SubtractionInt16Test( 0, shape, output, + tensorHandleFactory, 1.0f, 0); } LayerTestResult SubtractionBroadcast1ElementInt16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 1, 2, 2 }; const unsigned int shape1[] = { 1, 1, 1, 1 }; @@ -297,13 +318,15 @@ LayerTestResult SubtractionBroadcast1ElementInt16Test( 0, shape0, output, + tensorHandleFactory, 1.0f, 0); } LayerTestResult SubtractionBroadcastInt16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 1, 2, 2 }; const unsigned int shape1[] = { 1, 1, 2, 1 }; @@ -322,12 +345,14 @@ LayerTestResult SubtractionBroadcastInt16Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult SubtractionInt32Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape[] = { 1, 1, 2, 2 }; @@ -348,13 +373,15 @@ LayerTestResult SubtractionInt32Test( 0, shape, output, + tensorHandleFactory, 1.0f, 0); } LayerTestResult SubtractionBroadcast1ElementInt32Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 1, 2, 2 }; const unsigned int shape1[] = { 1, 1, 1, 1 }; @@ -378,13 +405,15 @@ LayerTestResult SubtractionBroadcast1ElementInt32Test( 0, shape0, output, + tensorHandleFactory, 1.0f, 0); } LayerTestResult SubtractionBroadcastInt32Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 1, 2, 2 }; const unsigned int shape1[] = { 1, 1, 2, 1 }; @@ -403,5 +432,6 @@ LayerTestResult SubtractionBroadcastInt32Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } \ No newline at end of file -- cgit v1.2.1