diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2021-02-16 15:15:19 +0000 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-02-23 18:21:55 +0000 |
commit | ceaa0bfe219631b5a4e638613f90f9fa47a3defe (patch) | |
tree | 3bb878645ae7509f7807197d320a02882ad84751 /tests | |
parent | c40562d4467e3a68b0dac5e865570c8f38d1487e (diff) | |
download | ComputeLibrary-ceaa0bfe219631b5a4e638613f90f9fa47a3defe.tar.gz |
Remove OpenGL ES support
Remove the following:
- Relevant backend kernels
- Relevant backend functions
- Relevant backend validation tests
- Relevant backend specific examples
- Remove backend support from Graph API
- Remove backend support from build system
Update documentation
Resolves: COMPMID-4149
Change-Id: Id0621d6ee35169754de458103907aaba4ef770c0
Signed-off-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5097
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'tests')
32 files changed, 4 insertions, 2379 deletions
diff --git a/tests/GLES_COMPUTE/GCAccessor.h b/tests/GLES_COMPUTE/GCAccessor.h deleted file mode 100644 index 65df0a5ddc..0000000000 --- a/tests/GLES_COMPUTE/GCAccessor.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_TEST_GCACCESSOR_H -#define ARM_COMPUTE_TEST_GCACCESSOR_H - -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "tests/IAccessor.h" - -namespace arm_compute -{ -namespace test -{ -/** Accessor implementation for @ref GCTensor objects. */ -class GCAccessor : public IAccessor -{ -public: - /** Create an accessor for the given @p tensor. - * - * @param[in, out] tensor To be accessed tensor. - * - * @note The GLES memory is mapped by the constructor. - * - */ - GCAccessor(GCTensor &tensor); - - /** Prevent instances of this class from being copy constructed */ - GCAccessor(const GCAccessor &) = delete; - /** Prevent instances of this class from being copied */ - GCAccessor &operator=(const GCAccessor &) = delete; - /** Allow instances of this class to be move constructed */ - GCAccessor(GCAccessor &&) = default; - /** Prevent instances of this class to be moved */ - GCAccessor &operator=(GCAccessor &&) = delete; - - /** Destructor that unmaps the GLES memory. */ - ~GCAccessor(); - - TensorShape shape() const override; - size_t element_size() const override; - size_t size() const override; - Format format() const override; - DataLayout data_layout() const override; - DataType data_type() const override; - int num_channels() const override; - int num_elements() const override; - PaddingSize padding() const override; - QuantizationInfo quantization_info() const override; - const void *operator()(const Coordinates &coord) const override; - void *operator()(const Coordinates &coord) override; - -private: - GCTensor &_tensor; -}; - -inline GCAccessor::GCAccessor(GCTensor &tensor) - : _tensor{ tensor } -{ - _tensor.map(); -} - -inline GCAccessor::~GCAccessor() -{ - _tensor.unmap(); -} - -inline TensorShape GCAccessor::shape() const -{ - return _tensor.info()->tensor_shape(); -} - -inline size_t GCAccessor::element_size() const -{ - return _tensor.info()->element_size(); -} - -inline size_t GCAccessor::size() const -{ - return _tensor.info()->total_size(); -} - -inline Format GCAccessor::format() const -{ - return _tensor.info()->format(); -} - -inline DataLayout GCAccessor::data_layout() const -{ - return _tensor.info()->data_layout(); -} - -inline DataType GCAccessor::data_type() const -{ - return _tensor.info()->data_type(); -} - -inline int GCAccessor::num_channels() const -{ - return _tensor.info()->num_channels(); -} - -inline int GCAccessor::num_elements() const -{ - return _tensor.info()->tensor_shape().total_size(); -} - -inline PaddingSize GCAccessor::padding() const -{ - return _tensor.info()->padding(); -} - -inline QuantizationInfo GCAccessor::quantization_info() const -{ - return _tensor.info()->quantization_info(); -} - -inline const void *GCAccessor::operator()(const Coordinates &coord) const -{ - return _tensor.ptr_to_element(coord); -} - -inline void *GCAccessor::operator()(const Coordinates &coord) -{ - return _tensor.ptr_to_element(coord); -} -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_GCACCESSOR_H */ diff --git a/tests/GLES_COMPUTE/Helper.h b/tests/GLES_COMPUTE/Helper.h deleted file mode 100644 index fb1679e3ff..0000000000 --- a/tests/GLES_COMPUTE/Helper.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2017-2019 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_TEST_GC_HELPER_H -#define ARM_COMPUTE_TEST_GC_HELPER_H - -#include "tests/Globals.h" - -#include "arm_compute/core/ITensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" - -#include <iostream> - -namespace arm_compute -{ -namespace test -{ -/** Helper to create an empty tensor. - * - * @param[in] shape Desired shape. - * @param[in] data_type Desired data type. - * @param[in] num_channels (Optional) It indicates the number of channels for each tensor element - * - * @return Empty @ref GCTensor with the specified shape and data type. - */ -inline GCTensor create_tensor(const TensorShape &shape, DataType data_type, int num_channels = 1) -{ - GCTensor tensor; - tensor.allocator()->init(TensorInfo(shape, num_channels, data_type)); - - return tensor; -} - -/** Helper to create an empty tensor. - * - * @param[in] name File name from which to get the dimensions. - * @param[in] data_type Desired data type. - * - * @return Empty @ref GCTensor with the specified shape and data type. - */ -inline GCTensor create_tensor(const std::string &name, DataType data_type) -{ - constexpr unsigned int num_channels = 1; - - const RawTensor &raw = library->get(name); - - GCTensor tensor; - tensor.allocator()->init(TensorInfo(raw.shape(), num_channels, data_type)); - - return tensor; -} - -/** Helper to print tensor. - * - * @param[in] tensor Tensor to print. - * @param[in] name Tensor name. - * @param[in] info Format information. - * - * @return Empty @ref GCTensor with the specified shape and data type. - */ -inline void print_tensor(ITensor &tensor, const std::string &name, IOFormatInfo info = IOFormatInfo(IOFormatInfo::PrintRegion::Full)) -{ - std::ostringstream s; - IGCTensor &t = dynamic_cast<IGCTensor &>(tensor); - t.map(); - t.print(s, info); - - std::cout << name << ":" << std::endl; - std::cout << s.str().c_str(); - t.unmap(); -} -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_GC_HELPER_H */ diff --git a/tests/SConscript b/tests/SConscript index 041ed8f548..8eebe5f2d8 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -145,16 +145,6 @@ if env['neon']: if env['external_tests_dir']: files_validation += Glob(env['external_tests_dir'] + '/tests/validation/NEON/' + filter_pattern) - -if env['gles_compute']: - test_env.Append(CPPDEFINES=['ARM_COMPUTE_GC']) - - files_benchmark += Glob('benchmark/GLES_COMPUTE/*/*.cpp') - files_benchmark += Glob('benchmark/GLES_COMPUTE/*.cpp') - - files_validation += Glob('validation/GLES_COMPUTE/*/*.cpp') - files_validation += Glob('validation/GLES_COMPUTE/*.cpp') - extra_link_flags = [] if env['os'] == 'android': test_env.Append(LIBS = ["log"]) diff --git a/tests/Utils.h b/tests/Utils.h index 81fd253cee..ab256032b0 100644 --- a/tests/Utils.h +++ b/tests/Utils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -40,11 +40,6 @@ #include "arm_compute/runtime/CL/CLScheduler.h" #endif /* ARM_COMPUTE_CL */ -#ifdef ARM_COMPUTE_GC -#include "arm_compute/core/GLES_COMPUTE/OpenGLES.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#endif /* ARM_COMPUTE_GC */ - #include <cmath> #include <cstddef> #include <limits> @@ -806,17 +801,7 @@ inline void sync_if_necessary() template <typename TensorType> inline void sync_tensor_if_necessary(TensorType &tensor) { -#ifdef ARM_COMPUTE_GC - if(opengles31_is_available() && std::is_same<typename std::decay<TensorType>::type, arm_compute::GCTensor>::value) - { - // Force sync the tensor by calling map and unmap. - IGCTensor &t = dynamic_cast<IGCTensor &>(tensor); - t.map(); - t.unmap(); - } -#else /* ARM_COMPUTE_GC */ ARM_COMPUTE_UNUSED(tensor); -#endif /* ARM_COMPUTE_GC */ } } // namespace test } // namespace arm_compute diff --git a/tests/benchmark/GLES_COMPUTE/Scale.cpp b/tests/benchmark/GLES_COMPUTE/Scale.cpp deleted file mode 100644 index b3b2735a93..0000000000 --- a/tests/benchmark/GLES_COMPUTE/Scale.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2017-2019 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCScale.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/benchmark/fixtures/ScaleLayerFixture.h" -#include "tests/datasets/ScaleLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16 }); -} // namespace - -template <typename T> -using GCScaleLayerFixture = ScaleLayerFixture<GCTensor, GCScale, GCAccessor, T>; - -TEST_SUITE(GC) - -REGISTER_FIXTURE_DATA_TEST_CASE(SmallScaleLayer, GCScaleLayerFixture<half>, framework::DatasetMode::ALL, - framework::dataset::combine(datasets::SmallScaleLayerShapes(), data_types)); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark_examples/RunExample.cpp b/tests/benchmark_examples/RunExample.cpp index 8adcd95ff6..e5dfe74d0e 100644 --- a/tests/benchmark_examples/RunExample.cpp +++ b/tests/benchmark_examples/RunExample.cpp @@ -38,9 +38,6 @@ #include "arm_compute/runtime/CL/CLHelpers.h" #include "arm_compute/runtime/CL/CLScheduler.h" #endif /* ARM_COMPUTE_CL */ -#ifdef ARM_COMPUTE_GC -#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h" -#endif /* ARM_COMPUTE_GC */ #include <libgen.h> diff --git a/tests/framework/ParametersLibrary.cpp b/tests/framework/ParametersLibrary.cpp index a6953eac69..5041653cac 100644 --- a/tests/framework/ParametersLibrary.cpp +++ b/tests/framework/ParametersLibrary.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Arm Limited. + * Copyright (c) 2019-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -56,12 +56,5 @@ typename ContextType<CLTensor>::type *ParametersLibrary::get_ctx<CLTensor>() } #endif /* ARM_COMPUTE_CL */ -#if ARM_COMPUTE_GC -template <> -typename ContextType<GCTensor>::type *ParametersLibrary::get_ctx<GCTensor>() -{ - return static_cast<typename ContextType<GCTensor>::type *>(_gc_ctx.get()); -} -#endif /* ARM_COMPUTE_GC */ } // namespace test } // namespace arm_compute diff --git a/tests/framework/ParametersLibrary.h b/tests/framework/ParametersLibrary.h index 064b5edf2d..d3677726ad 100644 --- a/tests/framework/ParametersLibrary.h +++ b/tests/framework/ParametersLibrary.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Arm Limited. + * Copyright (c) 2019-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -30,10 +30,6 @@ #include "arm_compute/runtime/CL/CLRuntimeContext.h" #include "arm_compute/runtime/CL/CLTensor.h" #endif /* ARM_COMPUTE_CL */ -#ifdef ARM_COMPUTE_GC -#include "arm_compute/runtime/GLES_COMPUTE/GCRuntimeContext.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#endif /* ARM_COMPUTE_GC */ #include <memory> @@ -61,14 +57,6 @@ struct ContextType<CLTensor> }; #endif /* ARM_COMPUTE_CL */ -#ifdef ARM_COMPUTE_GC -template <> -struct ContextType<GCTensor> -{ - using type = GCRuntimeContext; -}; -#endif /* ARM_COMPUTE_GC */ - /** Class that contains all the global parameters used by the tests */ class ParametersLibrary final { diff --git a/tests/framework/SConscript b/tests/framework/SConscript index 0ac9f9e5a9..e805ac0e2c 100644 --- a/tests/framework/SConscript +++ b/tests/framework/SConscript @@ -47,11 +47,6 @@ Help(new_options.GenerateHelpText(framework_env)) if(env['opencl']): framework_env.Append(CPPDEFINES=['ARM_COMPUTE_CL']) -if(env['gles_compute']): - framework_env.Append(CPPDEFINES=['ARM_COMPUTE_GC']) - if env['os'] != 'android': - framework_env.Append(CPPPATH = ["#opengles-3.1/include", "#opengles-3.1/mali_include"]) - framework_env.Append(CPPPATH = ["."]) framework_env.Append(CPPFLAGS=['-Wno-overloaded-virtual']) diff --git a/tests/main.cpp b/tests/main.cpp index 2c5eb9a2fd..bd15fd3507 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -44,9 +44,6 @@ #include "arm_compute/runtime/CL/CLTuner.h" #include "utils/TypePrinter.h" #endif /* ARM_COMPUTE_CL */ -#ifdef ARM_COMPUTE_GC -#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h" -#endif /* ARM_COMPUTE_GC */ #include "arm_compute/runtime/Scheduler.h" #include <fstream> @@ -179,20 +176,6 @@ int main(int argc, char **argv) parameters = std::make_unique<ParametersLibrary>(); parameters->set_cpu_ctx(std::move(cpu_ctx)); -#ifdef ARM_COMPUTE_GC - // Setup OpenGL context - { - auto gles_ctx = std::make_unique<GCRuntimeContext>(); - ARM_COMPUTE_ERROR_ON(gles_ctx == nullptr); - { - // Legacy singletons API: This has been deprecated and the singletons will be removed in future releases - // Setup singleton for backward compatibility - GCScheduler::get().default_init(); - } - parameters->set_gc_ctx(std::move(gles_ctx)); - }; -#endif /* ARM_COMPUTE_GC */ - #ifdef ARM_COMPUTE_CL CLTuner cl_tuner(false); CLGEMMHeuristicsHandle gemm_heuristics; diff --git a/tests/validate_examples/RunExample.cpp b/tests/validate_examples/RunExample.cpp index 736d4816f5..8ba3c2b295 100644 --- a/tests/validate_examples/RunExample.cpp +++ b/tests/validate_examples/RunExample.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 Arm Limited. + * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -40,9 +40,6 @@ #ifdef ARM_COMPUTE_CL #include "arm_compute/runtime/CL/CLScheduler.h" #endif /* ARM_COMPUTE_CL */ -#ifdef ARM_COMPUTE_GC -#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h" -#endif /* ARM_COMPUTE_GC */ #include <libgen.h> diff --git a/tests/validation/GLES_COMPUTE/ActivationLayer.cpp b/tests/validation/GLES_COMPUTE/ActivationLayer.cpp deleted file mode 100644 index 630c0a96e7..0000000000 --- a/tests/validation/GLES_COMPUTE/ActivationLayer.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/ActivationFunctionsDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/ActivationLayerFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -/** Define tolerance of the activation layer. - * - * @param[in] activation The activation function used. - * @param[in] data_type Data type. - * - * @return Tolerance depending on the activation function. - */ -AbsoluteTolerance<float> tolerance(ActivationLayerInfo::ActivationFunction activation, DataType data_type) -{ - constexpr float epsilon = 1e-6f; - - switch(activation) - { - case ActivationLayerInfo::ActivationFunction::LINEAR: - return AbsoluteTolerance<float>(data_type == DataType::F16 ? 0.2f : epsilon); - case ActivationLayerInfo::ActivationFunction::SQUARE: - return AbsoluteTolerance<float>(data_type == DataType::F16 ? 0.1f : epsilon); - case ActivationLayerInfo::ActivationFunction::LOGISTIC: - return AbsoluteTolerance<float>(data_type == DataType::F16 ? 0.001f : epsilon); - case ActivationLayerInfo::ActivationFunction::LEAKY_RELU: - return AbsoluteTolerance<float>(data_type == DataType::F16 ? 0.00001f : epsilon); - case ActivationLayerInfo::ActivationFunction::SOFT_RELU: - case ActivationLayerInfo::ActivationFunction::ELU: - case ActivationLayerInfo::ActivationFunction::SQRT: - return AbsoluteTolerance<float>(data_type == DataType::F16 ? 0.01f : 0.00001f); - case ActivationLayerInfo::ActivationFunction::TANH: - return AbsoluteTolerance<float>(data_type == DataType::F16 ? 0.001f : 0.00001f); - default: - return AbsoluteTolerance<float>(epsilon); - } -} - -/** CNN data types */ -const auto CNNDataTypes = framework::dataset::make("DataType", -{ - DataType::F16, - DataType::F32, -}); - -/** Input data sets. */ -const auto ActivationDataset = combine(combine(framework::dataset::make("InPlace", { false, true }), datasets::ActivationFunctions()), framework::dataset::make("AlphaBeta", { 0.5f, 1.f })); -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(ActivationLayer) -template <typename T> -using GCActivationLayerFixture = ActivationValidationFixture<GCTensor, GCAccessor, GCActivationLayer, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(RunSmall, GCActivationLayerFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::SmallShapes(), ActivationDataset), - framework::dataset::make("DataType", - DataType::F16))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance(_function, _data_type)); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCActivationLayerFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapes(), ActivationDataset), - framework::dataset::make("DataType", - DataType::F16))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance(_function, _data_type)); -} -TEST_SUITE_END() - -TEST_SUITE(FP32) -FIXTURE_DATA_TEST_CASE(RunSmall, GCActivationLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::SmallShapes(), ActivationDataset), framework::dataset::make("DataType", - DataType::F32))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance(_function, _data_type)); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCActivationLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapes(), ActivationDataset), framework::dataset::make("DataType", - DataType::F32))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance(_function, _data_type)); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/ArithmeticAddition.cpp b/tests/validation/GLES_COMPUTE/ArithmeticAddition.cpp deleted file mode 100644 index c245e7eadc..0000000000 --- a/tests/validation/GLES_COMPUTE/ArithmeticAddition.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCArithmeticAddition.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/ConvertPolicyDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/ArithmeticOperationsFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -/** Input data sets **/ -const auto ArithmeticAdditionFP16Dataset = combine(combine(framework::dataset::make("DataType", DataType::F16), framework::dataset::make("DataType", DataType::F16)), - framework::dataset::make("DataType", DataType::F16)); - -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(ArithmeticAddition) -template <typename T> -using GCArithmeticAdditionFixture = ArithmeticAdditionValidationFixture<GCTensor, GCAccessor, GCArithmeticAddition, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(RunSmall, GCArithmeticAdditionFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::SmallShapes(), ArithmeticAdditionFP16Dataset), - framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP }))) -{ - // Validate output - validate(GCAccessor(_target), _reference); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/BatchNormalizationLayer.cpp b/tests/validation/GLES_COMPUTE/BatchNormalizationLayer.cpp deleted file mode 100644 index ec4925a0c6..0000000000 --- a/tests/validation/GLES_COMPUTE/BatchNormalizationLayer.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/RandomBatchNormalizationLayerDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Helpers.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/BatchNormalizationLayerFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -constexpr AbsoluteTolerance<float> tolerance_f(0.00001f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */ -constexpr AbsoluteTolerance<float> tolerance_f16(0.01f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */ -const auto act_infos = framework::dataset::make("ActivationInfo", -{ - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.f), - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU, 8.f, 2.f), -}); - -const auto data_GB = combine(framework::dataset::make("UseGamma", { false, true }), - framework::dataset::make("UseBeta", { false, true })); -const auto data_f16 = combine(combine(combine(data_GB, act_infos), framework::dataset::make("DataType", DataType::F16)), - framework::dataset::make("DataLayout", { DataLayout::NCHW })); -const auto data_f32 = combine(combine(combine(data_GB, act_infos), framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("DataLayout", { DataLayout::NCHW })); -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(BatchNormalizationLayer) - -template <typename T> -using GCBatchNormalizationLayerFixture = BatchNormalizationLayerValidationFixture<GCTensor, GCAccessor, GCBatchNormalizationLayer, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(Random, GCBatchNormalizationLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(datasets::SmallRandomBatchNormalizationLayerDataset(), data_f16)) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f16, 0); -} -TEST_SUITE_END() - -TEST_SUITE(FP32) -FIXTURE_DATA_TEST_CASE(Random, GCBatchNormalizationLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(datasets::LargeRandomBatchNormalizationLayerDataset(), data_f32)) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f, 0); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp b/tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp deleted file mode 100644 index d533d76599..0000000000 --- a/tests/validation/GLES_COMPUTE/ConvolutionLayer.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/LargeConvolutionLayerDataset.h" -#include "tests/datasets/SmallConvolutionLayerDataset.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/ConvolutionLayerFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -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 */ -RelativeTolerance<float> tolerance_f32(0.00001f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */ -constexpr float tolerance_num = 0.07f; /**< Tolerance number */ - -/** CNN data types */ -const auto CNNDataTypes = framework::dataset::make("DataType", -{ - DataType::F16, - DataType::F32, -}); -const auto ActivationFunctionsDataset = framework::dataset::make("ActivationInfo", -{ - ActivationLayerInfo(), - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 0.5f) -}); -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(ConvolutionLayer) - -template <typename T> -using GCConvolutionLayerFixture = ConvolutionValidationFixture<GCTensor, GCAccessor, GCConvolutionLayer, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(RunSmall, GCConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::SmallConvolutionLayerReducedDataset(), - framework::dataset::make("ReshapeWeights", { true })), - framework::dataset::make("DataType", - DataType::F16)), - framework::dataset::make("DataLayout", - DataLayout::NCHW)), - ActivationFunctionsDataset)) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f16, tolerance_num); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeConvolutionLayerDataset(), - framework::dataset::make("ReshapeWeights", { true })), - framework::dataset::make("DataType", - DataType::F16)), - framework::dataset::make("DataLayout", - DataLayout::NCHW)), - ActivationFunctionsDataset)) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f16, tolerance_num); -} -TEST_SUITE_END() - -TEST_SUITE(FP32) -FIXTURE_DATA_TEST_CASE(RunSmall, GCConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::SmallConvolutionLayerReducedDataset(), - framework::dataset::make("ReshapeWeights", { true })), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("DataLayout", - DataLayout::NCHW)), - ActivationFunctionsDataset)) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f32, tolerance_num); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeConvolutionLayerDataset(), - framework::dataset::make("ReshapeWeights", { true })), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("DataLayout", - DataLayout::NCHW)), - ActivationFunctionsDataset)) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f32, tolerance_num); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/DepthConcatenateLayer.cpp b/tests/validation/GLES_COMPUTE/DepthConcatenateLayer.cpp deleted file mode 100644 index d2659e1035..0000000000 --- a/tests/validation/GLES_COMPUTE/DepthConcatenateLayer.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCConcatenateLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/ConcatenateLayerFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -TEST_SUITE(GC) -TEST_SUITE(DepthConcatenateLayer) - -template <typename T> -using GCDepthConcatenateLayerFixture = ConcatenateLayerValidationFixture<GCTensor, IGCTensor, GCAccessor, GCConcatenateLayer, T, false>; - -TEST_SUITE(Float) -TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(RunSmall, GCDepthConcatenateLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::Small3DShapes(), - framework::dataset::make("DataType", - DataType::F16)), - framework::dataset::make("Axis", 2))) -{ - // Validate output - validate(GCAccessor(_target), _reference); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCDepthConcatenateLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::Large3DShapes(), - framework::dataset::make("DataType", - DataType::F16)), - framework::dataset::make("Axis", 2))) -{ - // Validate output - validate(GCAccessor(_target), _reference); -} -TEST_SUITE_END() - -TEST_SUITE(FP32) -FIXTURE_DATA_TEST_CASE(RunSmall, GCDepthConcatenateLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::Small3DShapes(), - framework::dataset::make("DataType", - DataType::F32)), - framework::dataset::make("Axis", 2))) -{ - // Validate output - validate(GCAccessor(_target), _reference); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCDepthConcatenateLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::Large3DShapes(), framework::dataset::make("DataType", - DataType::F32)), - framework::dataset::make("Axis", 2))) -{ - // Validate output - validate(GCAccessor(_target), _reference); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/DepthwiseConvolutionLayer.cpp b/tests/validation/GLES_COMPUTE/DepthwiseConvolutionLayer.cpp deleted file mode 100644 index 0c5a7d4d4b..0000000000 --- a/tests/validation/GLES_COMPUTE/DepthwiseConvolutionLayer.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/DepthwiseConvolutionLayerDataset.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/DepthwiseConvolutionLayerFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -RelativeTolerance<half> tolerance_fp16(half(0.2)); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */ -constexpr float tolerance_num = 0.07f; /**< Tolerance number */ - -const auto depth_multipliers = framework::dataset::make("DepthMultiplier", { 1, 2, 3 }); - -//Activation Functions -const auto ActivationFunctionsEmptyDataset = framework::dataset::make("ActivationInfo", -{ ActivationLayerInfo() }); -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(DepthwiseConvolutionLayer) - -template <typename T> -using GCDepthwiseConvolutionLayerFixture3x3 = DepthwiseConvolutionLayerValidationFixture<GCTensor, GCAccessor, GCDepthwiseConvolutionLayer3x3, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP16) -TEST_SUITE(W3x3) -FIXTURE_DATA_TEST_CASE(RunSmall, GCDepthwiseConvolutionLayerFixture3x3<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), - depth_multipliers), - framework::dataset::make("DataType", - DataType::F16)), - framework::dataset::make("DataLayout", DataLayout::NCHW)), - ActivationFunctionsEmptyDataset)) -{ - validate(GCAccessor(_target), _reference, tolerance_fp16, tolerance_num); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCDepthwiseConvolutionLayerFixture3x3<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(), - depth_multipliers), - framework::dataset::make("DataType", - DataType::F16)), - framework::dataset::make("DataLayout", DataLayout::NCHW)), - ActivationFunctionsEmptyDataset)) -{ - validate(GCAccessor(_target), _reference, tolerance_fp16, tolerance_num); -} -TEST_SUITE_END() -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/DirectConvolutionLayer.cpp b/tests/validation/GLES_COMPUTE/DirectConvolutionLayer.cpp deleted file mode 100644 index 205a283300..0000000000 --- a/tests/validation/GLES_COMPUTE/DirectConvolutionLayer.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/DirectConvolutionLayerFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -RelativeTolerance<half> tolerance_fp16(half(0.2)); /**< Tolerance for floating point tests */ -RelativeTolerance<float> tolerance_fp32(0.02f); /**< Tolerance for floating point tests */ -constexpr float tolerance_num = 0.07f; /**< Tolerance number */ - -/** Direct convolution data set. */ -const auto data_quantized = 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), - combine(framework::dataset::make("PadY", 0), - framework::dataset::make("KernelSize", 1))), - combine(framework::dataset::make("PadX", 0, 2), - combine(framework::dataset::make("PadY", 0, 2), - framework::dataset::make("KernelSize", { 3 })))), - framework::dataset::make("NumKernels", { 1, 4, 8, 16 }))))); - -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), - combine(framework::dataset::make("PadY", 0), - 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 }))))); -/** Activation function Dataset*/ -const auto ActivationFunctionsDataset = framework::dataset::make("ActivationInfo", -{ - ActivationLayerInfo(), - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC), - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), -}); -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(DirectConvolutionLayer) - -template <typename T> -using GCDirectConvolutionLayerFixture = DirectConvolutionValidationFixture<GCTensor, GCAccessor, GCDirectConvolutionLayer, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(Run, GCDirectConvolutionLayerFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data, framework::dataset::make("DataType", DataType::F16)), - ActivationFunctionsDataset), - framework::dataset::make("DataLayout", DataLayout::NCHW))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_fp16, tolerance_num); -} -TEST_SUITE_END() - -TEST_SUITE(FP32) -FIXTURE_DATA_TEST_CASE(Run, GCDirectConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data, framework::dataset::make("DataType", DataType::F32)), - ActivationFunctionsDataset), - framework::dataset::make("DataLayout", DataLayout::NCHW))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_fp32); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/DirectConvolutionLayerTensorShift.cpp b/tests/validation/GLES_COMPUTE/DirectConvolutionLayerTensorShift.cpp deleted file mode 100644 index 83033de3ec..0000000000 --- a/tests/validation/GLES_COMPUTE/DirectConvolutionLayerTensorShift.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/DirectConvolutionLayerTensorShiftFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -RelativeTolerance<half> tolerance_fp16(half(0.2)); /**< Tolerance for floating point tests */ -RelativeTolerance<float> tolerance_fp32(0.02f); /**< Tolerance for floating point tests */ -constexpr float tolerance_num = 0.07f; /**< Tolerance number */ -constexpr float abs_tolerance_fp32(0.02f); /**< Absolute tolerance for floating point tests */ - -/** Direct convolution data set. */ -const auto data = combine(datasets::SmallDirectConvolutionTensorShiftShapes(), - combine(framework::dataset::make("StrideX", 1, 3), - combine(framework::dataset::make("StrideY", 1, 3), - combine(concat(combine(framework::dataset::make("PadX", 0), - combine(framework::dataset::make("PadY", 0), - 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", { 3 }))))); -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(DirectConvolutionLayerTensorShift) - -template <typename T> -using GCDirectConvolutionLayerTensorShiftFixture = DirectConvolutionValidationTensorShiftFixture<GCTensor, GCAccessor, GCDirectConvolutionLayer, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(Run, GCDirectConvolutionLayerTensorShiftFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(data, framework::dataset::make("DataType", DataType::F16))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_fp16, tolerance_num); -} -TEST_SUITE_END() - -TEST_SUITE(FP32) -FIXTURE_DATA_TEST_CASE(Run, GCDirectConvolutionLayerTensorShiftFixture<float>, framework::DatasetMode::NIGHTLY, combine(data, framework::dataset::make("DataType", DataType::F32))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_fp32, 0.f, abs_tolerance_fp32); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/DropoutLayer.cpp b/tests/validation/GLES_COMPUTE/DropoutLayer.cpp deleted file mode 100644 index bb34155a5e..0000000000 --- a/tests/validation/GLES_COMPUTE/DropoutLayer.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDropoutLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/DropoutLayerFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -//constexpr AbsoluteTolerance<float> tolerance_f(0.00001f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */ - -const auto testparam = combine(framework::dataset::make("ratio", { 0.5f }), framework::dataset::make("forward", { false, true })); -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(DropoutLayer) - -template <typename T> -using GCDropoutLayerFixture = DropoutLayerValidationFixture<GCTensor, GCAccessor, GCDropoutLayer, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP32) -FIXTURE_DATA_TEST_CASE(Random, GCDropoutLayerFixture<float>, framework::DatasetMode::NIGHTLY, - combine(combine(datasets::SmallShapes(), testparam), framework::dataset::make("DataType", DataType::F32))) -{ - // FIXME(APPBROWSER-302) - // Validate output - //validate(GCAccessor(_target), _reference, tolerance_f, 0); -} -TEST_SUITE_END() - -TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(Random, GCDropoutLayerFixture<float>, framework::DatasetMode::NIGHTLY, - combine(combine(datasets::SmallShapes(), testparam), framework::dataset::make("DataType", DataType::F16))) -{ - // FIXME(APPBROWSER-302) - // Validate output - //validate(GCAccessor(_target), _reference, tolerance_f, 0); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/FullyConnectedLayer.cpp b/tests/validation/GLES_COMPUTE/FullyConnectedLayer.cpp deleted file mode 100644 index db83bd8e7a..0000000000 --- a/tests/validation/GLES_COMPUTE/FullyConnectedLayer.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/GLES_COMPUTE/Helper.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/FullyConnectedLayerDataset.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/FullyConnectedLayerFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -/** Tolerance for float operations */ -constexpr RelativeTolerance<float> rel_tolerance_f32(0.05f); -constexpr AbsoluteTolerance<float> abs_tolerance_f32(0.0001f); -RelativeTolerance<half_float::half> tolerance_f16(half(0.2)); -constexpr float tolerance_num = 0.07f; /**< Tolerance number */ - -/** CNN data types */ -const auto CNNDataTypes = framework::dataset::make("DataType", -{ - DataType::F16, - DataType::F32, -}); - -const auto FullyConnectedParameters = combine(framework::dataset::make("TransposeWeights", { false, true }), framework::dataset::make("ReshapeWeights", { false, true })); -const auto ActivationFunctionsDataset = framework::dataset::make("ActivationInfo", ActivationLayerInfo()); -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(FullyConnectedLayer) - -template <typename T> -using GCFullyConnectedLayerFixture = FullyConnectedLayerValidationFixture<GCTensor, GCAccessor, GCFullyConnectedLayer, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(RunSmall, GCFullyConnectedLayerFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::SmallFullyConnectedLayerDataset(), - FullyConnectedParameters), - framework::dataset::make("DataType", DataType::F16)), - ActivationFunctionsDataset)) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f16, tolerance_num); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCFullyConnectedLayerFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeFullyConnectedLayerDataset(), - FullyConnectedParameters), - framework::dataset::make("DataType", DataType::F16)), - ActivationFunctionsDataset)) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f16, tolerance_num); -} -TEST_SUITE_END() - -TEST_SUITE(FP32) -FIXTURE_DATA_TEST_CASE(RunSmall, GCFullyConnectedLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::SmallFullyConnectedLayerDataset(), FullyConnectedParameters), - framework::dataset::make("DataType", DataType::F32)), - ActivationFunctionsDataset)) -{ - // Validate output - validate(GCAccessor(_target), _reference, rel_tolerance_f32); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCFullyConnectedLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeFullyConnectedLayerDataset(), FullyConnectedParameters), - framework::dataset::make("DataType", DataType::F32)), - ActivationFunctionsDataset)) -{ - // Validate output - validate(GCAccessor(_target), _reference, rel_tolerance_f32, 0, abs_tolerance_f32); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/GEMM.cpp b/tests/validation/GLES_COMPUTE/GEMM.cpp deleted file mode 100644 index b1db9c9546..0000000000 --- a/tests/validation/GLES_COMPUTE/GEMM.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/GLES_COMPUTE/Helper.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/LargeGEMMDataset.h" -#include "tests/datasets/SmallGEMMDataset.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/GEMMFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -RelativeTolerance<float> tolerance_f32(0.001f); /**< Tolerance value for comparing reference's output against implementation's output for floating point data types */ - -/** CNN data types */ -const auto CNNDataTypes = framework::dataset::make("DataType", -{ - DataType::F32, -}); -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(GEMM) - -template <typename T> -using GCGEMMFixture = GEMMValidationFixture<GCTensor, GCAccessor, GCGEMM, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP32) -FIXTURE_DATA_TEST_CASE(RunSmall, GCGEMMFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::SmallGEMMDataset(), - framework::dataset::make("ReshapeWeights", { true })), - framework::dataset::make("DataType", DataType::F32))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f32); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCGEMMFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeGEMMDataset(), - framework::dataset::make("ReshapeWeights", { true })), - framework::dataset::make("DataType", DataType::F32))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f32); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/GlobalPoolingLayer.cpp b/tests/validation/GLES_COMPUTE/GlobalPoolingLayer.cpp deleted file mode 100644 index 984309ee7a..0000000000 --- a/tests/validation/GLES_COMPUTE/GlobalPoolingLayer.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/PoolingTypesDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/PoolingLayerFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -/** Input data set for float data types */ -const auto GlobalPoolingLayerDataset = combine(datasets::GlobalPoolingShapes(), datasets::PoolingTypes()); - -/** Input data set for quantized data types */ -constexpr AbsoluteTolerance<float> tolerance_f32(0.001f); /**< Tolerance value for comparing reference's output against implementation's output for FP32 types */ -constexpr AbsoluteTolerance<float> tolerance_f16(0.01f); /**< Tolerance value for comparing reference's output against implementation's output for FP16 types */ -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(GlobalPoolingLayer) - -template <typename T> -using GCGlobalPoolingLayerFixture = GlobalPoolingLayerValidationFixture<GCTensor, GCAccessor, GCPoolingLayer, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP32) -FIXTURE_DATA_TEST_CASE(RunGlobalPooling, GCGlobalPoolingLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(GlobalPoolingLayerDataset, framework::dataset::make("DataType", - DataType::F32)), - framework::dataset::make("DataLayout", DataLayout::NCHW))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f32); -} -TEST_SUITE_END() - -TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(RunGlobalPooling, GCGlobalPoolingLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(GlobalPoolingLayerDataset, framework::dataset::make("DataType", - DataType::F16)), - framework::dataset::make("DataLayout", DataLayout::NCHW))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f16); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/NormalizationLayer.cpp b/tests/validation/GLES_COMPUTE/NormalizationLayer.cpp deleted file mode 100644 index 85b1e0965f..0000000000 --- a/tests/validation/GLES_COMPUTE/NormalizationLayer.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/NormalizationTypesDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/NormalizationLayerFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -/** Tolerance for float operations */ -constexpr AbsoluteTolerance<float> tolerance_f32(0.00001f); - -/** Input data set. */ -const auto NormalizationDataset = combine(combine(combine(combine(datasets::SmallShapes(), framework::dataset::make("NormType", { NormType::IN_MAP_1D, NormType::CROSS_MAP })), - framework::dataset::make("NormalizationSize", 3, 9, 2)), - framework::dataset::make("Beta", { 0.5f, 1.f, 2.f })), - framework::dataset::make("IsScaled", { true, false })); -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(NormalizationLayer) - -//TODO(COMPMID-415): Missing configuration? - -template <typename T> -using GCNormalizationLayerFixture = NormalizationValidationFixture<GCTensor, GCAccessor, GCNormalizationLayer, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP32) -FIXTURE_DATA_TEST_CASE(RunSmall, GCNormalizationLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(NormalizationDataset, - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("DataLayout", DataLayout::NCHW))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f32); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCNormalizationLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(NormalizationDataset, - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("DataLayout", DataLayout::NCHW))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f32); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp b/tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp deleted file mode 100644 index f9f26f78be..0000000000 --- a/tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/RandomNormalizePlanarYUVLayerDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/NormalizePlanarYUVLayerFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -constexpr AbsoluteTolerance<float> tolerance_f16(0.5f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */ -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(NormalizePlanarYUVLayer) - -template <typename T> -using GCNormalizePlanarYUVLayerFixture = NormalizePlanarYUVLayerValidationFixture<GCTensor, GCAccessor, GCNormalizePlanarYUVLayer, T>; - -// *INDENT-OFF* -// clang-format off -DATA_TEST_CASE(Validate, framework::DatasetMode::NIGHTLY, 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::NIGHTLY, 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); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/PoolingLayer.cpp b/tests/validation/GLES_COMPUTE/PoolingLayer.cpp deleted file mode 100644 index afae4ff4ea..0000000000 --- a/tests/validation/GLES_COMPUTE/PoolingLayer.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/PoolingTypesDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/PoolingLayerFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -/** Input data set for floating-point data types */ -const auto PoolingLayerDatasetFP = combine(combine(combine(datasets::PoolingTypes(), framework::dataset::make("PoolingSize", { Size2D(2, 2), Size2D(3, 3), Size2D(4, 4), Size2D(7, 7), Size2D(9, 9) })), - framework::dataset::make("PadStride", { PadStrideInfo(1, 1, 0, 0), PadStrideInfo(2, 1, 0, 0), PadStrideInfo(1, 2, 1, 1), PadStrideInfo(2, 2, 1, 0) })), - framework::dataset::make("ExcludePadding", { true, false })); - -constexpr AbsoluteTolerance<float> tolerance_f32(0.001f); /**< Tolerance value for comparing reference's output against implementation's output for 32-bit floating-point type */ -constexpr AbsoluteTolerance<float> tolerance_f16(0.01f); /**< Tolerance value for comparing reference's output against implementation's output for 16-bit floating-point type */ -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(PoolingLayer) - -//clang-format off -DATA_TEST_CASE(Validate, framework::DatasetMode::NIGHTLY, zip(zip(zip( - framework::dataset::make("InputInfo", -{ - TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching data type - TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Window shrink - TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid pad/size combination - TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid pad/size combination - TensorInfo(TensorShape(15U, 13U, 5U), 1, DataType::F32), // Non-rectangular Global Pooling - TensorInfo(TensorShape(13U, 13U, 5U), 1, DataType::F32), // Invalid output Global Pooling - TensorInfo(TensorShape(13U, 13U, 5U), 1, DataType::F32), -}), -framework::dataset::make("OutputInfo", -{ - TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F16), TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), TensorInfo(TensorShape(30U, 11U, 2U), 1, DataType::F32), TensorInfo(TensorShape(25U, 16U, 2U), 1, DataType::F32), TensorInfo(TensorShape(1U, 1U, 5U), 1, DataType::F32), TensorInfo(TensorShape(2U, 2U, 5U), 1, DataType::F32), TensorInfo(TensorShape(1U, 1U, 5U), 1, DataType::F32), -})), -framework::dataset::make("PoolInfo", -{ - PoolingLayerInfo(PoolingType::AVG, 3, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 0)), - PoolingLayerInfo(PoolingType::AVG, 3, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 0)), - PoolingLayerInfo(PoolingType::AVG, 3, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 0)), - PoolingLayerInfo(PoolingType::AVG, 3, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 0)), - PoolingLayerInfo(PoolingType::AVG, 2, DataLayout::NCHW, PadStrideInfo(1, 1, 2, 0)), - PoolingLayerInfo(PoolingType::AVG, 2, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 2)), - PoolingLayerInfo(PoolingType::L2, 3, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 0)), - PoolingLayerInfo(PoolingType::AVG, DataLayout::NCHW), - PoolingLayerInfo(PoolingType::MAX, DataLayout::NCHW), - PoolingLayerInfo(PoolingType::AVG, DataLayout::NCHW), -})), -framework::dataset::make("Expected", { false, false, false, false, false, false, false, false, false, true })), -input_info, output_info, pool_info, expected) -{ - ARM_COMPUTE_EXPECT(bool(GCPoolingLayer::validate(&input_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), pool_info)) == expected, framework::LogLevel::ERRORS); -} -//clang-format on - -template <typename T> -using GCPoolingLayerFixture = PoolingLayerValidationFixture<GCTensor, GCAccessor, GCPoolingLayer, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP32) -FIXTURE_DATA_TEST_CASE(RunSmall, GCPoolingLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetFP, - framework::dataset::make("DataType", - DataType::F32))), - framework::dataset::make("DataLayout", DataLayout::NCHW))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f32); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCPoolingLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapes(), combine(PoolingLayerDatasetFP, - framework::dataset::make("DataType", - DataType::F32))), - framework::dataset::make("DataLayout", DataLayout::NCHW))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f32); -} -TEST_SUITE_END() - -TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(RunSmall, GCPoolingLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetFP, - framework::dataset::make("DataType", DataType::F16))), - framework::dataset::make("DataLayout", DataLayout::NCHW))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f16); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCPoolingLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapes(), combine(PoolingLayerDatasetFP, - framework::dataset::make("DataType", DataType::F16))), - framework::dataset::make("DataLayout", DataLayout::NCHW))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f16); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/Scale.cpp b/tests/validation/GLES_COMPUTE/Scale.cpp deleted file mode 100644 index 8731f0bc80..0000000000 --- a/tests/validation/GLES_COMPUTE/Scale.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2017-2021 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Helpers.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCScale.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/SamplingPolicyDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Helpers.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/ScaleFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -/** CNN data types */ -const auto ScaleDataTypes = framework::dataset::make("DataType", -{ - DataType::F16, -}); - -/** Aligned corners, this functionality is supported only by Neon and OpenCL backends */ -const auto AlignCorners = framework::dataset::make("AlignCorners", -{ - false, -}); - -/** Tolerance */ -RelativeTolerance<half> tolerance_f16(half(0.1)); -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(Scale) - -template <typename T> -using GCScaleFixture = ScaleValidationFixture<GCTensor, GCAccessor, GCScale, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(RunSmall, GCScaleFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(datasets::SmallShapes(), framework::dataset::make("DataType", - DataType::F16)), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - framework::dataset::make("InterpolationPolicy", { InterpolationPolicy::NEAREST_NEIGHBOR })), - datasets::BorderModes()), - datasets::SamplingPolicies()), - AlignCorners)) -{ - //Create valid region - TensorInfo src_info(_shape, 1, _data_type); - const ValidRegion valid_region = calculate_valid_region_scale(src_info, _reference.shape(), _policy, _sampling_policy, (_border_mode == BorderMode::UNDEFINED)); - - // Validate output - validate(GCAccessor(_target), _reference, valid_region, tolerance_f16); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCScaleFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(datasets::LargeShapes(), framework::dataset::make("DataType", - DataType::F16)), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - framework::dataset::make("InterpolationPolicy", { InterpolationPolicy::NEAREST_NEIGHBOR })), - datasets::BorderModes()), - datasets::SamplingPolicies()), - AlignCorners)) -{ - //Create valid region - TensorInfo src_info(_shape, 1, _data_type); - const ValidRegion valid_region = calculate_valid_region_scale(src_info, _reference.shape(), _policy, _sampling_policy, (_border_mode == BorderMode::UNDEFINED)); - - // Validate output - validate(GCAccessor(_target), _reference, valid_region, tolerance_f16); -} -TEST_SUITE_END() -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/SoftmaxLayer.cpp b/tests/validation/GLES_COMPUTE/SoftmaxLayer.cpp deleted file mode 100644 index 868662f4e7..0000000000 --- a/tests/validation/GLES_COMPUTE/SoftmaxLayer.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/SoftmaxLayerFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -/** Tolerance for float operations */ -RelativeTolerance<half> tolerance_f16(half(0.2)); -RelativeTolerance<float> tolerance_f32(0.001f); - -/** CNN data types */ -const auto CNNDataTypes = framework::dataset::make("DataType", -{ - DataType::F16, - DataType::F32, -}); -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(SoftmaxLayer) - -template <typename T> -using GCSoftmaxLayerFixture = SoftmaxValidationFixture<GCTensor, GCAccessor, GCSoftmaxLayer, T>; - -TEST_SUITE(Float) -TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(RunSmall, GCSoftmaxLayerFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::SoftmaxLayerSmallShapes(), - framework::dataset::make("DataType", DataType::F16)), - framework::dataset::make("Beta", 1.0f)), - framework::dataset::make("Axis", 0))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f16); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCSoftmaxLayerFixture<half_float::half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::SoftmaxLayerLargeShapes(), - framework::dataset::make("DataType", DataType::F16)), - framework::dataset::make("Beta", 1.0f)), - framework::dataset::make("Axis", 0))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f16); -} -TEST_SUITE_END() // FP16 - -TEST_SUITE(FP32) -FIXTURE_DATA_TEST_CASE(RunSmall, GCSoftmaxLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::SoftmaxLayerSmallShapes(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Beta", 1.0f)), - framework::dataset::make("Axis", 0))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f32); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCSoftmaxLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::SoftmaxLayerLargeShapes(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Beta", 1.0f)), - framework::dataset::make("Axis", 0))) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f32); -} -TEST_SUITE_END() // FP32 -TEST_SUITE_END() // Float - -TEST_SUITE_END() // SoftmaxLayer -TEST_SUITE_END() // GC -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/Transpose.cpp b/tests/validation/GLES_COMPUTE/Transpose.cpp deleted file mode 100644 index 80d628374d..0000000000 --- a/tests/validation/GLES_COMPUTE/Transpose.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include "arm_compute/core/GLES_COMPUTE/GCHelpers.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCTranspose.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/TransposeFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -TEST_SUITE(GC) -TEST_SUITE(Transpose) - -template <typename T> -using GCTransposeFixture = TransposeValidationFixture<GCTensor, GCAccessor, GCTranspose, T>; - -TEST_SUITE(FP16) -FIXTURE_DATA_TEST_CASE(RunSmall, GCTransposeFixture<half>, framework::DatasetMode::NIGHTLY, combine(datasets::Small2DShapes(), framework::dataset::make("DataType", DataType::F16))) -{ - // Validate output - validate(GCAccessor(_target), _reference); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCTransposeFixture<half>, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), framework::dataset::make("DataType", DataType::F16))) -{ - // Validate output - validate(GCAccessor(_target), _reference); -} -TEST_SUITE_END() - -TEST_SUITE(FP32) -FIXTURE_DATA_TEST_CASE(RunSmall, GCTransposeFixture<float>, framework::DatasetMode::NIGHTLY, combine(datasets::Small2DShapes(), framework::dataset::make("DataType", DataType::F32))) -{ - // Validate output - validate(GCAccessor(_target), _reference); -} -FIXTURE_DATA_TEST_CASE(RunLarge, GCTransposeFixture<float>, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), framework::dataset::make("DataType", DataType::F32))) -{ - // Validate output - validate(GCAccessor(_target), _reference); -} -TEST_SUITE_END() - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/UNIT/DynamicTensor.cpp b/tests/validation/GLES_COMPUTE/UNIT/DynamicTensor.cpp deleted file mode 100644 index 6d57f84acc..0000000000 --- a/tests/validation/GLES_COMPUTE/UNIT/DynamicTensor.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2019-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/runtime/BlobLifetimeManager.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCBufferAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.h" -#include "arm_compute/runtime/MemoryGroup.h" -#include "arm_compute/runtime/MemoryManagerOnDemand.h" -#include "arm_compute/runtime/PoolManager.h" -#include "tests/AssetsLibrary.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "tests/validation/fixtures/UNIT/DynamicTensorFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -#ifndef DOXYGEN_SKIP_THIS -using GCNormLayerWrapper = SimpleFunctionWrapper<MemoryManagerOnDemand, GCNormalizationLayer, IGCTensor>; -template <> -void GCNormLayerWrapper::configure(IGCTensor *src, IGCTensor *dst) -{ - _func.configure(src, dst, NormalizationLayerInfo(NormType::CROSS_MAP, 3)); -} -#endif // DOXYGEN_SKIP_THIS - -TEST_SUITE(GC) -TEST_SUITE(UNIT) -TEST_SUITE(DynamicTensor) - -using BlobMemoryManagementService = MemoryManagementService<GCBufferAllocator, BlobLifetimeManager, PoolManager, MemoryManagerOnDemand>; -using GCDynamicTensorType3SingleFunction = DynamicTensorType3SingleFunction<GCTensor, GCAccessor, BlobMemoryManagementService, GCNormLayerWrapper>; - -/** Tests the memory manager with dynamic input and output tensors. - * - * Create and manage the tensors needed to run a simple function. After the function is executed, - * change the input and output size requesting more memory and go through the manage/allocate process. - * The memory manager should be able to update the inner structures and allocate the requested memory - * */ -FIXTURE_DATA_TEST_CASE(DynamicTensorType3Single, GCDynamicTensorType3SingleFunction, framework::DatasetMode::NIGHTLY, - framework::dataset::zip(framework::dataset::make("Level0Shape", { TensorShape(12U, 11U, 3U), TensorShape(256U, 8U, 12U) }), - framework::dataset::make("Level1Shape", { TensorShape(67U, 31U, 15U), TensorShape(11U, 2U, 3U) }))) -{ - ARM_COMPUTE_EXPECT(internal_l0.size() == internal_l1.size(), framework::LogLevel::ERRORS); - ARM_COMPUTE_EXPECT(cross_l0.size() == cross_l1.size(), framework::LogLevel::ERRORS); - - const unsigned int internal_size = internal_l0.size(); - const unsigned int cross_size = cross_l0.size(); - if(input_l0.total_size() < input_l1.total_size()) - { - for(unsigned int i = 0; i < internal_size; ++i) - { - ARM_COMPUTE_EXPECT(internal_l0[i].size < internal_l1[i].size, framework::LogLevel::ERRORS); - } - for(unsigned int i = 0; i < cross_size; ++i) - { - ARM_COMPUTE_EXPECT(cross_l0[i].size < cross_l1[i].size, framework::LogLevel::ERRORS); - } - } - else - { - for(unsigned int i = 0; i < internal_size; ++i) - { - ARM_COMPUTE_EXPECT(internal_l0[i].size == internal_l1[i].size, framework::LogLevel::ERRORS); - } - for(unsigned int i = 0; i < cross_size; ++i) - { - ARM_COMPUTE_EXPECT(cross_l0[i].size == cross_l1[i].size, framework::LogLevel::ERRORS); - } - } -} - -TEST_SUITE_END() // DynamicTensor -TEST_SUITE_END() // UNIT -TEST_SUITE_END() // GC -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/GLES_COMPUTE/UNIT/MemoryManager.cpp b/tests/validation/GLES_COMPUTE/UNIT/MemoryManager.cpp deleted file mode 100644 index d205a3b1c6..0000000000 --- a/tests/validation/GLES_COMPUTE/UNIT/MemoryManager.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2018-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/runtime/GLES_COMPUTE/GCBufferAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h" -#include "arm_compute/runtime/MemoryGroup.h" -#include "tests/AssetsLibrary.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/validation/Validation.h" -#include "tests/validation/fixtures/UNIT/MemoryManagerFixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace validation -{ -namespace -{ -RelativeTolerance<float> tolerance_f32(0.05f); -} // namespace - -TEST_SUITE(GC) -TEST_SUITE(UNIT) -TEST_SUITE(MemoryManager) - -// Setting BlobMemoryManagerSimpleWithinFunctionLevel test -using GCBlobMemoryManagerSimpleWithinFunctionLevelFixture = BlobMemoryManagerSimpleTestCaseFixture<GCTensor, - GCAccessor, - GCBufferAllocator, - GCFullyConnectedLayer>; -FIXTURE_TEST_CASE(BlobMemoryManagerSimpleWithinFunctionLevel, - GCBlobMemoryManagerSimpleWithinFunctionLevelFixture, - framework::DatasetMode::NIGHTLY) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f32); -} - -// Setting BlobMemoryManagerReconfigure test -using GCBlobMemoryManagerReconfigureFixture = BlobMemoryManagerReconfigureTestCaseFixture<GCTensor, - GCAccessor, - GCBufferAllocator, - GCFullyConnectedLayer>; -FIXTURE_TEST_CASE(BlobMemoryManagerReconfigure, - GCBlobMemoryManagerReconfigureFixture, - framework::DatasetMode::NIGHTLY) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f32); -} - -// Setting BlobMemoryManagerReconfigure2 test -using GCBlobMemoryManagerReconfigure2Fixture = BlobMemoryManagerReconfigure2TestCaseFixture<GCTensor, - GCAccessor, - GCBufferAllocator, - GCFullyConnectedLayer, - GCSoftmaxLayer>; -FIXTURE_TEST_CASE(BlobMemoryManagerReconfigure2, - GCBlobMemoryManagerReconfigure2Fixture, - framework::DatasetMode::NIGHTLY) -{ - // Validate output - validate(GCAccessor(_target), _reference, tolerance_f32); -} - -TEST_SUITE_END() -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace validation -} // namespace test -} // namespace arm_compute diff --git a/tests/validation/fixtures/DirectConvolutionLayerTensorShiftFixture.h b/tests/validation/fixtures/DirectConvolutionLayerTensorShiftFixture.h index 44edc91231..6ef30d3c21 100644 --- a/tests/validation/fixtures/DirectConvolutionLayerTensorShiftFixture.h +++ b/tests/validation/fixtures/DirectConvolutionLayerTensorShiftFixture.h @@ -23,7 +23,6 @@ */ #include "arm_compute/core/TensorShape.h" #include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h" #include "tests/AssetsLibrary.h" #include "tests/Globals.h" #include "tests/IAccessor.h" |