30 #include "tests/datasets/ConvertPolicyDataset.h" 31 #include "tests/datasets/ShapeDatasets.h" 36 #include "tests/validation/fixtures/ArithmeticAdditionFixture.h" 113 add.configure(&ref_src1, &ref_src2, &dst, policy);
117 validate(dst.info()->valid_region(), valid_region);
122 validate(ref_src2.info()->padding(), padding);
123 validate(dst.info()->padding(), padding);
146 add.configure(&ref_src1, &ref_src2, &dst, policy);
150 validate(dst.info()->valid_region(), valid_region);
155 validate(ref_src2.info()->padding(), padding);
156 validate(dst.info()->padding(), padding);
174 template <
typename T>
236 add.configure(&ref_src1, &ref_src2, &dst, policy);
240 validate(dst.info()->valid_region(), valid_region);
245 validate(ref_src2.info()->padding(), padding);
246 validate(dst.info()->padding(), padding);
263 template <
typename T>
267 ArithmeticAdditionFP32Dataset),
275 ArithmeticAdditionFP32Dataset),
quantized, symmetric fixed-point 16-bit number
quantized, symmetric fixed-point 8-bit number
Container for 2D border size.
1 channel, 1 U8 per channel
half_float::half half
16-bit floating point type
1 channel, 1 F32 per channel
Basic function to run CLArithmeticAdditionKernel.
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
PaddingSize padding() const override
Padding of tensor.
TensorInfo * info() const override
Interface to be implemented by the child class to return the tensor's metadata.
This file contains all available output stages for GEMMLowp on OpenCL.
1 channel, 1 F16 per channel
#define TEST_SUITE(SUITE_NAME)
fixed_point< T > add(fixed_point< T > x, fixed_point< T > y)
FIXTURE_DATA_TEST_CASE(RunSmall, CLAbsoluteDifferenceFixture< uint8_t >, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallShapes(), AbsoluteDifferenceU8Dataset))
validate(dst.info() ->valid_region(), dst_valid_region)
ArithmeticAdditionValidationFixedPointFixture< CLTensor, CLAccessor, CLArithmeticAddition, T > CLArithmeticAdditionFixedPointFixture
DatasetMode
Possible dataset modes.
Accessor implementation for CLTensor objects.
1 channel, 1 S16 per channel
DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), AbsoluteDifferenceU8Dataset), shape, data_type0, data_type1, output_data_type)
TEST_SUITE_END() DATA_TEST_CASE(Configuration
ARM_COMPUTE_EXPECT(src.info() ->is_resizable(), framework::LogLevel::ERRORS)
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, ConvertPolicy policy)
Static function to check if given info will lead to a valid configuration of CLArithmeticAddition.
combine(combine(combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), framework::dataset::make("DataType",{DataType::U8, DataType::S16})), datasets::BorderModes()), framework::dataset::make("filter_size",{5}))
Store the tensor's metadata.
JoinDataset< T, U > concat(T &&dataset1, U &&dataset2)
Helper function to create a JoinDataset.
Container for valid region of a window.
DataType
Available data types.
ArithmeticAdditionBroadcastValidationFixture< CLTensor, CLAccessor, CLArithmeticAddition, T > CLArithmeticAdditionBroadcastFixture
zip(zip(zip(framework::dataset::make("InputInfo",{TensorInfo(TensorShape(3U, 3U, 5U, 3U), 1, DataType::F16), TensorInfo(TensorShape(3U, 3U, 5U, 3U), 1, DataType::QASYMM8), TensorInfo(TensorShape(5U, 5U, 5U, 3U), 1, DataType::F32), TensorInfo(TensorShape(3U, 3U), 1, DataType::F32), TensorInfo(TensorShape(3U, 3U, 5U, 3U), 1, DataType::F32), TensorInfo(TensorShape(3U, 3U, 37U, 2U), 1, DataType::F32), TensorInfo(TensorShape(3U, 3U, 37U, 22U), 1, DataType::F32)}), framework::dataset::make("OutputInfo",{TensorInfo(TensorShape(3U, 5U, 16U), 1, DataType::F16), TensorInfo(TensorShape(3U, 5U, 16U), 1, DataType::QASYMM8), TensorInfo(TensorShape(3U, 5U, 16U), 1, DataType::F32), TensorInfo(TensorShape(1U, 1U, 16U), 1, DataType::F32), TensorInfo(TensorShape(3U, 5U, 16U), 1, DataType::F32), TensorInfo(TensorShape(2U, 37U, 16U), 1, DataType::F32), TensorInfo(TensorShape(22U, 37U, 36U), 1, DataType::F32)})), framework::dataset::make("WinogradInfo",{WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(3U, 3U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(2U, 2U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW), WinogradInfo(Size2D(4U, 4U), Size2D(3U, 3U), Size2D(), PadStrideInfo(), DataLayout::NCHW)})), framework::dataset::make("Expected",{false, false, false, false, true, true, true}))
ConvertPolicy
Policy to handle overflow.
ValidRegion shape_to_valid_region(const TensorShape &a_shape, bool border_undefined=false, BorderSize border_size=BorderSize(0))
Create a valid region based on tensor shape, border mode and border size.
ArithmeticAdditionValidationFixture< CLTensor, CLAccessor, CLArithmeticAddition, T > CLArithmeticAdditionFixture
Calculate required padding.
Basic implementation of the OpenCL tensor interface.