diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2021-06-10 18:24:34 +0100 |
---|---|---|
committer | Sadik Armagan <sadik.armagan@arm.com> | 2021-06-11 10:33:16 +0000 |
commit | 1625efc870f1a8b7c6e6382277ddbb245f91a294 (patch) | |
tree | 39fbbaa15ed7eb81337b082c2d20b0af68b91c02 /src/backends/neon/test/NeonLayerTests.cpp | |
parent | 958e0ba61e940a8d11955cf2a10f681c7c47e1fa (diff) | |
download | armnn-1625efc870f1a8b7c6e6382277ddbb245f91a294.tar.gz |
IVGCVSW-5963 'Move unit tests to new framework'
* Used doctest in ArmNN unit tests
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: Ia9cf5fc72775878885c5f864abf2c56b3a935f1a
Diffstat (limited to 'src/backends/neon/test/NeonLayerTests.cpp')
-rw-r--r-- | src/backends/neon/test/NeonLayerTests.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/backends/neon/test/NeonLayerTests.cpp b/src/backends/neon/test/NeonLayerTests.cpp index d12817e159..edc8cb995c 100644 --- a/src/backends/neon/test/NeonLayerTests.cpp +++ b/src/backends/neon/test/NeonLayerTests.cpp @@ -14,10 +14,10 @@ #include <backendsCommon/test/ActivationFixture.hpp> #include <backendsCommon/test/LayerTests.hpp> -#include <boost/test/unit_test.hpp> - -BOOST_AUTO_TEST_SUITE(Compute_ArmComputeNeon) +#include <doctest/doctest.h> +TEST_SUITE("Compute_ArmComputeNeon") +{ using namespace armnn; using FactoryType = NeonWorkloadFactory; @@ -308,7 +308,7 @@ TensorInfo CreateOutputTensorInfo(const TensorInfo& inputInfo, } } -BOOST_AUTO_TEST_CASE(DepthwiseConv2dUtils) +TEST_CASE("DepthwiseConv2dUtils") { const DataType dataType = DataType::Float32; @@ -323,73 +323,73 @@ BOOST_AUTO_TEST_CASE(DepthwiseConv2dUtils) // Strides supported: 1,2,3 descriptor = MakeDepthwiseConv2dDesc(1, 1); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + CHECK(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(1, 2); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + CHECK(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(1, 3); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + CHECK(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(2, 1); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + CHECK(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(2, 2); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + CHECK(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(2, 3); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + CHECK(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(3, 1); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + CHECK(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(3, 2); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + CHECK(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, weightsInfo3x3, biasesInfo)); descriptor = MakeDepthwiseConv2dDesc(3, 3); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + CHECK(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, weightsInfo3x3, biasesInfo)); // Supported stride 4 descriptor = MakeDepthwiseConv2dDesc(4, 1); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType); - BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + CHECK(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, weightsInfo3x3, biasesInfo)); // Supported weights shape 1x1 TensorInfo weightsInfo1x1({ 1, 1, 1, 1 }, DataType::Float32); descriptor = MakeDepthwiseConv2dDesc(1, 1); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo1x1, descriptor, dataType); - BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + CHECK(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, weightsInfo1x1, biasesInfo)); // Supported shape 2x2 TensorInfo weightsInfo2x2({ 1, 1, 2, 2 }, DataType::Float32); descriptor = MakeDepthwiseConv2dDesc(1, 1); outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo2x2, descriptor, dataType); - BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + CHECK(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(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, + CHECK(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor, weightsInfo3x3, biasesInfo)); } @@ -1498,4 +1498,4 @@ ARMNN_COMPARE_REF_FIXTURE_TEST_CASE_WITH_THF(CompareEluActivationWithReference, #endif -BOOST_AUTO_TEST_SUITE_END() +} |