35 #include "tests/datasets/LargeConvolutionLayerDataset.h" 36 #include "tests/datasets/ShapeDatasets.h" 37 #include "tests/datasets/SmallConvolutionLayerDataset.h" 38 #include "tests/datasets/WinogradInputTransformDataset.h" 39 #include "tests/datasets/WinogradOutputTransformDataset.h" 44 #include "tests/validation/fixtures/WinogradConvolutionLayerFixture.h" 54 constexpr AbsoluteTolerance<float> tolerance_f32(0.001f);
55 constexpr AbsoluteTolerance<float> tolerance_convolution_layer_f32(0.1f);
68 framework::dataset::
make("InputInfo",{
87 WinogradInfo(
Size2D(2, 2),
Size2D(3, 3),
Size2D(53
U, 21
U),
PadStrideInfo(1, 1, 1, 0),
DataLayout::NCHW),
88 WinogradInfo(
Size2D(2, 2),
Size2D(3, 3),
Size2D(53
U, 21
U),
PadStrideInfo(1, 1, 0, 0),
DataLayout::NCHW),
89 WinogradInfo(
Size2D(2, 2),
Size2D(3, 3),
Size2D(53
U, 21
U),
PadStrideInfo(1, 1, 1, 1),
DataLayout::NCHW),
90 WinogradInfo(
Size2D(2, 2),
Size2D(3, 3),
Size2D(53
U, 21
U),
PadStrideInfo(2, 1, 1, 1),
DataLayout::NCHW),
91 WinogradInfo(
Size2D(2, 2),
Size2D(3, 3),
Size2D(53
U, 33
U),
PadStrideInfo(1, 1, 0, 1),
DataLayout::NCHW),
92 WinogradInfo(
Size2D(2, 2),
Size2D(3, 3),
Size2D(34
U, 42
U),
PadStrideInfo(1, 1, 0, 0),
DataLayout::NCHW),
93 WinogradInfo(
Size2D(2, 2),
Size2D(3, 3),
Size2D(31
U, 37
U),
PadStrideInfo(1, 1, 1, 1),
DataLayout::NCHW)
108 shape_in, winograd_info, data_layout,
data_type)
123 winograd_input_transform.configure(&in, &out, winograd_info);
202 winograd_filter_transform.configure(&a, &b, winograd_info);
267 WinogradInfo(
Size2D(2
U, 2
U),
Size2D(3
U, 3
U),
Size2D(14
U, 14
U),
PadStrideInfo(1, 1, 1, 1),
DataLayout::NCHW),
268 WinogradInfo(
Size2D(2
U, 2
U),
Size2D(3
U, 3
U),
Size2D(14
U, 14
U),
PadStrideInfo(1, 1, 1, 1),
DataLayout::NCHW),
269 WinogradInfo(
Size2D(2
U, 2
U),
Size2D(5
U, 5
U),
Size2D(14
U, 14
U),
PadStrideInfo(1, 1, 1, 1),
DataLayout::NCHW),
270 WinogradInfo(
Size2D(2
U, 2
U),
Size2D(3
U, 3
U),
Size2D(14
U, 14
U),
PadStrideInfo(1, 1, 1, 1),
DataLayout::NCHW),
271 WinogradInfo(
Size2D(2
U, 2
U),
Size2D(3
U, 3
U),
Size2D(17
U, 23
U),
PadStrideInfo(1, 1, 1, 1),
DataLayout::NCHW),
272 WinogradInfo(
Size2D(2
U, 2
U),
Size2D(3
U, 3
U),
Size2D(8
U, 10
U),
PadStrideInfo(1, 1, 1, 1),
DataLayout::NCHW),
273 WinogradInfo(
Size2D(2
U, 3
U),
Size2D(3
U, 3
U),
Size2D(8
U, 10
U),
PadStrideInfo(1, 1, 0, 0),
DataLayout::NCHW),
274 WinogradInfo(
Size2D(4
U, 4
U),
Size2D(3
U, 3
U),
Size2D(64
U, 64
U),
PadStrideInfo(1, 1, 1, 1),
DataLayout::NCHW),
275 WinogradInfo(
Size2D(4
U, 4
U),
Size2D(3
U, 3
U),
Size2D(64
U, 64
U),
PadStrideInfo(1, 1, 1, 1),
DataLayout::NCHW)
277 framework::dataset::make(
"Expected", {
false,
false,
false,
true,
false,
true,
false,
true,
false })),
303 winograd_output_transform.configure(&a,
nullptr, &b, winograd_info);
370 combine(
combine(datasets::SmallWinogradConvolutionLayer3x3Dataset(),
379 combine(
combine(datasets::LargeWinogradConvolutionLayer3x3Dataset(),
399 combine(
combine(datasets::LargeWinogradConvolutionLayer5x5Dataset(),
template SimpleTensor< float > winograd_input_transform(const SimpleTensor< float > &in, const TensorShape &output_shape, const WinogradInfo &winograd_info)
TensorShape compute_winograd_input_transform_shape(const ITensorInfo &input, const WinogradInfo &winograd_info)
bool is_resizable() const override
Flag indicating whether the size of the tensor can be changed.
WinogradInputTransformValidationFixture< CLTensor, CLAccessor, CLWinogradInputTransform, float > CLWinogradInputTransformFixture
WinogradOutputTransformValidationFixture< CLTensor, CLAccessor, CLWinogradOutputTransform, float > CLWinogradOutputTransformFixture
WinogradFilterTransformValidationFixture< CLTensor, CLAccessor, CLWinogradFilterTransform, float > CLWinogradFilterTransformFixture
template SimpleTensor< float > winograd_output_transform(const SimpleTensor< float > &in, const SimpleTensor< float > &b, const TensorShape &output_shape, const WinogradInfo &winograd_info)
1 channel, 1 F32 per channel
WinogradConvolutionLayerFastMathValidationFixture< CLTensor, CLAccessor, CLWinogradConvolutionLayer, float > CLWinogradConvolutionLayerFastMathFixture
As above but this also setups a Zero border on the input tensor of the specified bordersize.
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
TensorInfo * info() const override
Interface to be implemented by the child class to return the tensor's metadata.
Activation Layer Information class.
This file contains all available output stages for GEMMLowp on OpenCL.
1 channel, 1 F16 per channel
#define TEST_SUITE(SUITE_NAME)
FIXTURE_DATA_TEST_CASE(RunSmall, CLAbsoluteDifferenceFixture< uint8_t >, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallShapes(), AbsoluteDifferenceU8Dataset))
validate(dst.info() ->valid_region(), dst_valid_region)
DatasetMode
Possible dataset modes.
quantized, asymmetric fixed-point 8-bit number
Accessor implementation for CLTensor objects.
Padding and stride information class.
TensorShape compute_winograd_filter_transform_shape(const ITensorInfo &input, const WinogradInfo &winograd_info)
Num samples, channels, height, width.
DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), AbsoluteDifferenceU8Dataset), shape, data_type0, data_type1, output_data_type)
TensorShape compute_winograd_output_transform_shape(const ITensorInfo &input, const WinogradInfo &winograd_info)
TEST_SUITE_END() DATA_TEST_CASE(Configuration
ARM_COMPUTE_EXPECT(src.info() ->is_resizable(), framework::LogLevel::ERRORS)
Class for specifying the size of an image or rectangle.
template SimpleTensor< float > winograd_filter_transform(const SimpleTensor< float > &in, const TensorShape &output_shape, const WinogradInfo &winograd_info)
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.
Quantization settings (used for QASYMM8 data type)
DataType
Available data types.
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}))
static Status validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo(), bool enable_fast_math=false)
Static function to check if given info will lead to a valid configuration of CLWinogradConvolutionLay...
Basic implementation of the OpenCL tensor interface.