aboutsummaryrefslogtreecommitdiff
path: root/src/backends/backendsCommon/test/layerTests/SubtractionTestImpl.cpp
diff options
context:
space:
mode:
authorKeith Davis <keith.davis@arm.com>2020-08-27 15:38:12 +0100
committerKeithARM <keith.davis@arm.com>2020-08-31 16:05:39 +0000
commit33a626f14c8db13967ba2a933388223d5bf733c3 (patch)
tree109319777c0f638be639d7d723a417abe97d843c /src/backends/backendsCommon/test/layerTests/SubtractionTestImpl.cpp
parent826a543547f325bfac7da507d19a55af9c138a50 (diff)
downloadarmnn-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/SubtractionTestImpl.cpp')
-rw-r--r--src/backends/backendsCommon/test/layerTests/SubtractionTestImpl.cpp78
1 files changed, 54 insertions, 24 deletions
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<armnn::IWorkload> CreateWorkload<armnn::SubtractionQueueDescript
LayerTestResult<uint8_t, 4> 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<uint8_t, 4> SubtractionUint8Test(
0,
shape0,
output,
+ tensorHandleFactory,
1.0f,
0);
}
LayerTestResult<uint8_t, 4> 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<uint8_t, 4> SubtractionBroadcast1ElementUint8Test(
0,
shape0,
output,
+ tensorHandleFactory,
1.0f,
3);
}
LayerTestResult<uint8_t, 4> 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<uint8_t, 4> SubtractionBroadcastUint8Test(
shape1,
input1,
shape0,
- output);
+ output,
+ tensorHandleFactory);
}
LayerTestResult<float, 4> 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<float, 4> SubtractionTest(
shape1,
input1,
shape0,
- output);
+ output,
+ tensorHandleFactory);
}
LayerTestResult<float, 4> 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<float, 4> SubtractionBroadcast1ElementTest(
shape1,
input1,
shape0,
- output);
+ output,
+ tensorHandleFactory);
}
LayerTestResult<float, 4> 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<float, 4> SubtractionBroadcastTest(
shape1,
input1,
shape0,
- output);
+ output,
+ tensorHandleFactory);
}
LayerTestResult<armnn::Half, 4> 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<armnn::Half, 4> SubtractionFloat16Test(
shape1,
input1,
shape0,
- output);
+ output,
+ tensorHandleFactory);
}
LayerTestResult<armnn::Half, 4> 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<armnn::Half, 4> SubtractionBroadcast1ElementFloat16Test(
shape1,
input1,
shape0,
- output);
+ output,
+ tensorHandleFactory);
}
LayerTestResult<armnn::Half, 4> 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<armnn::Half, 4> SubtractionBroadcastFloat16Test(
shape1,
input1,
shape0,
- output);
+ output,
+ tensorHandleFactory);
}
LayerTestResult<int16_t, 4> 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<int16_t, 4> SubtractionInt16Test(
0,
shape,
output,
+ tensorHandleFactory,
1.0f,
0);
}
LayerTestResult<int16_t, 4> 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<int16_t, 4> SubtractionBroadcast1ElementInt16Test(
0,
shape0,
output,
+ tensorHandleFactory,
1.0f,
0);
}
LayerTestResult<int16_t, 4> 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<int16_t, 4> SubtractionBroadcastInt16Test(
shape1,
input1,
shape0,
- output);
+ output,
+ tensorHandleFactory);
}
LayerTestResult<int32_t, 4> 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<int32_t, 4> SubtractionInt32Test(
0,
shape,
output,
+ tensorHandleFactory,
1.0f,
0);
}
LayerTestResult<int32_t, 4> 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<int32_t, 4> SubtractionBroadcast1ElementInt32Test(
0,
shape0,
output,
+ tensorHandleFactory,
1.0f,
0);
}
LayerTestResult<int32_t, 4> 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<int32_t, 4> SubtractionBroadcastInt32Test(
shape1,
input1,
shape0,
- output);
+ output,
+ tensorHandleFactory);
} \ No newline at end of file