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/MinimumTestImpl.cpp | 73 ++++++++++++++-------- 1 file changed, 48 insertions(+), 25 deletions(-) (limited to 'src/backends/backendsCommon/test/layerTests/MinimumTestImpl.cpp') diff --git a/src/backends/backendsCommon/test/layerTests/MinimumTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/MinimumTestImpl.cpp index 371dc27ea0..015d055dcc 100644 --- a/src/backends/backendsCommon/test/layerTests/MinimumTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/MinimumTestImpl.cpp @@ -18,7 +18,8 @@ std::unique_ptr CreateWorkload( LayerTestResult MinimumBroadcast1ElementTest1( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { IgnoreUnused(memoryManager); unsigned int shape0[] = { 1, 2, 2, 2 }; @@ -38,12 +39,14 @@ LayerTestResult MinimumBroadcast1ElementTest1( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult MinimumBroadcast1ElementTest2( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { unsigned int shape0[] = { 1, 2, 2, 2 }; unsigned int shape1[] = { 1, 1, 1, 1 }; @@ -62,12 +65,14 @@ LayerTestResult MinimumBroadcast1ElementTest2( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult MinimumBroadcast1DVectorUint8Test( armnn::IWorkloadFactory & workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr & memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr & memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 2, 2, 3 }; const unsigned int shape1[] = { 1, 1, 1, 3 }; @@ -94,12 +99,14 @@ LayerTestResult MinimumBroadcast1DVectorUint8Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult MinimumFloat16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { using namespace half_float::literal; @@ -131,12 +138,14 @@ LayerTestResult MinimumFloat16Test( shape, input1, shape, - output); + output, + tensorHandleFactory); } LayerTestResult MinimumBroadcast1ElementFloat16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { using namespace half_float::literal; @@ -165,15 +174,16 @@ LayerTestResult MinimumBroadcast1ElementFloat16Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult MinimumBroadcast1DVectorFloat16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { using namespace half_float::literal; - const unsigned int shape0[] = { 1, 2, 2, 3 }; const unsigned int shape1[] = { 1, 1, 1, 3 }; @@ -199,12 +209,14 @@ LayerTestResult MinimumBroadcast1DVectorFloat16Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult MinimumInt16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { unsigned int shape[] = { 2, 2, 2, 2 }; @@ -234,12 +246,14 @@ LayerTestResult MinimumInt16Test( shape, input1, shape, - output); + output, + tensorHandleFactory); } LayerTestResult MinimumBroadcast1ElementInt16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 2, 2, 3 }; const unsigned int shape1[] = { 1, 1, 1, 1 }; @@ -266,12 +280,14 @@ LayerTestResult MinimumBroadcast1ElementInt16Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult MinimumBroadcast1DVectorInt16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 2, 2, 3 }; const unsigned int shape1[] = { 1, 1, 1, 3 }; @@ -298,12 +314,14 @@ LayerTestResult MinimumBroadcast1DVectorInt16Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult MinimumInt32Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { unsigned int shape[] = { 2, 2, 2, 2 }; @@ -333,12 +351,14 @@ LayerTestResult MinimumInt32Test( shape, input1, shape, - output); + output, + tensorHandleFactory); } LayerTestResult MinimumBroadcast1ElementInt32Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 2, 2, 3 }; const unsigned int shape1[] = { 1, 1, 1, 1 }; @@ -365,12 +385,14 @@ LayerTestResult MinimumBroadcast1ElementInt32Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult MinimumBroadcast1DVectorInt32Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int shape0[] = { 1, 2, 2, 3 }; const unsigned int shape1[] = { 1, 1, 1, 3 }; @@ -397,5 +419,6 @@ LayerTestResult MinimumBroadcast1DVectorInt32Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } \ No newline at end of file -- cgit v1.2.1