Compute Library
 22.11
DepthConvertLayer.cpp File Reference
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/NEON/functions/NEDepthConvertLayer.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/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/DepthConvertLayerFixture.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 NEDepthConvertLayerToU16Fixture = DepthConvertLayerValidationFixture< Tensor, Accessor, NEDepthConvertLayer, T, uint16_t >
 
template<typename T >
using NEDepthConvertLayerToS16Fixture = DepthConvertLayerValidationFixture< Tensor, Accessor, NEDepthConvertLayer, T, int16_t >
 
template<typename T >
using NEDepthConvertLayerToS32Fixture = DepthConvertLayerValidationFixture< Tensor, Accessor, NEDepthConvertLayer, T, int32_t >
 
template<typename T >
using NEDepthConvertLayerToU8Fixture = DepthConvertLayerValidationFixture< Tensor, Accessor, NEDepthConvertLayer, T, uint8_t >
 
template<typename T >
using NEDepthConvertLayerToU32Fixture = DepthConvertLayerValidationFixture< Tensor, Accessor, NEDepthConvertLayer, T, uint32_t >
 
template<typename T >
using NEDepthConvertLayerToBF16Fixture = DepthConvertLayerValidationFixture< Tensor, Accessor, NEDepthConvertLayer, T, bfloat16 >
 
template<typename T >
using NEDepthConvertLayerToF16Fixture = DepthConvertLayerValidationFixture< Tensor, Accessor, NEDepthConvertLayer, T, half >
 
template<typename T >
using NEDepthConvertLayerToF32Fixture = DepthConvertLayerValidationFixture< Tensor, Accessor, NEDepthConvertLayer, T, float >
 
template<typename T >
using NEDepthConvertLayerToQASYMM8Fixture = DepthConvertLayerValidationQuantizedFixture< Tensor, Accessor, NEDepthConvertLayer, T, uint8_t >
 
template<typename T >
using NEDepthConvertLayerQuantizedToF16Fixture = DepthConvertLayerValidationQuantizedFixture< Tensor, Accessor, NEDepthConvertLayer, T, half >
 
template<typename T >
using NEDepthConvertLayerQuantizedToF32Fixture = DepthConvertLayerValidationQuantizedFixture< Tensor, Accessor, NEDepthConvertLayer, T, float >
 
template<typename T >
using NEDepthConvertLayerQuantizedToS32Fixture = DepthConvertLayerValidationQuantizedFixture< Tensor, Accessor, NEDepthConvertLayer, T, int32_t >
 

Functions

 DATA_TEST_CASE (Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(framework::dataset::make("InputInfo", { TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U16), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::S16), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::U8), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::U8), }), framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::U8), })), framework::dataset::make("Policy",{ ConvertPolicy::WRAP, ConvertPolicy::WRAP, ConvertPolicy::WRAP, ConvertPolicy::WRAP, ConvertPolicy::WRAP, ConvertPolicy::WRAP, ConvertPolicy::WRAP, })), framework::dataset::make("Shift",{ 0, 0, 0, 1, 1, 1, 8, 1, })), framework::dataset::make("Expected", { false, false, false, false, true})), input_info, output_info, policy, shift, expected)
 
 FIXTURE_DATA_TEST_CASE (RunSmall, NEDepthConvertLayerQuantizedToF32Fixture< uint8_t >, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallShapes(), DepthConvertLayerQASYMM8toF32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })), DepthConvertLayerZeroShiftDataset), framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerQuantizedToF32Fixture< uint8_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerQASYMM8toF32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })), DepthConvertLayerZeroShiftDataset), framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })))
 
 TEST_SUITE_END () FIXTURE_DATA_TEST_CASE(RunSmall = ActivationValidationQuantizedFixture<CLTensor, CLAccessor, CLActivationLayer, T>
 [CLActivationLayer Test snippet] More...
 
 combine (combine(combine(combine(datasets::SmallShapes(), DepthConvertLayerQASYMM8toS32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })), DepthConvertLayerZeroShiftDataset), framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerQuantizedToS32Fixture< uint8_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerQASYMM8toS32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })), DepthConvertLayerZeroShiftDataset), framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })))
 
 combine (combine(combine(datasets::SmallShapes(), DepthConvertLayerU8toU16Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerToU16Fixture< uint8_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerU8toU16Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 combine (combine(combine(datasets::SmallShapes(), DepthConvertLayerU8toS16Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerToS16Fixture< uint8_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerU8toS16Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 combine (combine(combine(datasets::SmallShapes(), DepthConvertLayerU8toS32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerToS32Fixture< uint8_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerU8toS32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 combine (combine(combine(datasets::SmallShapes(), DepthConvertLayerU8toF32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerToF32Fixture< uint8_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerU8toF32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 combine (combine(combine(datasets::SmallShapes(), DepthConvertLayerU16toU8Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerToU8Fixture< uint16_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerU16toU8Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 combine (combine(combine(datasets::SmallShapes(), DepthConvertLayerU16toU32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerToU32Fixture< uint16_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerU16toU32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 combine (combine(combine(datasets::SmallShapes(), DepthConvertLayerS16toU8Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerToU8Fixture< int16_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerS16toU8Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 combine (combine(combine(datasets::SmallShapes(), DepthConvertLayerS16toS32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerToS32Fixture< int16_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerS16toS32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 combine (combine(combine(datasets::SmallShapes(), DepthConvertLayerF32toS32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerToS32Fixture< float >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerF32toS32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 combine (combine(combine(datasets::SmallShapes(), DepthConvertLayerF32toU8Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerToU8Fixture< float >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerF32toU8Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 combine (combine(combine(combine(datasets::SmallShapes(), DepthConvertLayerF32toQASYMM8Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })), DepthConvertLayerZeroShiftDataset), framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerToQASYMM8Fixture< float >, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerF32toQASYMM8Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })), DepthConvertLayerZeroShiftDataset), framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })))
 
 combine (combine(combine(datasets::SmallShapes(), DepthConvertLayerS32toF32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerToF32Fixture< int32_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerS32toF32Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 combine (combine(combine(combine(datasets::SmallShapes(), DepthConvertLayerS32toQASYMM8Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })), DepthConvertLayerZeroShiftDataset), framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerToQASYMM8Fixture< int32_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerS32toQASYMM8Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })), DepthConvertLayerZeroShiftDataset), framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })))
 
 combine (combine(combine(datasets::SmallShapes(), DepthConvertLayerS32toU8Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 
 FIXTURE_DATA_TEST_CASE (RunLarge, NEDepthConvertLayerToU8Fixture< int32_t >, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), DepthConvertLayerS32toU8Dataset), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), DepthConvertLayerZeroShiftDataset))
 

Variables

 NEDepthConvertLayerQuantizedToS32Fixture< uint8_t >
 
 NEDepthConvertLayerToU16Fixture< uint8_t >
 
 NEDepthConvertLayerToS16Fixture< uint8_t >
 
 NEDepthConvertLayerToS32Fixture< uint8_t >
 
 NEDepthConvertLayerToF32Fixture< uint8_t >
 
 NEDepthConvertLayerToU8Fixture< uint16_t >
 
 NEDepthConvertLayerToU32Fixture< uint16_t >
 
 NEDepthConvertLayerToU8Fixture< int16_t >
 
 NEDepthConvertLayerToS32Fixture< int16_t >
 
 NEDepthConvertLayerToS32Fixture< float >
 
 NEDepthConvertLayerToU8Fixture< float >
 
 NEDepthConvertLayerToQASYMM8Fixture< float >
 
 NEDepthConvertLayerToF32Fixture< int32_t >
 
 NEDepthConvertLayerToQASYMM8Fixture< int32_t >
 
 NEDepthConvertLayerToU8Fixture< int32_t >