Compute Library
 22.05
Pooling3dLayer.cpp File Reference
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/NEON/functions/NEPooling3dLayer.h"
#include "arm_compute/runtime/Tensor.h"
#include "arm_compute/runtime/TensorAllocator.h"
#include "tests/NEON/Accessor.h"
#include "tests/PaddingCalculator.h"
#include "tests/datasets/Pooling3dLayerDataset.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/Pooling3dLayerFixture.h"

Go to the source code of this file.

Namespaces

 arm_compute
 Copyright (c) 2017-2022 Arm Limited.
 
 arm_compute::test
 
 arm_compute::test::validation
 

Typedefs

template<typename T >
using NEPoolingLayer3dFixture = Pooling3dLayerValidationFixture< Tensor, Accessor, NEPooling3dLayer, T >
 
template<typename T >
using NESpecial3dPoolingLayerFixture = SpecialPooling3dLayerValidationFixture< Tensor, Accessor, NEPooling3dLayer, T >
 
template<typename T >
using NEPooling3dLayerGlobalFixture = Pooling3dLayerGlobalValidationFixture< Tensor, Accessor, NEPooling3dLayer, T >
 

Functions

 DATA_TEST_CASE (Validate, framework::DatasetMode::ALL, zip(zip(zip(framework::dataset::make("InputInfo", { TensorInfo(TensorShape(2U, 27U, 13U, 4U, 3U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(2U, 27U, 13U, 4U, 2U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(2U, 27U, 13U, 4U, 2U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(2U, 27U, 13U, 4U, 3U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 13U, 15U, 2U, 3U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(13U, 13U, 5U, 1U, 2U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 13U, 13U, 4U, 4U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 13U, 13U, 4U, 4U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 13U, 13U, 4U, 4U), 1, DataType::F32, DataLayout::NHWC), TensorInfo(TensorShape(5U, 13U, 13U, 5U, 4U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(1U, 16U, 1U, 3U, 4U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 13U, 13U, 4U, 3U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 13U, 13U, 4U, 2U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 13U, 13U, 4U, 3U), 1, DataType::F32, DataLayout::NDHWC), }), framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(2U, 25U, 11U, 3U, 3U), 1, DataType::F16, DataLayout::NDHWC), TensorInfo(TensorShape(2U, 30U, 11U, 3U, 2U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(2U, 25U, 16U, 3U, 2U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(2U, 27U, 13U, 3U, 3U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 1U, 1U, 1U, 3U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 2U, 2U, 2U, 2U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 12U, 12U, 3U, 4U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 12U, 12U, 3U, 4U), 1, DataType::QASYMM8, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 12U, 12U, 3U, 4U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 1U, 1U, 1U, 4U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(1U, 15U, 1U, 2U, 4U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 6U, 6U, 2U, 3U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 6U, 6U, 2U, 2U), 1, DataType::F32, DataLayout::NDHWC), TensorInfo(TensorShape(5U, 6U, 6U, 2U, 3U), 1, DataType::F32, DataLayout::NDHWC), })), framework::dataset::make("PoolInfo", { Pooling3dLayerInfo(PoolingType::AVG, 3, Size3D(1, 1, 1), Padding3D(0, 0, 0)), Pooling3dLayerInfo(PoolingType::AVG, 2, Size3D(1, 1, 1), Padding3D(2, 0, 0)), Pooling3dLayerInfo(PoolingType::AVG, 2, Size3D(1, 1, 1), Padding3D(0, 0, 0)), Pooling3dLayerInfo(PoolingType::L2, 3, Size3D(1, 1, 1), Padding3D(0, 0, 0)), Pooling3dLayerInfo(PoolingType::AVG), Pooling3dLayerInfo(PoolingType::MAX), Pooling3dLayerInfo(PoolingType::AVG, 2, Size3D(), Padding3D(), false), Pooling3dLayerInfo(PoolingType::AVG, 2, Size3D(1U, 1U, 1U), Padding3D(), false), Pooling3dLayerInfo(PoolingType::AVG, 2, Size3D(1U, 1U, 1U), Padding3D(), false), Pooling3dLayerInfo(PoolingType::AVG), Pooling3dLayerInfo(PoolingType::MAX, 2, Size3D(1, 1, 2), Padding3D(0, 0, 0), false), Pooling3dLayerInfo(PoolingType::AVG, 2, Size3D(2U, 2U, 2U), Padding3D(), false), Pooling3dLayerInfo(PoolingType::AVG, 1, Size3D(2U, 2U, 2U), Padding3D(2, 2, 2), true), Pooling3dLayerInfo(PoolingType::AVG, 1, Size3D(2U, 2U, 2U), Padding3D(2, 2, 2), false), Pooling3dLayerInfo(PoolingType::AVG, 3, Size3D(2U, 2U, 2U), Padding3D(2, 1, 2, 2, 1, 2), false, false, DimensionRoundingType::CEIL), })), framework::dataset::make("Expected", { false, false, false, false, true, false, false, false, false, true, false, true, false, false, false})), input_info, output_info, pool_info, expected)
 
 FIXTURE_DATA_TEST_CASE (RunSpecial, NESpecial3dPoolingLayerFixture< float >, framework::DatasetMode::ALL, datasets::Pooling3dLayerDatasetSpecial() *framework::dataset::make("DataType", DataType::F32))
 
 FIXTURE_DATA_TEST_CASE (RunSmall, NEPoolingLayer3dFixture< float >, framework::DatasetMode::PRECOMMIT, combine(datasets::Small5dShapes(), combine(Pooling3dLayerDatasetFPSmall, framework::dataset::make("DataType", DataType::F32))))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEPoolingLayer3dFixture< float >, framework::DatasetMode::NIGHTLY, combine(datasets::Large5dShapes(), combine(Pooling3dLayerDatasetFPSmall, framework::dataset::make("DataType", DataType::F32))))
 
 FIXTURE_DATA_TEST_CASE (RunSmall, NEPoolingLayer3dFixture< float >, framework::DatasetMode::ALL, combine(combine(combine(combine(combine(combine(framework::dataset::make("InputShape", { TensorShape(3U, 27U, 13U, 4U), TensorShape(4U, 27U, 13U, 4U, 2U) }), framework::dataset::make("PoolingType", { PoolingType::AVG, PoolingType::L2, PoolingType::MAX })), framework::dataset::make("PoolingSize", { Size3D(27, 13, 4) })), framework::dataset::make("Strides", Size3D(1, 1, 1))), framework::dataset::make("Paddings", Padding3D(0, 0, 0))), framework::dataset::make("ExcludePadding", {false, true})), framework::dataset::make("DataType", DataType::F32)))
 
 FIXTURE_DATA_TEST_CASE (RunGlobalSmall, NEPooling3dLayerGlobalFixture< float >, framework::DatasetMode::ALL, combine(combine(framework::dataset::make("InputShape", { TensorShape(27U, 13U, 4U, 3U), TensorShape(27U, 13U, 4U, 4U, 2U) }), framework::dataset::make("PoolingType", { PoolingType::AVG, PoolingType::L2, PoolingType::MAX })), framework::dataset::make("DataType", DataType::F32)))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEPoolingLayer3dFixture< float >, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(framework::dataset::make("InputShape", { TensorShape(4U, 79U, 37U, 11U), TensorShape(4U, 79U, 37U, 11U, 2U) }), framework::dataset::make("PoolingType", { PoolingType::AVG, PoolingType::L2, PoolingType::MAX })), framework::dataset::make("PoolingSize", { Size3D(79, 37, 11) })), framework::dataset::make("Strides", Size3D(1, 1, 1))), framework::dataset::make("Paddings", Padding3D(0, 0, 0))), framework::dataset::make("ExcludePadding", {false, true})), framework::dataset::make("DataType", DataType::F32)))
 
 TEST_SUITE_END () FIXTURE_DATA_TEST_CASE(RunSmall = ActivationValidationQuantizedFixture<CLTensor, CLAccessor, CLActivationLayer, T>
 [CLActivationLayer Test snippet] More...
 
 FIXTURE_DATA_TEST_CASE (RunSmall, NEPooling3dLayerQuantizedFixture< uint8_t >, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small5dShapes(), combine(Pooling3dLayerDatasetQASYMM8Small, framework::dataset::make("DataType", DataType::QASYMM8))), qasymm8_in_qinfo_dataset), qasymm8_out_qinfo_dataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEPooling3dLayerQuantizedFixture< uint8_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large5dShapes(), combine(Pooling3dLayerDatasetQASYMM8Large, framework::dataset::make("DataType", DataType::QASYMM8))), qasymm8_in_qinfo_dataset), qasymm8_out_qinfo_dataset))
 
 combine (combine(combine(datasets::Small5dShapes(), combine(Pooling3dLayerDatasetQASYMM8Small, framework::dataset::make("DataType", DataType::QASYMM8_SIGNED))), qasymm8_signed_in_qinfo_dataset), qasymm8_signed_out_qinfo_dataset))
 

Variables

 NEPooling3dLayerQuantizedFixture< int8_t >