31 #include "tests/datasets/LargeGEMMLowpDataset.h" 32 #include "tests/datasets/ShapeDatasets.h" 33 #include "tests/datasets/SmallGEMMLowpDataset.h" 38 #include "tests/validation/fixtures/GEMMLowpFixture.h" 68 CLGEMMLowpMatrixMultiplyCore gemmlowp_mm;
69 gemmlowp_mm.configure(&a, &b, &c);
100 shape, result_offset, result_mult_int, result_shift,
min,
max, add_bias)
115 output_stage.
configure(&in, add_bias ? &bias :
nullptr, &out, result_offset, result_mult_int, result_shift,
min,
max);
120 validate(out.info()->valid_region(), valid_region);
126 validate(bias.info()->valid_region(), valid_region_bias);
132 validate(out.info()->padding(), padding);
136 validate(bias.info()->padding(), padding);
168 TEST_SUITE(QuantizeDownInt32ToUint8ScaleByFixedPoint)
179 GEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointValidationFixture<CLTensor, CLAccessor, CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint>;
182 quantize_down_int32_to_uint8_scale_by_fixedpoint_cases),
183 shape, result_fixedpoint_multiplier, result_shift, result_offset_after_shift,
min,
max, add_bias)
198 output_stage.
configure(&in, add_bias ? &bias :
nullptr, &out, result_fixedpoint_multiplier, result_shift, result_offset_after_shift,
min,
max);
203 validate(out.info()->valid_region(), valid_region);
209 validate(bias.info()->valid_region(), valid_region_bias);
215 validate(out.info()->padding(), padding);
219 validate(bias.info()->padding(), padding);
224 quantize_down_int32_to_uint8_scale_by_fixedpoint_cases))
231 quantize_down_int32_to_uint8_scale_by_fixedpoint_cases))
fixed_point< T > min(fixed_point< T > x, fixed_point< T > y)
bool is_resizable() const override
Flag indicating whether the size of the tensor can be changed.
GEMMLowpQuantizeDownInt32ToUint8ScaleValidationFixture< CLTensor, CLAccessor, CLGEMMLowpQuantizeDownInt32ToUint8Scale > CLGEMMLowpQuantizeDownInt32ToUint8ScaleFixture
Container for 2D border size.
ValidRegion valid_region() const override
Valid region of the tensor.
void configure(const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, int result_fixedpoint_multiplier, int result_shift, int result_offset_after_shift, int min=0, int max=0)
Initialise the kernel's inputs, output.
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
GEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointValidationFixture< CLTensor, CLAccessor, CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint > CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointFixture
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.
ITensorInfo & set_quantization_info(const QuantizationInfo &quantization_info) override
Set the quantization settings (scale and offset) of the tensor.
void configure(const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, int result_offset, int result_mult_int, int result_shift, int min=0, int max=0)
Initialise the kernel's inputs, output.
This file contains all available output stages for GEMMLowp on OpenCL.
#define TEST_SUITE(SUITE_NAME)
1 channel, 1 S32 per channel
Basic function to execute CLGEMMLowpQuantizeDownInt32ToUint8Scale on OpenCL.
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.
const auto quantize_down_int32_to_uint8_scale_relu_cases
quantized, asymmetric fixed-point 8-bit number
Accessor implementation for CLTensor objects.
virtual ITensorInfo & set_quantization_info(const QuantizationInfo &quantization_info)=0
Set the quantization settings (scale and offset) of the tensor.
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)
Basic function to execute CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint on OpenCL.
combine(combine(combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), framework::dataset::make("DataType",{DataType::U8, DataType::S16})), datasets::BorderModes()), framework::dataset::make("filter_size",{5}))
Basic function to execute GEMMLowpMatrixMultiplyCore on OpenCL.
fixed_point< T > max(fixed_point< T > x, fixed_point< T > y)
JoinDataset< T, U > concat(T &&dataset1, U &&dataset2)
Helper function to create a JoinDataset.
Quantization settings (used for QASYMM8 data type)
Container for valid region of a window.
const auto quantize_down_int32_to_uint8_scale_by_fixedpoint_relu_cases
GEMMLowpMatrixMultiplyCoreValidationFixture< CLTensor, CLAccessor, CLGEMMLowpMatrixMultiplyCore > CLGEMMLowpMatrixMultiplyCoreFixture
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.
Calculate required padding.
Basic implementation of the OpenCL tensor interface.