diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-01-10 17:19:50 +0000 |
---|---|---|
committer | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-01-17 11:09:55 +0000 |
commit | 80943253e63779b61412264ff4c58b406cf061ae (patch) | |
tree | 1d1309d1c2a9ef5a6fceb21237f8117fd250f40a /tests/validation/CL/ChannelCombine.cpp | |
parent | 57016a419c89e737216fd12711e6eba7e030061e (diff) | |
download | ComputeLibrary-80943253e63779b61412264ff4c58b406cf061ae.tar.gz |
COMPMID-1652 CL Cleanup and add missing tests
Change-Id: I359cc0fd0c3fa42ab10a770e59d58704403889b2
Reviewed-on: https://review.mlplatform.org/498
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-by: Isabella Gottardi <isabella.gottardi@arm.com>
Diffstat (limited to 'tests/validation/CL/ChannelCombine.cpp')
-rw-r--r-- | tests/validation/CL/ChannelCombine.cpp | 59 |
1 files changed, 6 insertions, 53 deletions
diff --git a/tests/validation/CL/ChannelCombine.cpp b/tests/validation/CL/ChannelCombine.cpp index fd9049a46a..dca88176ce 100644 --- a/tests/validation/CL/ChannelCombine.cpp +++ b/tests/validation/CL/ChannelCombine.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -42,59 +42,12 @@ namespace test { namespace validation { -namespace -{ -inline void validate_configuration(const TensorShape &shape, Format format) -{ - const int num_planes = num_planes_from_format(format); - - // Create tensors - CLMultiImage dst = create_multi_image<CLMultiImage>(shape, format); - std::vector<CLTensor> ref_src = create_tensor_planes<CLTensor>(shape, format); - - // Create and configure function - CLChannelCombine channel_combine; - - if(num_planes == 1) - { - const CLTensor *tensor_extra = ((Format::RGBA8888 == format) ? &ref_src[3] : nullptr); - - channel_combine.configure(&ref_src[0], &ref_src[1], &ref_src[2], tensor_extra, dst.cl_plane(0)); - } - else - { - channel_combine.configure(&ref_src[0], &ref_src[1], &ref_src[2], &dst); - } - - // TODO(bsgcomp): Add validation for padding and shape (COMPMID-659) -} -} // namespace - TEST_SUITE(CL) TEST_SUITE(ChannelCombine) template <typename T> using CLChannelCombineFixture = ChannelCombineValidationFixture<CLMultiImage, CLTensor, CLAccessor, CLChannelCombine, T>; -TEST_SUITE(Configuration) -DATA_TEST_CASE(RGBA, framework::DatasetMode::ALL, combine(concat(datasets::Small2DShapes(), datasets::Large2DShapes()), framework::dataset::make("FormatType", { Format::RGB888, Format::RGBA8888 })), - shape, format) -{ - validate_configuration(shape, format); -} -DATA_TEST_CASE(YUV, framework::DatasetMode::ALL, combine(concat(datasets::Small2DShapes(), datasets::Large2DShapes()), framework::dataset::make("FormatType", { Format::YUYV422, Format::UYVY422 })), - shape, format) -{ - validate_configuration(shape, format); -} - -DATA_TEST_CASE(YUVPlanar, framework::DatasetMode::ALL, combine(concat(datasets::Small2DShapes(), datasets::Large2DShapes()), framework::dataset::make("FormatType", { Format::IYUV, Format::YUV444, Format::NV12, Format::NV21 })), - shape, format) -{ - validate_configuration(shape, format); -} -TEST_SUITE_END() - TEST_SUITE(RGBA) FIXTURE_DATA_TEST_CASE(RunSmall, CLChannelCombineFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), framework::dataset::make("FormatType", { Format::RGB888, Format::RGBA8888 }))) { @@ -112,7 +65,7 @@ FIXTURE_DATA_TEST_CASE(RunLarge, CLChannelCombineFixture<uint8_t>, framework::Da validate(CLAccessor(*_target.cl_plane(plane_idx)), _reference[plane_idx]); } } -TEST_SUITE_END() +TEST_SUITE_END() // RGBA TEST_SUITE(YUV) FIXTURE_DATA_TEST_CASE(RunSmall, CLChannelCombineFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), framework::dataset::make("FormatType", { Format::YUYV422, Format::UYVY422 }))) @@ -131,7 +84,7 @@ FIXTURE_DATA_TEST_CASE(RunLarge, CLChannelCombineFixture<uint8_t>, framework::Da validate(CLAccessor(*_target.cl_plane(plane_idx)), _reference[plane_idx]); } } -TEST_SUITE_END() +TEST_SUITE_END() // YUV TEST_SUITE(YUVPlanar) FIXTURE_DATA_TEST_CASE(RunSmall, CLChannelCombineFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), framework::dataset::make("FormatType", { Format::NV12, Format::NV21, Format::IYUV, Format::YUV444 }))) @@ -150,10 +103,10 @@ FIXTURE_DATA_TEST_CASE(RunLarge, CLChannelCombineFixture<uint8_t>, framework::Da validate(CLAccessor(*_target.cl_plane(plane_idx)), _reference[plane_idx]); } } -TEST_SUITE_END() +TEST_SUITE_END() // YUVPlanar -TEST_SUITE_END() -TEST_SUITE_END() +TEST_SUITE_END() // ChannelCombine +TEST_SUITE_END() // CL } // namespace validation } // namespace test |