diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2018-08-31 16:26:25 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:54:54 +0000 |
commit | b57be0da77370e5e71fe82dfa281f528279e8127 (patch) | |
tree | 2e08acec6363b74f840bad04c3b7195a0bd1b300 /tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp | |
parent | a34286ecabf4fc9e66e423332063a3d5fb17b8f8 (diff) | |
download | ComputeLibrary-b57be0da77370e5e71fe82dfa281f528279e8127.tar.gz |
COMPMID-1330: Add support for NormalizePlanarYUV operator in CL
Change-Id: Id0754b9e2bc3ef7ff2c4c21c3b89709588c41bd3
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/146637
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Diffstat (limited to 'tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp')
-rw-r--r-- | tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp b/tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp index e06b19cfea..540a2be143 100644 --- a/tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp +++ b/tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -70,10 +70,46 @@ DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(datasets::Ran validate(dst.info()->valid_region(), valid_region); } +// *INDENT-OFF* +// clang-format off +DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip( + framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), // Mismatching data types + TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), // Window shrink + TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8), // Unsupported data type + TensorInfo(TensorShape(32U, 16U, 8U), 1, DataType::F16), + TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F16), // Mismatching mean and sd shapes + TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), // Mismatching shapes + }), + framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), + TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), + TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8), + TensorInfo(TensorShape(32U, 16U, 8U), 1, DataType::F16), + TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F16), + TensorInfo(TensorShape(30U, 11U, 2U), 1, DataType::F16), + })), + framework::dataset::make("MSTDInfo",{ TensorInfo(TensorShape(2U), 1, DataType::F16), + TensorInfo(TensorShape(2U), 1, DataType::F16), + TensorInfo(TensorShape(2U), 1, DataType::U8), + TensorInfo(TensorShape(8U), 1, DataType::F16), + TensorInfo(TensorShape(6U), 1, DataType::F16), + TensorInfo(TensorShape(2U), 1, DataType::F16), + })), + framework::dataset::make("Expected", { false, false, false, true, false, false })), + input_info, output_info, msd_info, expected) +{ + const auto &mean_info = msd_info; + const auto &sd_info = msd_info; + bool has_error = bool(GCNormalizePlanarYUVLayer::validate(&input_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), &mean_info.clone()->set_is_resizable(false), &sd_info.clone()->set_is_resizable(false))); + ARM_COMPUTE_EXPECT(has_error == expected, framework::LogLevel::ERRORS); +} +// clang-format on +// *INDENT-ON* + TEST_SUITE(Float) TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(Random, GCNormalizePlanarYUVLayerFixture<half>, framework::DatasetMode::PRECOMMIT, combine(datasets::RandomNormalizePlanarYUVLayerDataset(), - framework::dataset::make("DataType", DataType::F16))) +FIXTURE_DATA_TEST_CASE(Random, GCNormalizePlanarYUVLayerFixture<half>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::RandomNormalizePlanarYUVLayerDataset(), + framework::dataset::make("DataType", DataType::F16)), + framework::dataset::make("DataLayout", { DataLayout::NCHW }))) { // Validate output validate(GCAccessor(_target), _reference, tolerance_f16, 0); |