aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/GLES_COMPUTE
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2020-07-30 23:39:32 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2020-09-28 08:52:42 +0000
commitd175ecea20f5c9e3bff07f7c5d3e4bb5519f7cb9 (patch)
tree62b0957e4241acc257685dadb79442ed27f5cb96 /tests/validation/GLES_COMPUTE
parentc6af9db1bb6b7a2093205f6f3088143bad660ff9 (diff)
downloadComputeLibrary-d175ecea20f5c9e3bff07f7c5d3e4bb5519f7cb9.tar.gz
COMPMID-3324: Remove configuration tests
Remove configuation tests that use the default data shapes. There is no need to run them since configure will run as part of the actual validation run. Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Change-Id: If6d88a6ba5e9463fa8c615fcf76a5c07d3049d53 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3638 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/GLES_COMPUTE')
-rw-r--r--tests/validation/GLES_COMPUTE/ActivationLayer.cpp45
-rw-r--r--tests/validation/GLES_COMPUTE/BatchNormalizationLayer.cpp33
-rw-r--r--tests/validation/GLES_COMPUTE/DirectConvolutionLayer.cpp4
-rw-r--r--tests/validation/GLES_COMPUTE/FullyConnectedLayer.cpp40
-rw-r--r--tests/validation/GLES_COMPUTE/GEMM.cpp23
-rw-r--r--tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp20
-rw-r--r--tests/validation/GLES_COMPUTE/Scale.cpp44
-rw-r--r--tests/validation/GLES_COMPUTE/SoftmaxLayer.cpp24
-rw-r--r--tests/validation/GLES_COMPUTE/Transpose.cpp23
9 files changed, 6 insertions, 250 deletions
diff --git a/tests/validation/GLES_COMPUTE/ActivationLayer.cpp b/tests/validation/GLES_COMPUTE/ActivationLayer.cpp
index 21384c4721..63c0423e7a 100644
--- a/tests/validation/GLES_COMPUTE/ActivationLayer.cpp
+++ b/tests/validation/GLES_COMPUTE/ActivationLayer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019 Arm Limited.
+ * Copyright (c) 2017-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -88,49 +88,6 @@ const auto ActivationDataset = combine(combine(framework::dataset::make("InPlace
TEST_SUITE(GC)
TEST_SUITE(ActivationLayer)
-
-DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), CNNDataTypes), framework::dataset::make("InPlace", { false, true })),
- shape, data_type, in_place)
-{
- // Create tensors
- GCTensor src = create_tensor<GCTensor>(shape, data_type, 1);
- GCTensor dst = create_tensor<GCTensor>(shape, data_type, 1);
-
- ARM_COMPUTE_EXPECT(src.info()->is_resizable(), framework::LogLevel::ERRORS);
- ARM_COMPUTE_EXPECT(dst.info()->is_resizable(), framework::LogLevel::ERRORS);
-
- // Create and configure function
- GCActivationLayer act_layer;
-
- if(in_place)
- {
- act_layer.configure(&src, nullptr, ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::ABS));
- }
- else
- {
- act_layer.configure(&src, &dst, ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::ABS));
- }
-
- // Validate valid region
- const ValidRegion valid_region = shape_to_valid_region(shape);
- validate(src.info()->valid_region(), valid_region);
-
- if(!in_place)
- {
- validate(dst.info()->valid_region(), valid_region);
- }
-
- // Validate padding
- const int step = (arm_compute::data_size_from_type(data_type) == 4 ? 1 : 2);
- const PaddingSize padding = PaddingCalculator(shape.x(), step).required_padding();
- validate(src.info()->padding(), padding);
-
- if(!in_place)
- {
- validate(dst.info()->padding(), padding);
- }
-}
-
template <typename T>
using GCActivationLayerFixture = ActivationValidationFixture<GCTensor, GCAccessor, GCActivationLayer, T>;
diff --git a/tests/validation/GLES_COMPUTE/BatchNormalizationLayer.cpp b/tests/validation/GLES_COMPUTE/BatchNormalizationLayer.cpp
index 474dd02b3d..0866dcd0aa 100644
--- a/tests/validation/GLES_COMPUTE/BatchNormalizationLayer.cpp
+++ b/tests/validation/GLES_COMPUTE/BatchNormalizationLayer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019 Arm Limited.
+ * Copyright (c) 2017-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -67,37 +67,6 @@ TEST_SUITE(BatchNormalizationLayer)
template <typename T>
using GCBatchNormalizationLayerFixture = BatchNormalizationLayerValidationFixture<GCTensor, GCAccessor, GCBatchNormalizationLayer, T>;
-DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(combine(datasets::SmallRandomBatchNormalizationLayerDataset(),
- data_GB),
- framework::dataset::make("DataType", { DataType::F32 })),
- framework::dataset::make("DataLayout", { DataLayout::NCHW })),
- shape0, shape1, epsilon, use_beta, use_gamma, dt, data_layout)
-{
- TensorShape src_dst_shapes = shape0;
- if(data_layout == DataLayout::NHWC)
- {
- permute(src_dst_shapes, PermutationVector(2U, 0U, 1U));
- }
-
- // Create tensors
- GCTensor src = create_tensor<GCTensor>(src_dst_shapes, dt, 1, QuantizationInfo(), data_layout);
- GCTensor dst = create_tensor<GCTensor>(src_dst_shapes, dt, 1, QuantizationInfo(), data_layout);
- GCTensor mean = create_tensor<GCTensor>(shape1, dt, 1);
- GCTensor var = create_tensor<GCTensor>(shape1, dt, 1);
- GCTensor beta = create_tensor<GCTensor>(shape1, dt, 1);
- GCTensor gamma = create_tensor<GCTensor>(shape1, dt, 1);
-
- // Create and Configure function
- GCBatchNormalizationLayer norm;
- GCTensor *beta_ptr = use_beta ? &beta : nullptr;
- GCTensor *gamma_ptr = use_gamma ? &gamma : nullptr;
- norm.configure(&src, &dst, &mean, &var, beta_ptr, gamma_ptr, epsilon);
-
- // Validate valid region
- const ValidRegion valid_region = shape_to_valid_region(src_dst_shapes);
- validate(dst.info()->valid_region(), valid_region);
-}
-
TEST_SUITE(Float)
TEST_SUITE(FP16)
FIXTURE_DATA_TEST_CASE(Random, GCBatchNormalizationLayerFixture<half>, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallRandomBatchNormalizationLayerDataset(), data_f16))
diff --git a/tests/validation/GLES_COMPUTE/DirectConvolutionLayer.cpp b/tests/validation/GLES_COMPUTE/DirectConvolutionLayer.cpp
index ee95a0145e..92d926c1a0 100644
--- a/tests/validation/GLES_COMPUTE/DirectConvolutionLayer.cpp
+++ b/tests/validation/GLES_COMPUTE/DirectConvolutionLayer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018 Arm Limited.
+ * Copyright (c) 2017-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -80,8 +80,6 @@ const auto ActivationFunctionsDataset = framework::dataset::make("ActivationInfo
TEST_SUITE(GC)
TEST_SUITE(DirectConvolutionLayer)
-//TODO(COMPMID-415): Configuration tests?
-
template <typename T>
using GCDirectConvolutionLayerFixture = DirectConvolutionValidationFixture<GCTensor, GCAccessor, GCDirectConvolutionLayer, T>;
diff --git a/tests/validation/GLES_COMPUTE/FullyConnectedLayer.cpp b/tests/validation/GLES_COMPUTE/FullyConnectedLayer.cpp
index 53f63ce923..55c214f338 100644
--- a/tests/validation/GLES_COMPUTE/FullyConnectedLayer.cpp
+++ b/tests/validation/GLES_COMPUTE/FullyConnectedLayer.cpp
@@ -63,46 +63,6 @@ const auto ActivationFunctionsDataset = framework::dataset::make("ActivationInfo
TEST_SUITE(GC)
TEST_SUITE(FullyConnectedLayer)
-DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(framework::dataset::concat(datasets::SmallFullyConnectedLayerDataset(), datasets::LargeFullyConnectedLayerDataset()),
- FullyConnectedParameters),
- CNNDataTypes),
- src_shape, weights_shape, bias_shape, dst_shape, transpose_weights, reshape_weights, data_type)
-{
- TensorShape ws(weights_shape);
-
- // Transpose weights if not done in the function
- if(!reshape_weights || !transpose_weights)
- {
- const size_t shape_x = ws.x();
- ws.set(0, ws.y());
- ws.set(1, shape_x);
- }
-
- // Create tensors
- GCTensor src = create_tensor<GCTensor>(src_shape, data_type, 1);
- GCTensor weights = create_tensor<GCTensor>(ws, data_type, 1);
- GCTensor bias = create_tensor<GCTensor>(bias_shape, data_type, 1);
- GCTensor dst = create_tensor<GCTensor>(dst_shape, data_type, 1);
-
- ARM_COMPUTE_EXPECT(src.info()->is_resizable(), framework::LogLevel::ERRORS);
- ARM_COMPUTE_EXPECT(weights.info()->is_resizable(), framework::LogLevel::ERRORS);
- ARM_COMPUTE_EXPECT(bias.info()->is_resizable(), framework::LogLevel::ERRORS);
- ARM_COMPUTE_EXPECT(dst.info()->is_resizable(), framework::LogLevel::ERRORS);
-
- // Create Fully Connected layer info
- FullyConnectedLayerInfo fc_info;
- fc_info.transpose_weights = transpose_weights;
- fc_info.are_weights_reshaped = !reshape_weights;
-
- // Create and configure function.
- GCFullyConnectedLayer fc;
- fc.configure(&src, &weights, &bias, &dst, fc_info);
-
- // Validate valid region
- const ValidRegion dst_valid_region = shape_to_valid_region(dst_shape);
- validate(dst.info()->valid_region(), dst_valid_region);
-}
-
template <typename T>
using GCFullyConnectedLayerFixture = FullyConnectedLayerValidationFixture<GCTensor, GCAccessor, GCFullyConnectedLayer, T>;
diff --git a/tests/validation/GLES_COMPUTE/GEMM.cpp b/tests/validation/GLES_COMPUTE/GEMM.cpp
index 13af521fda..7bcb2a9d1a 100644
--- a/tests/validation/GLES_COMPUTE/GEMM.cpp
+++ b/tests/validation/GLES_COMPUTE/GEMM.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018 Arm Limited.
+ * Copyright (c) 2017-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -56,27 +56,6 @@ const auto CNNDataTypes = framework::dataset::make("DataType",
TEST_SUITE(GC)
TEST_SUITE(GEMM)
-DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(framework::dataset::concat(datasets::SmallGEMMDataset(), datasets::LargeGEMMDataset()), CNNDataTypes),
- shape_a, shape_b, shape_c, output_shape, alpha, beta, data_type)
-{
- // Create tensors
- GCTensor a = create_tensor<GCTensor>(shape_a, data_type, 1);
- GCTensor b = create_tensor<GCTensor>(shape_b, data_type, 1);
- GCTensor c = create_tensor<GCTensor>(shape_c, data_type, 1);
- GCTensor dst = create_tensor<GCTensor>(output_shape, data_type, 1);
-
- ARM_COMPUTE_EXPECT(a.info()->is_resizable(), framework::LogLevel::ERRORS);
- ARM_COMPUTE_EXPECT(b.info()->is_resizable(), framework::LogLevel::ERRORS);
- ARM_COMPUTE_EXPECT(c.info()->is_resizable(), framework::LogLevel::ERRORS);
- ARM_COMPUTE_EXPECT(dst.info()->is_resizable(), framework::LogLevel::ERRORS);
-
- // Create and configure function
- GCGEMM gemm;
- gemm.configure(&a, &b, &c, &dst, alpha, beta);
-
- //TODO(COMPMID-415): Validate valid region
-}
-
template <typename T>
using GCGEMMFixture = GEMMValidationFixture<GCTensor, GCAccessor, GCGEMM, T>;
diff --git a/tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp b/tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp
index ed6b5f0ecf..98b0ee5ade 100644
--- a/tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp
+++ b/tests/validation/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018 Arm Limited.
+ * Copyright (c) 2017-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -52,24 +52,6 @@ TEST_SUITE(NormalizePlanarYUVLayer)
template <typename T>
using GCNormalizePlanarYUVLayerFixture = NormalizePlanarYUVLayerValidationFixture<GCTensor, GCAccessor, GCNormalizePlanarYUVLayer, T>;
-DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(datasets::RandomNormalizePlanarYUVLayerDataset(), framework::dataset::make("DataType", { DataType::F16 })),
- shape0, shape1, dt)
-{
- // Create tensors
- GCTensor src = create_tensor<GCTensor>(shape0, dt, 1);
- GCTensor dst = create_tensor<GCTensor>(shape0, dt, 1);
- GCTensor mean = create_tensor<GCTensor>(shape1, dt, 1);
- GCTensor sd = create_tensor<GCTensor>(shape1, dt, 1);
-
- // Create and Configure function
- GCNormalizePlanarYUVLayer norm;
- norm.configure(&src, &dst, &mean, &sd);
-
- // Validate valid region
- const ValidRegion valid_region = shape_to_valid_region(shape0);
- validate(dst.info()->valid_region(), valid_region);
-}
-
// *INDENT-OFF*
// clang-format off
DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(
diff --git a/tests/validation/GLES_COMPUTE/Scale.cpp b/tests/validation/GLES_COMPUTE/Scale.cpp
index 5e7f39f284..a8859d6f00 100644
--- a/tests/validation/GLES_COMPUTE/Scale.cpp
+++ b/tests/validation/GLES_COMPUTE/Scale.cpp
@@ -65,50 +65,6 @@ RelativeTolerance<half> tolerance_f16(half(0.1));
TEST_SUITE(GC)
TEST_SUITE(Scale)
-DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(combine(combine(concat(datasets::MediumShapes(), datasets::LargeShapes()), ScaleDataTypes),
- framework::dataset::make("InterpolationPolicy", { InterpolationPolicy::NEAREST_NEIGHBOR })),
- datasets::BorderModes()),
- datasets::SamplingPolicies()),
- shape, data_type, policy, border_mode, sampling_policy)
-{
- std::mt19937 generator(library->seed());
- std::uniform_real_distribution<float> distribution_float(0.25, 2);
- const float scale_x = distribution_float(generator);
- const float scale_y = distribution_float(generator);
- std::uniform_int_distribution<uint8_t> distribution_u8(0, 255);
- uint8_t constant_border_value = distribution_u8(generator);
-
- // Create tensors
- GCTensor src = create_tensor<GCTensor>(shape, data_type);
- TensorShape shape_scaled(shape);
- shape_scaled.set(0, shape[0] * scale_x);
- shape_scaled.set(1, shape[1] * scale_y);
- GCTensor dst = create_tensor<GCTensor>(shape_scaled, data_type);
-
- ARM_COMPUTE_EXPECT(src.info()->is_resizable(), framework::LogLevel::ERRORS);
- ARM_COMPUTE_EXPECT(dst.info()->is_resizable(), framework::LogLevel::ERRORS);
-
- // Create and configure function
- GCScale gcscale;
- gcscale.configure(&src, &dst, ScaleKernelInfo{ policy, border_mode, constant_border_value, sampling_policy });
-
- // Get border size depending on border mode
- const BorderSize border_size(border_mode == BorderMode::UNDEFINED ? 0 : 1);
-
- // Validate valid region
- const ValidRegion dst_valid_region = calculate_valid_region_scale(*(src.info()), shape_scaled, policy, sampling_policy, (border_mode == BorderMode::UNDEFINED));
- validate(dst.info()->valid_region(), dst_valid_region);
-
- // Validate padding
- PaddingCalculator calculator(shape_scaled.x(), 4);
- calculator.set_border_mode(border_mode);
-
- //const PaddingSize read_padding(border_size);
- const PaddingSize write_padding = calculator.required_padding(PaddingCalculator::Option::EXCLUDE_BORDER);
- //validate(src.info()->padding(), read_padding);
- validate(dst.info()->padding(), write_padding);
-}
-
template <typename T>
using GCScaleFixture = ScaleValidationFixture<GCTensor, GCAccessor, GCScale, T>;
diff --git a/tests/validation/GLES_COMPUTE/SoftmaxLayer.cpp b/tests/validation/GLES_COMPUTE/SoftmaxLayer.cpp
index 2a8a33eaf7..863ce7b999 100644
--- a/tests/validation/GLES_COMPUTE/SoftmaxLayer.cpp
+++ b/tests/validation/GLES_COMPUTE/SoftmaxLayer.cpp
@@ -57,30 +57,6 @@ const auto CNNDataTypes = framework::dataset::make("DataType",
TEST_SUITE(GC)
TEST_SUITE(SoftmaxLayer)
-DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(concat(datasets::SoftmaxLayerSmallShapes(), datasets::SoftmaxLayerLargeShapes()), CNNDataTypes), shape, data_type)
-{
- // Create tensors
- GCTensor src = create_tensor<GCTensor>(shape, data_type, 1);
- GCTensor dst = create_tensor<GCTensor>(shape, data_type, 1);
-
- ARM_COMPUTE_EXPECT(src.info()->is_resizable(), framework::LogLevel::ERRORS);
- ARM_COMPUTE_EXPECT(dst.info()->is_resizable(), framework::LogLevel::ERRORS);
-
- // Create and configure function
- GCSoftmaxLayer smx_layer;
- smx_layer.configure(&src, &dst);
-
- // Validate valid region
- const ValidRegion valid_region = shape_to_valid_region(shape);
- validate(src.info()->valid_region(), valid_region);
- validate(dst.info()->valid_region(), valid_region);
-
- // Validate padding
- const PaddingSize padding = PaddingCalculator(shape.x(), 8).required_padding();
- validate(src.info()->padding(), padding);
- validate(dst.info()->padding(), padding);
-}
-
template <typename T>
using GCSoftmaxLayerFixture = SoftmaxValidationFixture<GCTensor, GCAccessor, GCSoftmaxLayer, T>;
diff --git a/tests/validation/GLES_COMPUTE/Transpose.cpp b/tests/validation/GLES_COMPUTE/Transpose.cpp
index d1c640dc44..90bd53a909 100644
--- a/tests/validation/GLES_COMPUTE/Transpose.cpp
+++ b/tests/validation/GLES_COMPUTE/Transpose.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 Arm Limited.
+ * Copyright (c) 2017-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -45,27 +45,6 @@ namespace validation
TEST_SUITE(GC)
TEST_SUITE(Transpose)
-DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(concat(datasets::Small2DShapes(), datasets::Large2DShapes()), framework::dataset::make("DataType", { DataType::F16, DataType::F32 })),
- shape, data_type)
-{
- // Make rows the columns of the original shape
- TensorShape output_shape{ shape[1], shape[0] };
-
- // Create tensors
- GCTensor ref_src = create_tensor<GCTensor>(shape, data_type);
- GCTensor dst = create_tensor<GCTensor>(output_shape, data_type);
-
- // Create and Configure function
- GCTranspose trans;
- trans.configure(&ref_src, &dst);
-
- // Validate dst region
- const ValidRegion valid_region = shape_to_valid_region(output_shape);
- validate(dst.info()->valid_region(), valid_region);
-
- // TODO(bsgcomp): Add padding validation (COMPMID-659)
-}
-
template <typename T>
using GCTransposeFixture = TransposeValidationFixture<GCTensor, GCAccessor, GCTranspose, T>;