From d041a835041159a0a6744fc271df15e9f66167bc Mon Sep 17 00:00:00 2001 From: Pablo Tello Date: Wed, 3 Oct 2018 17:11:09 +0100 Subject: COMPMID-1610: Fixed CLDirectConvolution mismatches Kernel size 5x5 layout NHWC. Change-Id: Ia82ff211d1c954df228962b5c2c5ad8df7112449 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/151740 Reviewed-by: Michalis Spyrou Tested-by: bsgcomp --- tests/validation/CL/DirectConvolutionLayer.cpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'tests/validation/CL/DirectConvolutionLayer.cpp') diff --git a/tests/validation/CL/DirectConvolutionLayer.cpp b/tests/validation/CL/DirectConvolutionLayer.cpp index e29ec7ef4c..9db73820c2 100644 --- a/tests/validation/CL/DirectConvolutionLayer.cpp +++ b/tests/validation/CL/DirectConvolutionLayer.cpp @@ -44,23 +44,20 @@ namespace validation namespace { // COMPMID-517 Invesitgate the mismatch to see whether it is a real bug -RelativeTolerance tolerance_fp16(half(0.2)); /**< Tolerance for floating point tests */ -RelativeTolerance tolerance_fp32(0.02f); /**< Tolerance for floating point tests */ -constexpr float tolerance_num = 0.07f; /**< Tolerance number */ +RelativeTolerance tolerance_fp16(half(0.2)); /**< Tolerance for floating point tests */ +RelativeTolerance tolerance_fp32(0.02f); /**< Tolerance for floating point tests */ +constexpr float tolerance_num = 0.07f; /**< Tolerance number */ +constexpr AbsoluteTolerance tolerance_qasymm8(1); /**< Tolerance for quantized tests */ -constexpr AbsoluteTolerance tolerance_qasymm8(1); /**< Tolerance for quantized tests */ +const auto data_strides = combine(framework::dataset::make("StrideX", 1, 3), framework::dataset::make("StrideY", 1, 3)); +const auto data_ksize_one = combine(framework::dataset::make("PadX", 0, 1), combine(framework::dataset::make("PadY", 0, 1), framework::dataset::make("KernelSize", 1))); +const auto data_ksize_three = combine(framework::dataset::make("PadX", 0, 2), combine(framework::dataset::make("PadY", 0, 2), framework::dataset::make("KernelSize", 3))); +const auto data_ksize_five = combine(framework::dataset::make("PadX", 0, 3), combine(framework::dataset::make("PadY", 0, 3), framework::dataset::make("KernelSize", 5))); +const auto data_all_kernels = concat(concat(data_ksize_one, data_ksize_three), data_ksize_five); /** Direct convolution data set. */ const auto data = combine(datasets::SmallDirectConvolutionShapes(), - combine(framework::dataset::make("StrideX", 1, 3), - combine(framework::dataset::make("StrideY", 1, 3), - combine(concat(combine(framework::dataset::make("PadX", 0, 1), - combine(framework::dataset::make("PadY", 0, 1), - framework::dataset::make("KernelSize", 1))), - combine(framework::dataset::make("PadX", 0, 2), - combine(framework::dataset::make("PadY", 0, 2), - framework::dataset::make("KernelSize", { 3, 5 })))), - framework::dataset::make("NumKernels", { 1, 4, 8, 16 }))))); + combine(data_strides, combine(data_all_kernels, framework::dataset::make("NumKernels", { 1, 4, 8, 16 })))); /** Activation function Dataset*/ const auto ActivationFunctionsDataset = framework::dataset::make("ActivationInfo", @@ -174,7 +171,6 @@ FIXTURE_DATA_TEST_CASE(Run, CLDirectConvolutionLayerFixture, framework::D ActivationFunctionsDataset), framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }))) { - // Validate output validate(CLAccessor(_target), _reference, tolerance_fp32); } TEST_SUITE_END() -- cgit v1.2.1