diff options
author | SiCong Li <sicong.li@arm.com> | 2023-01-26 17:36:08 +0000 |
---|---|---|
committer | SiCong Li <sicong.li@arm.com> | 2023-01-31 09:36:25 +0000 |
commit | 54eafd86fdeb19f2117271805a01da4395f9ef16 (patch) | |
tree | 2ab4e81699296ff4adaaf6fb73d397c7f2c85617 | |
parent | b609c93e81b1ff60764c5b724f4f5511215c84d6 (diff) | |
download | ComputeLibrary-54eafd86fdeb19f2117271805a01da4395f9ef16.tar.gz |
Sync tolerance number of dynamic fusion direct conv2d with the current library
Add descriptions and pointers in the tests to document the differences
in test coverage between dynamic fusion and the current library, and
most importantly, why the differences. This will come in handy when we
want to quickly check if all old tests have been migrated so that we can
safely deprecate / remove them.
Resolves COMPMID-5840
Signed-off-by: SiCong Li <sicong.li@arm.com>
Change-Id: Ie6227098979e51d7921810288f594beac19bce6f
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9043
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r-- | tests/validation/CL/ConvolutionLayer.cpp | 5 | ||||
-rw-r--r-- | tests/validation/CL/DirectConvolutionLayer.cpp | 3 | ||||
-rw-r--r-- | tests/validation/dynamic_fusion/gpu/cl/DirectConv2d.cpp | 25 |
3 files changed, 31 insertions, 2 deletions
diff --git a/tests/validation/CL/ConvolutionLayer.cpp b/tests/validation/CL/ConvolutionLayer.cpp index 10b67075e2..bced540d2a 100644 --- a/tests/validation/CL/ConvolutionLayer.cpp +++ b/tests/validation/CL/ConvolutionLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2021 Arm Limited. + * Copyright (c) 2017-2021, 2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -39,6 +39,9 @@ #include "tests/validation/Validation.h" #include "tests/validation/fixtures/ConvolutionLayerFixture.h" +/** Synced with tests/validation/dynamic_fusion/gpu/cl/DirectConv2d.cpp + * Please check there for any differences in the coverage + */ namespace arm_compute { namespace test diff --git a/tests/validation/CL/DirectConvolutionLayer.cpp b/tests/validation/CL/DirectConvolutionLayer.cpp index 512c2cab97..342a093ca3 100644 --- a/tests/validation/CL/DirectConvolutionLayer.cpp +++ b/tests/validation/CL/DirectConvolutionLayer.cpp @@ -35,6 +35,9 @@ #include "tests/validation/Validation.h" #include "tests/validation/fixtures/DirectConvolutionLayerFixture.h" +/** Synced with tests/validation/dynamic_fusion/gpu/cl/DirectConv2d.cpp + * Please check there for any differences in the coverage + */ namespace arm_compute { namespace test diff --git a/tests/validation/dynamic_fusion/gpu/cl/DirectConv2d.cpp b/tests/validation/dynamic_fusion/gpu/cl/DirectConv2d.cpp index 45a2270bb3..cccad182ca 100644 --- a/tests/validation/dynamic_fusion/gpu/cl/DirectConv2d.cpp +++ b/tests/validation/dynamic_fusion/gpu/cl/DirectConv2d.cpp @@ -41,14 +41,29 @@ namespace validation { namespace { +/** Tolerances from tests/validation/CL/DirectConvolutionLayer.cpp + */ RelativeTolerance<float> tolerance_f32(0.05f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */ RelativeTolerance<half_float::half> tolerance_f16(half_float::half(0.2)); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */ constexpr float abs_tolerance_f32(0.0001f); /**< Absolute tolerance for FP32 tests*/ -constexpr float tolerance_num = 0.02f; /**< Tolerance number */ +constexpr float tolerance_num = 0.07f; /**< Tolerance number */ } // namespace TEST_SUITE(CL) TEST_SUITE(DYNAMIC_FUSION) +/** Synced with tests/validation/CL/ConvolutionLayer.cpp + * + * Difference | Why the difference + * f32 tolerance here is smaller | To use the same tolerance as that of DirectConv2d; lowering tolerance is safe + * No quantized tests | Not supported yet + * No grouped CNN tests | Not supported yet + * No mixed layout tests | Not needed; only NHWC is supported + * No activation/post op tests | Not needed in fusion + * No ValidateConvolutionMethod | Only a single method (direct conv2d) is supported + * No ReshapeWeights = true tests | Not applicable yet. This parameter only concerns gemm-based conv2d + * No RunSmallWithPadding tests | Padding is removed + * + */ TEST_SUITE(CONV2D) template <typename T> @@ -76,6 +91,14 @@ FIXTURE_DATA_TEST_CASE(RunSmall, DynamicFusionGpuConv2dFixture<half>, framework: TEST_SUITE_END() // FP16 // Tests for specific conv2d methods +/** Synced with tests/validation/CL/DirectConvolutionLayer.cpp + * + * Difference | Why the difference + * No quantized tests | Not supported yet + * No Invalid output size test | Not applicable. Output is removed from the interface + * No mixed layout/NCHW tests | Not needed; only NHWC is supported + * No activation tests | Not needed in fusion + */ TEST_SUITE(DIRECT_CONV2D) // *INDENT-OFF* |