aboutsummaryrefslogtreecommitdiff
path: root/tests/validation
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-09-22 13:44:05 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitc26ecf8ca13205cab2ce43d9f971e1569808e5bc (patch)
treecfb20ea424a8bd9f4b7e1cba2476f8020931e8f0 /tests/validation
parentbeabe3bdf47306d0940ddf2ddf52ada6903a0875 (diff)
downloadComputeLibrary-c26ecf8ca13205cab2ce43d9f971e1569808e5bc.tar.gz
COMPIMID-523: Fix CLDepthwiseConvolution test.
The specified output size of the failing test case was invalid. Additionally the kernel has been cleaned up and asserts have been added in case of invalid configurations. Change-Id: I198f3574f003b71968e4081a54cf102d748af5c1 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/88821 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Steven Niu <steven.niu@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/validation')
-rw-r--r--tests/validation/CL/DepthwiseConvolution.cpp18
-rw-r--r--tests/validation/CL/DepthwiseSeparableConvolutionLayer.cpp5
-rw-r--r--tests/validation/fixtures/DepthwiseConvolutionFixture.h2
3 files changed, 19 insertions, 6 deletions
diff --git a/tests/validation/CL/DepthwiseConvolution.cpp b/tests/validation/CL/DepthwiseConvolution.cpp
index 1646ab6157..5f1bde81dd 100644
--- a/tests/validation/CL/DepthwiseConvolution.cpp
+++ b/tests/validation/CL/DepthwiseConvolution.cpp
@@ -51,16 +51,30 @@ TEST_SUITE(DepthwiseConvolutionLayer)
template <typename T>
using CLDepthwiseConvolutionFixture = DepthwiseConvolutionValidationFixture<CLTensor, CLAccessor, CLDepthwiseConvolution, T>;
-// FIXME: COMPMID-523 fix the bug in depthwise convolution
+TEST_SUITE(Generic)
FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionFixture<float>, framework::DatasetMode::PRECOMMIT, datasets::SmallDepthwiseConvolutionDataset())
{
validate(CLAccessor(_target), _reference, tolerance_f32);
}
-
FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionFixture<float>, framework::DatasetMode::NIGHTLY, datasets::LargeDepthwiseConvolutionDataset())
{
validate(CLAccessor(_target), _reference, tolerance_f32);
}
+TEST_SUITE_END()
+
+template <typename T>
+using CLDepthwiseConvolutionFixture3x3 = DepthwiseConvolutionValidationFixture<CLTensor, CLAccessor, CLDepthwiseConvolution3x3, T>;
+
+TEST_SUITE(W3x3)
+FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionFixture3x3<float>, framework::DatasetMode::PRECOMMIT, datasets::SmallDepthwiseConvolutionDataset3x3())
+{
+ validate(CLAccessor(_target), _reference, tolerance_f32);
+}
+FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionFixture3x3<float>, framework::DatasetMode::NIGHTLY, datasets::LargeDepthwiseConvolutionDataset3x3())
+{
+ validate(CLAccessor(_target), _reference, tolerance_f32);
+}
+TEST_SUITE_END()
TEST_SUITE_END()
TEST_SUITE_END()
diff --git a/tests/validation/CL/DepthwiseSeparableConvolutionLayer.cpp b/tests/validation/CL/DepthwiseSeparableConvolutionLayer.cpp
index f0e30cd50f..4d9f6b89c2 100644
--- a/tests/validation/CL/DepthwiseSeparableConvolutionLayer.cpp
+++ b/tests/validation/CL/DepthwiseSeparableConvolutionLayer.cpp
@@ -53,9 +53,8 @@ TEST_SUITE(DepthwiseSeparableConvolutionLayer)
template <typename T>
using CLDepthwiseSeparableConvolutionLayerFixture = DepthwiseSeparableConvolutionValidationFixture<CLTensor, CLAccessor, CLDepthwiseSeparableConvolutionLayer, T>;
-//
-// FIXME: COMPMID-523 fix the bug in depthwise convolution
-DISABLED_FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseSeparableConvolutionLayerFixture<float>, framework::DatasetMode::PRECOMMIT, datasets::MobileNetDepthwiseSeparableConvolutionLayerDataset())
+
+FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseSeparableConvolutionLayerFixture<float>, framework::DatasetMode::PRECOMMIT, datasets::MobileNetDepthwiseSeparableConvolutionLayerDataset())
{
// Validate output
validate(CLAccessor(_target), _reference, tolerance_f32, tolerance_num);
diff --git a/tests/validation/fixtures/DepthwiseConvolutionFixture.h b/tests/validation/fixtures/DepthwiseConvolutionFixture.h
index 462c0f888c..4a890f6333 100644
--- a/tests/validation/fixtures/DepthwiseConvolutionFixture.h
+++ b/tests/validation/fixtures/DepthwiseConvolutionFixture.h
@@ -78,7 +78,7 @@ protected:
TensorType dst = create_tensor<TensorType>(output_shape, DataType::F32);
// Create Depthwise Convolution configure function
- CLDepthwiseConvolution depthwise_convolution;
+ FunctionType depthwise_convolution;
depthwise_convolution.configure(&src, &dst, &weights, pad_stride_info);
// Allocate tensors