diff options
author | Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> | 2018-10-15 15:00:13 +0100 |
---|---|---|
committer | Matthew Bentham <matthew.bentham@arm.com> | 2018-10-22 16:57:54 +0100 |
commit | fc82431755edb950b46aaeda5725635c1fe7d02d (patch) | |
tree | 0acadb71dbd2ff1213e9ab2ebd9fa4cc696f1b73 /src/backends/neon/test | |
parent | bcf9f16605e8ce084a0c188abd16ee2bd56e59f4 (diff) | |
download | armnn-fc82431755edb950b46aaeda5725635c1fe7d02d.tar.gz |
IVGCVSW-2003: Get rid of IsLayerSupportedNeon functions in favor of ILayerSupport interface
Change-Id: I03985ff678acf9393680340638a2e1f425b9966f
Diffstat (limited to 'src/backends/neon/test')
-rw-r--r-- | src/backends/neon/test/NeonLayerTests.cpp | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/src/backends/neon/test/NeonLayerTests.cpp b/src/backends/neon/test/NeonLayerTests.cpp index 36138b3c3f..31ee7d87c1 100644 --- a/src/backends/neon/test/NeonLayerTests.cpp +++ b/src/backends/neon/test/NeonLayerTests.cpp @@ -154,78 +154,79 @@ BOOST_AUTO_TEST_CASE(DepthwiseConv2dUtils) armnn::TensorInfo biasesInfo; armnn::DepthwiseConvolution2dDescriptor descriptor; + armnn::NeonLayerSupport layerSupport; // Strides supported: 1,2,3 descriptor = MakeDepthwiseConv2dDesc(1, 1); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(armnn::IsDepthwiseConvolutionSupportedNeon(inputInfo, outputInfo, descriptor, - weightsInfo3x3, biasesInfo)); + BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(1, 2); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(armnn::IsDepthwiseConvolutionSupportedNeon(inputInfo, outputInfo, descriptor, - weightsInfo3x3, biasesInfo)); + BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(1, 3); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(armnn::IsDepthwiseConvolutionSupportedNeon(inputInfo, outputInfo, descriptor, - weightsInfo3x3, biasesInfo)); + BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(2, 1); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(armnn::IsDepthwiseConvolutionSupportedNeon(inputInfo, outputInfo, descriptor, - weightsInfo3x3, biasesInfo)); + BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(2, 2); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(armnn::IsDepthwiseConvolutionSupportedNeon(inputInfo, outputInfo, descriptor, - weightsInfo3x3, biasesInfo)); + BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(2, 3); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(armnn::IsDepthwiseConvolutionSupportedNeon(inputInfo, outputInfo, descriptor, - weightsInfo3x3, biasesInfo)); + BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(3, 1); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(armnn::IsDepthwiseConvolutionSupportedNeon(inputInfo, outputInfo, descriptor, - weightsInfo3x3, biasesInfo)); + BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(3, 2); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(armnn::IsDepthwiseConvolutionSupportedNeon(inputInfo, outputInfo, descriptor, - weightsInfo3x3, biasesInfo)); + BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(3, 3); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(armnn::IsDepthwiseConvolutionSupportedNeon(inputInfo, outputInfo, descriptor, - weightsInfo3x3, biasesInfo)); + BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + weightsInfo3x3, biasesInfo)); // Supported stride 4 descriptor = MakeDepthwiseConv2dDesc(4, 1); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(armnn::IsDepthwiseConvolutionSupportedNeon(inputInfo, outputInfo, descriptor, - weightsInfo3x3, biasesInfo)); + BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + weightsInfo3x3, biasesInfo)); // Supported weights shape 1x1 armnn::TensorInfo weightsInfo1x1({ 1, 1, 1, 1 }, armnn::DataType::Float32); descriptor = MakeDepthwiseConv2dDesc(1, 1); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo1x1, descriptor, dataType); - BOOST_TEST(armnn::IsDepthwiseConvolutionSupportedNeon(inputInfo, outputInfo, descriptor, - weightsInfo1x1, biasesInfo)); + BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + weightsInfo1x1, biasesInfo)); // Supported shape 2x2 armnn::TensorInfo weightsInfo2x2({ 1, 1, 2, 2 }, armnn::DataType::Float32); descriptor = MakeDepthwiseConv2dDesc(1, 1); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo2x2, descriptor, dataType); - BOOST_TEST(armnn::IsDepthwiseConvolutionSupportedNeon(inputInfo, outputInfo, descriptor, - weightsInfo2x2, biasesInfo)); + BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + weightsInfo2x2, biasesInfo)); // Asymmetric padding descriptor = MakeDepthwiseConv2dDesc(1, 1, 1, 1, 2, 1, 2); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(armnn::IsDepthwiseConvolutionSupportedNeon(inputInfo, outputInfo, descriptor, - weightsInfo3x3, biasesInfo)); + BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + weightsInfo3x3, biasesInfo)); } // Pooling @@ -298,7 +299,8 @@ BOOST_AUTO_TEST_CASE(Softmax4dSupport) const armnn::TensorInfo outputInfo(numDimensions, &dimensionSizes.front(), armnn::DataType::Float32); // 4D Softmax should be reported as unsupported on the NEON backend - BOOST_TEST(!armnn::IsSoftmaxSupportedNeon(inputInfo, outputInfo, armnn::SoftmaxDescriptor())); + armnn::NeonLayerSupport layerSupport; + BOOST_TEST(!layerSupport.IsSoftmaxSupported(inputInfo, outputInfo, armnn::SoftmaxDescriptor())); } // Splitter |