aboutsummaryrefslogtreecommitdiff
path: root/src/backends/backendsCommon/test/layerTests/PermuteTestImpl.hpp
diff options
context:
space:
mode:
authorFinn Williams <Finn.Williams@arm.com>2020-08-27 16:15:20 +0100
committerfinn.williams <finn.williams@arm.com>2020-08-31 15:54:38 +0000
commit826a543547f325bfac7da507d19a55af9c138a50 (patch)
tree84b380534fac9553e35da37f84ed93bc3bf10fd3 /src/backends/backendsCommon/test/layerTests/PermuteTestImpl.hpp
parentc43de6a6a4af212d599824fc783871c440a9fda8 (diff)
downloadarmnn-826a543547f325bfac7da507d19a55af9c138a50.tar.gz
IVGCVSW-5253 Use CreateTensorHandle() function from TensorHandleFactory in the tests for layers M-P
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I324eee7d750e30f714e0d346b7da7b69866ff935
Diffstat (limited to 'src/backends/backendsCommon/test/layerTests/PermuteTestImpl.hpp')
-rw-r--r--src/backends/backendsCommon/test/layerTests/PermuteTestImpl.hpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/backends/backendsCommon/test/layerTests/PermuteTestImpl.hpp b/src/backends/backendsCommon/test/layerTests/PermuteTestImpl.hpp
index 0d66af93e6..74d29f0250 100644
--- a/src/backends/backendsCommon/test/layerTests/PermuteTestImpl.hpp
+++ b/src/backends/backendsCommon/test/layerTests/PermuteTestImpl.hpp
@@ -19,6 +19,7 @@ template<typename T>
LayerTestResult<T, 4> SimplePermuteTestImpl(
armnn::IWorkloadFactory& workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager,
+ const armnn::ITensorHandleFactory& tensorHandleFactory,
armnn::PermuteDescriptor descriptor,
armnn::TensorInfo inputTensorInfo,
armnn::TensorInfo outputTensorInfo,
@@ -31,10 +32,8 @@ LayerTestResult<T, 4> SimplePermuteTestImpl(
LayerTestResult<T, 4> ret(outputTensorInfo);
ret.outputExpected = MakeTensor<T, 4>(outputTensorInfo, outputExpectedData);
- ARMNN_NO_DEPRECATE_WARN_BEGIN
- std::unique_ptr<armnn::ITensorHandle> inputHandle = workloadFactory.CreateTensorHandle(inputTensorInfo);
- std::unique_ptr<armnn::ITensorHandle> outputHandle = workloadFactory.CreateTensorHandle(outputTensorInfo);
- ARMNN_NO_DEPRECATE_WARN_END
+ std::unique_ptr<armnn::ITensorHandle> inputHandle = tensorHandleFactory.CreateTensorHandle(inputTensorInfo);
+ std::unique_ptr<armnn::ITensorHandle> outputHandle = tensorHandleFactory.CreateTensorHandle(outputTensorInfo);
armnn::PermuteQueueDescriptor data;
data.m_Parameters = descriptor;
@@ -59,7 +58,8 @@ LayerTestResult<T, 4> SimplePermuteTestImpl(
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult<T, 4> SimplePermuteTest(
armnn::IWorkloadFactory& workloadFactory,
- const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager)
+ const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager,
+ const armnn::ITensorHandleFactory& tensorHandleFactory)
{
armnn::TensorInfo inputTensorInfo;
armnn::TensorInfo outputTensorInfo;
@@ -100,7 +100,7 @@ LayerTestResult<T, 4> SimplePermuteTest(
},
qScale, qOffset);
- return SimplePermuteTestImpl<T>(workloadFactory, memoryManager,
+ return SimplePermuteTestImpl<T>(workloadFactory, memoryManager, tensorHandleFactory,
descriptor, inputTensorInfo,
outputTensorInfo, input, outputExpected);
}
@@ -108,7 +108,8 @@ LayerTestResult<T, 4> SimplePermuteTest(
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult<T, 4> PermuteValueSet1Test(
armnn::IWorkloadFactory& workloadFactory,
- const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager)
+ const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager,
+ const armnn::ITensorHandleFactory& tensorHandleFactory)
{
armnn::TensorInfo inputTensorInfo;
armnn::TensorInfo outputTensorInfo;
@@ -150,7 +151,7 @@ LayerTestResult<T, 4> PermuteValueSet1Test(
},
qScale, qOffset);
- return SimplePermuteTestImpl<T>(workloadFactory, memoryManager,
+ return SimplePermuteTestImpl<T>(workloadFactory, memoryManager, tensorHandleFactory,
descriptor, inputTensorInfo,
outputTensorInfo, input, outputExpected);
}
@@ -158,7 +159,8 @@ LayerTestResult<T, 4> PermuteValueSet1Test(
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult<T, 4> PermuteValueSet2Test(
armnn::IWorkloadFactory& workloadFactory,
- const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager)
+ const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager,
+ const armnn::ITensorHandleFactory& tensorHandleFactory)
{
armnn::TensorInfo inputTensorInfo;
armnn::TensorInfo outputTensorInfo;
@@ -200,7 +202,7 @@ LayerTestResult<T, 4> PermuteValueSet2Test(
},
qScale, qOffset);
- return SimplePermuteTestImpl<T>(workloadFactory, memoryManager,
+ return SimplePermuteTestImpl<T>(workloadFactory, memoryManager, tensorHandleFactory,
descriptor, inputTensorInfo,
outputTensorInfo, input, outputExpected);
}
@@ -208,7 +210,8 @@ LayerTestResult<T, 4> PermuteValueSet2Test(
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult<T, 4> PermuteValueSet3Test(
armnn::IWorkloadFactory& workloadFactory,
- const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager)
+ const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager,
+ const armnn::ITensorHandleFactory& tensorHandleFactory)
{
armnn::TensorInfo inputTensorInfo;
armnn::TensorInfo outputTensorInfo;
@@ -252,7 +255,7 @@ LayerTestResult<T, 4> PermuteValueSet3Test(
},
qScale, qOffset);
- return SimplePermuteTestImpl<T>(workloadFactory, memoryManager,
+ return SimplePermuteTestImpl<T>(workloadFactory, memoryManager, tensorHandleFactory,
descriptor, inputTensorInfo,
outputTensorInfo, input, outputExpected);
}