37 int result_fixedpoint_multiplier,
int result_shift,
int result_offset_after_shift,
40 configure(
CLKernelLibrary::get().get_compile_context(), input, bias, output, result_fixedpoint_multiplier, result_shift, result_offset_after_shift, min, max);
44 int result_fixedpoint_multiplier,
int result_shift,
int result_offset_after_shift,
48 info.gemmlowp_multiplier = result_fixedpoint_multiplier;
49 info.gemmlowp_shift = result_shift;
50 info.gemmlowp_offset = result_offset_after_shift;
51 info.gemmlowp_min_bound = min;
52 info.gemmlowp_max_bound = max;
54 auto k = std::make_unique<CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel>();
55 k->configure(compile_context, input, bias, output, &
info);
56 _kernel = std::move(k);
63 info.gemmlowp_min_bound = min;
64 info.gemmlowp_max_bound = max;
70 int result_fixedpoint_multiplier,
int result_shift,
int result_offset_after_shift,
73 configure(
CLKernelLibrary::get().get_compile_context(), input, bias, output, result_fixedpoint_multiplier, result_shift, result_offset_after_shift, min, max);
77 int result_fixedpoint_multiplier,
int result_shift,
int result_offset_after_shift,
81 info.gemmlowp_multiplier = result_fixedpoint_multiplier;
82 info.gemmlowp_shift = result_shift;
83 info.gemmlowp_offset = result_offset_after_shift;
84 info.gemmlowp_min_bound = min;
85 info.gemmlowp_max_bound = max;
87 auto k = std::make_unique<CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel>();
88 k->configure(compile_context, input, bias, output, &
info);
89 _kernel = std::move(k);
96 info.gemmlowp_min_bound = min;
97 info.gemmlowp_max_bound = max;
103 int result_fixedpoint_multiplier,
int result_shift,
110 int result_fixedpoint_multiplier,
int result_shift,
114 info.gemmlowp_multiplier = result_fixedpoint_multiplier;
115 info.gemmlowp_shift = result_shift;
116 info.gemmlowp_min_bound = min;
117 info.gemmlowp_max_bound = max;
119 auto k = std::make_unique<CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel>();
120 k->configure(compile_context, input, bias, output, &
info);
121 _kernel = std::move(k);
128 info.gemmlowp_min_bound = min;
129 info.gemmlowp_max_bound = max;
147 auto k = std::make_unique<CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel>();
148 k->configure(compile_context, input, bias, output, &info);
149 _kernel = std::move(k);
154 auto k = std::make_unique<CLGEMMLowpQuantizeDownInt32ScaleKernel>();
155 k->configure(compile_context, input, bias, output, &info);
156 _kernel = std::move(k);
161 auto k = std::make_unique<CLGEMMLowpQuantizeDownInt32ScaleByFloatKernel>();
162 k->configure(compile_context, input, bias, output, &info);
163 _kernel = std::move(k);
Quantize using a fixed point multiplication.
quantized, symmetric fixed-point 16-bit number
static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, const GEMMLowpOutputStageInfo *output_stage)
Static function to check if given info will lead to a valid configuration of CLGEMMLowpQuantizeDownIn...
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, int min=std::numeric_limits< int32_t >::lowest(), int max=std::numeric_limits< int32_t >::max())
Static function to check if given info will lead to a valid configuration of CLGEMMLowpQuantizeDownIn...
void configure(const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, int result_fixedpoint_multiplier, int result_shift, int min=std::numeric_limits< int32_t >::lowest(), int max=std::numeric_limits< int32_t >::max())
Initialise the kernel's inputs, output.
void configure(const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, const GEMMLowpOutputStageInfo &info)
Initialise the kernel's inputs, output.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Store the tensor's metadata.
GEMMLowpOutputStageType type
GEMMLowp output stage type.
Copyright (c) 2017-2021 Arm Limited.
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, const GEMMLowpOutputStageInfo &info)
Static function to check if given info will lead to a valid configuration of CLGEMMLowpQuantizeDownIn...
static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, const GEMMLowpOutputStageInfo *info)
Static function to check if given info will lead to a valid configuration of CLGEMMLowpQuantizeDownIn...
void configure(const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, int result_fixedpoint_multiplier, int result_shift, int result_offset_after_shift, int min=std::numeric_limits< int32_t >::lowest(), int max=std::numeric_limits< int32_t >::max())
Initialise the kernel's inputs, output.
quantized, asymmetric fixed-point 8-bit number unsigned
GEMMLowp output stage info.
Quantize using a floating point multiplication.
Quantize using an integer multiplication.
static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, int min=std::numeric_limits< int32_t >::lowest(), int max=std::numeric_limits< int32_t >::max())
Static function to check if given info will lead to a valid configuration of CLGEMMLowpQuantizeDownIn...
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
Interface for OpenCL tensor.
#define ARM_COMPUTE_CREATE_ERROR(error_code, msg)
Creates an error with a given message.
static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, int min=std::numeric_limits< int32_t >::lowest(), int max=std::numeric_limits< int32_t >::max())
Static function to check if given info will lead to a valid configuration of CLGEMMLowpQuantizeDownIn...
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, const GEMMLowpOutputStageInfo *info)
Static function to check if given info will lead to a valid configuration of CLGEMMLowpQuantizeDownIn...
quantized, asymmetric fixed-point 8-bit number signed
void configure(const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, int result_fixedpoint_multiplier, int result_shift, int result_offset_after_shift, int min=std::numeric_limits< int32_t >::lowest(), int max=std::numeric_limits< int32_t >::max())
Initialise the kernel's inputs, output.