From 623069d554d9eaeaf26a80d800818b027b294211 Mon Sep 17 00:00:00 2001 From: Francis Murtagh Date: Fri, 14 Aug 2020 17:24:39 +0100 Subject: IVGCVSW-5218 Remove CreateTensorHandle from DetectionPostProcess and Prelu * Remove default arguments in Neon and CL causing ambiguity Signed-off-by: Francis Murtagh Change-Id: I314885719a16311b68c7bda37cd54b2ca0d14480 --- .../test/layerTests/DetectionPostProcessTestImpl.hpp | 15 ++++++++------- .../backendsCommon/test/layerTests/PreluTestImpl.hpp | 10 ++++++---- 2 files changed, 14 insertions(+), 11 deletions(-) (limited to 'src/backends/backendsCommon/test/layerTests') diff --git a/src/backends/backendsCommon/test/layerTests/DetectionPostProcessTestImpl.hpp b/src/backends/backendsCommon/test/layerTests/DetectionPostProcessTestImpl.hpp index b8a241dfe6..34ff31effc 100644 --- a/src/backends/backendsCommon/test/layerTests/DetectionPostProcessTestImpl.hpp +++ b/src/backends/backendsCommon/test/layerTests/DetectionPostProcessTestImpl.hpp @@ -153,6 +153,7 @@ void DetectionPostProcessImpl(const armnn::TensorInfo& boxEncodingsInfo, auto memoryManager = WorkloadFactoryHelper::GetMemoryManager(); FactoryType workloadFactory = WorkloadFactoryHelper::GetFactory(memoryManager); + auto tensorHandleFactory = WorkloadFactoryHelper::GetTensorHandleFactory(memoryManager); auto boxEncodings = MakeTensor(boxEncodingsInfo, boxEncodingsData); auto scores = MakeTensor(scoresInfo, scoresData); @@ -172,13 +173,13 @@ void DetectionPostProcessImpl(const armnn::TensorInfo& boxEncodingsInfo, LayerTestResult numDetectionsResult(numDetectionInfo); numDetectionsResult.outputExpected = MakeTensor(numDetectionInfo, expectedNumDetections); - std::unique_ptr boxedHandle = workloadFactory.CreateTensorHandle(boxEncodingsInfo); - std::unique_ptr scoreshandle = workloadFactory.CreateTensorHandle(scoresInfo); - std::unique_ptr anchorsHandle = workloadFactory.CreateTensorHandle(anchorsInfo); - std::unique_ptr outputBoxesHandle = workloadFactory.CreateTensorHandle(detectionBoxesInfo); - std::unique_ptr classesHandle = workloadFactory.CreateTensorHandle(detectionClassesInfo); - std::unique_ptr outputScoresHandle = workloadFactory.CreateTensorHandle(detectionScoresInfo); - std::unique_ptr numDetectionHandle = workloadFactory.CreateTensorHandle(numDetectionInfo); + auto boxedHandle = tensorHandleFactory.CreateTensorHandle(boxEncodingsInfo); + auto scoreshandle = tensorHandleFactory.CreateTensorHandle(scoresInfo); + auto anchorsHandle = tensorHandleFactory.CreateTensorHandle(anchorsInfo); + auto outputBoxesHandle = tensorHandleFactory.CreateTensorHandle(detectionBoxesInfo); + auto classesHandle = tensorHandleFactory.CreateTensorHandle(detectionClassesInfo); + auto outputScoresHandle = tensorHandleFactory.CreateTensorHandle(detectionScoresInfo); + auto numDetectionHandle = tensorHandleFactory.CreateTensorHandle(numDetectionInfo); armnn::ScopedCpuTensorHandle anchorsTensor(anchorsInfo); AllocateAndCopyDataToITensorHandle(&anchorsTensor, &anchors[0][0]); diff --git a/src/backends/backendsCommon/test/layerTests/PreluTestImpl.hpp b/src/backends/backendsCommon/test/layerTests/PreluTestImpl.hpp index 3b6c2d8412..de0b27b6c1 100644 --- a/src/backends/backendsCommon/test/layerTests/PreluTestImpl.hpp +++ b/src/backends/backendsCommon/test/layerTests/PreluTestImpl.hpp @@ -15,11 +15,12 @@ #include #include +#include #include #include -template> +template> LayerTestResult PreluTest( armnn::IWorkloadFactory& workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) @@ -76,9 +77,10 @@ LayerTestResult PreluTest( outputTensorInfo.GetQuantizationScale(), outputTensorInfo.GetQuantizationOffset())); - std::unique_ptr inputHandle = workloadFactory.CreateTensorHandle(inputTensorInfo); - std::unique_ptr alphaHandle = workloadFactory.CreateTensorHandle(alphaTensorInfo); - std::unique_ptr outputHandle = workloadFactory.CreateTensorHandle(outputTensorInfo); + auto tensorHandleFactory = WorkloadFactoryHelper::GetTensorHandleFactory(memoryManager); + std::unique_ptr inputHandle = tensorHandleFactory.CreateTensorHandle(inputTensorInfo); + std::unique_ptr alphaHandle = tensorHandleFactory.CreateTensorHandle(alphaTensorInfo); + std::unique_ptr outputHandle = tensorHandleFactory.CreateTensorHandle(outputTensorInfo); armnn::PreluQueueDescriptor descriptor; armnn::WorkloadInfo info; -- cgit v1.2.1