21.05
|
Basic function to execute GEMMLowpQuantizeDown kernels on CL. More...
#include <CLGEMMLowpOutputStage.h>
Public Member Functions | |
void | configure (const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, const GEMMLowpOutputStageInfo &info) |
Initialise the kernel's inputs, output. More... | |
void | configure (const CLCompileContext &compile_context, const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, const GEMMLowpOutputStageInfo &info) |
Initialise the kernel's inputs, output. More... | |
Public Member Functions inherited from ICLSimpleFunction | |
ICLSimpleFunction (CLRuntimeContext *ctx=nullptr) | |
Constructor. More... | |
ICLSimpleFunction (const ICLSimpleFunction &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICLSimpleFunction (ICLSimpleFunction &&)=default | |
Default move constructor. More... | |
ICLSimpleFunction & | operator= (const ICLSimpleFunction &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICLSimpleFunction & | operator= (ICLSimpleFunction &&)=default |
Default move assignment operator. More... | |
~ICLSimpleFunction () | |
Default destructor. More... | |
void | run () override final |
Run the kernels contained in the function. More... | |
Public Member Functions inherited from IFunction | |
virtual | ~IFunction ()=default |
Destructor. More... | |
virtual void | prepare () |
Prepare the function for executing. More... | |
Static Public Member Functions | |
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 CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel. More... | |
Basic function to execute GEMMLowpQuantizeDown kernels on CL.
This function calls the following CL kernels:
Definition at line 286 of file CLGEMMLowpOutputStage.h.
void configure | ( | const ICLTensor * | input, |
const ICLTensor * | bias, | ||
ICLTensor * | output, | ||
const GEMMLowpOutputStageInfo & | info | ||
) |
Initialise the kernel's inputs, output.
Valid data layouts:
Valid data type configurations:
src0 | src1 | dst |
---|---|---|
S32 | S32 | QASYMM8 |
S32 | S32 | QASYMM8_SIGNED |
S32 | S32 | QSYMM16 |
[in] | input | Input tensor. Data type supported: S32 |
[in] | bias | Biases tensor. Only shared biases supported and it can be a nullptr if the biases addition is not required. Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as input . |
[out] | output | Output tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM16 |
[in] | info | GEMMLowp output stage metadata. |
Definition at line 134 of file CLGEMMLowpOutputStage.cpp.
References CLKernelLibrary::get(), arm_compute::test::validation::info, and arm_compute::test::validation::input.
Referenced by CLGEMMDeconvolutionLayer::configure(), and CLQLSTMLayer::configure().
void configure | ( | const CLCompileContext & | compile_context, |
const ICLTensor * | input, | ||
const ICLTensor * | bias, | ||
ICLTensor * | output, | ||
const GEMMLowpOutputStageInfo & | info | ||
) |
Initialise the kernel's inputs, output.
[in] | compile_context | The compile context to be used. |
[in] | input | Input tensor. Data type supported: S32 |
[in] | bias | Biases tensor. Only shared biases supported and it can be a nullptr if the biases addition is not required. Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as input . |
[out] | output | Output tensor. Data type supported: QASYMM8/QASYMM8_SIGNED |
[in] | info | GEMMLowp output stage metadata. |
Definition at line 139 of file CLGEMMLowpOutputStage.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON_NULLPTR, arm_compute::test::validation::info, arm_compute::test::validation::input, arm_compute::QUANTIZE_DOWN, arm_compute::QUANTIZE_DOWN_FIXEDPOINT, and arm_compute::QUANTIZE_DOWN_FLOAT.
|
static |
Static function to check if given info will lead to a valid configuration of CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel.
[in] | input | Input tensor. It is the output of CLGEMMLowpMatrixMultiplyCore function. Data type supported: S32 |
[in] | bias | Biases tensor. Only shared biases supported and it can be a nullptr if the addition of biases is not required. Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as input . |
[in] | output | Output tensor. Data type supported: QASYMM8/QASYMM8_SIGNED |
[in] | info | GEMMLowp output stage metadata. |
Definition at line 171 of file CLGEMMLowpOutputStage.cpp.
References ARM_COMPUTE_CREATE_ERROR, ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, arm_compute::test::validation::info, arm_compute::test::validation::input, arm_compute::QASYMM8, arm_compute::QASYMM8_SIGNED, arm_compute::QSYMM16, arm_compute::QUANTIZE_DOWN, arm_compute::QUANTIZE_DOWN_FIXEDPOINT, arm_compute::QUANTIZE_DOWN_FLOAT, arm_compute::RUNTIME_ERROR, CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel::validate(), CLGEMMLowpQuantizeDownInt32ScaleKernel::validate(), and CLGEMMLowpQuantizeDownInt32ScaleByFloatKernel::validate().
Referenced by CLGEMMDeconvolutionLayer::validate(), and CLQLSTMLayer::validate().