diff options
author | Keith Davis <keith.davis@arm.com> | 2020-08-27 15:38:12 +0100 |
---|---|---|
committer | KeithARM <keith.davis@arm.com> | 2020-08-31 16:05:39 +0000 |
commit | 33a626f14c8db13967ba2a933388223d5bf733c3 (patch) | |
tree | 109319777c0f638be639d7d723a417abe97d843c /src/backends/backendsCommon/test/layerTests/DivisionTestImpl.cpp | |
parent | 826a543547f325bfac7da507d19a55af9c138a50 (diff) | |
download | armnn-33a626f14c8db13967ba2a933388223d5bf733c3.tar.gz |
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 <keith.davis@arm.com>
Change-Id: Id1d15a0960233026aecf7a07e0d3f006e07e4abf
Diffstat (limited to 'src/backends/backendsCommon/test/layerTests/DivisionTestImpl.cpp')
-rw-r--r-- | src/backends/backendsCommon/test/layerTests/DivisionTestImpl.cpp | 90 |
1 files changed, 61 insertions, 29 deletions
diff --git a/src/backends/backendsCommon/test/layerTests/DivisionTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/DivisionTestImpl.cpp index c52c5ce9f2..f3688347d2 100644 --- a/src/backends/backendsCommon/test/layerTests/DivisionTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/DivisionTestImpl.cpp @@ -18,7 +18,8 @@ std::unique_ptr<armnn::IWorkload> CreateWorkload<armnn::DivisionQueueDescriptor> LayerTestResult<float, 4> DivisionByZeroTest( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { IgnoreUnused(memoryManager); const unsigned int width = 2u; @@ -54,12 +55,14 @@ LayerTestResult<float, 4> DivisionByZeroTest( shape, input1, shape, - output); + output, + tensorHandleFactory); } LayerTestResult<float, 4> DivisionTest( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int width = 2u; const unsigned int height = 2u; @@ -94,12 +97,14 @@ LayerTestResult<float, 4> DivisionTest( shape, input1, shape, - output); + output, + tensorHandleFactory); } LayerTestResult<float, 4> DivisionBroadcast1ElementTest( 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 }; @@ -118,12 +123,14 @@ LayerTestResult<float, 4> DivisionBroadcast1ElementTest( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult<float, 4> DivisionBroadcast1DVectorTest( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { unsigned int shape0[] = { 1, 3, 3, 2 }; unsigned int shape1[] = { 1, 1, 1, 2 }; @@ -152,12 +159,14 @@ LayerTestResult<float, 4> DivisionBroadcast1DVectorTest( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult<armnn::Half, 4> DivisionFloat16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { using namespace half_float::literal; @@ -194,12 +203,14 @@ LayerTestResult<armnn::Half, 4> DivisionFloat16Test( shape, input1, shape, - output); + output, + tensorHandleFactory); } LayerTestResult<armnn::Half, 4> DivisionBroadcast1ElementFloat16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { using namespace half_float::literal; @@ -220,12 +231,14 @@ LayerTestResult<armnn::Half, 4> DivisionBroadcast1ElementFloat16Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult<armnn::Half, 4> DivisionBroadcast1DVectorFloat16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { using namespace half_float::literal; @@ -256,12 +269,14 @@ LayerTestResult<armnn::Half, 4> DivisionBroadcast1DVectorFloat16Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult<uint8_t, 4> DivisionUint8Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int width = 2u; const unsigned int height = 2u; @@ -297,13 +312,15 @@ LayerTestResult<uint8_t, 4> DivisionUint8Test( input1, shape, output, + tensorHandleFactory, 0.25f, 0); } LayerTestResult<uint8_t, 4> DivisionBroadcast1ElementUint8Test( 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 }; @@ -322,12 +339,14 @@ LayerTestResult<uint8_t, 4> DivisionBroadcast1ElementUint8Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult<uint8_t, 4> DivisionBroadcast1DVectorUint8Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { unsigned int shape0[] = { 1, 3, 3, 2 }; unsigned int shape1[] = { 1, 1, 1, 2 }; @@ -356,12 +375,14 @@ LayerTestResult<uint8_t, 4> DivisionBroadcast1DVectorUint8Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult<int16_t,4> DivisionInt16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { unsigned int shape[] = { 2, 2, 2, 2 }; @@ -392,13 +413,15 @@ LayerTestResult<int16_t,4> DivisionInt16Test( input1, shape, output, + tensorHandleFactory, 0.25f, 0); } LayerTestResult<int16_t, 4> DivisionBroadcast1ElementInt16Test( 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 }; @@ -417,12 +440,14 @@ LayerTestResult<int16_t, 4> DivisionBroadcast1ElementInt16Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult<int16_t, 4> DivisionBroadcast1DVectorInt16Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { unsigned int shape0[] = { 1, 3, 3, 2 }; unsigned int shape1[] = { 1, 1, 1, 2 }; @@ -451,12 +476,14 @@ LayerTestResult<int16_t, 4> DivisionBroadcast1DVectorInt16Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult<int32_t, 4> DivisionInt32Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { const unsigned int width = 2u; const unsigned int height = 2u; @@ -493,13 +520,15 @@ LayerTestResult<int32_t, 4> DivisionInt32Test( input1, shape, output, + tensorHandleFactory, 1.f, 0); } LayerTestResult<int32_t, 4> DivisionBroadcast1ElementInt32Test( 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 }; @@ -518,12 +547,14 @@ LayerTestResult<int32_t, 4> DivisionBroadcast1ElementInt32Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); } LayerTestResult<int32_t, 4> DivisionBroadcast1DVectorInt32Test( armnn::IWorkloadFactory& workloadFactory, - const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) + const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, + const armnn::ITensorHandleFactory& tensorHandleFactory) { unsigned int shape0[] = { 1, 3, 3, 2 }; unsigned int shape1[] = { 1, 1, 1, 2 }; @@ -552,5 +583,6 @@ LayerTestResult<int32_t, 4> DivisionBroadcast1DVectorInt32Test( shape1, input1, shape0, - output); + output, + tensorHandleFactory); }
\ No newline at end of file |