24.02.1
|
Basic function to execute GEMMLowpMatrixMultiplyCore on OpenCL. More...
#include <CLGEMMLowpMatrixMultiplyCore.h>
Public Member Functions | |
CLGEMMLowpMatrixMultiplyCore (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Constructor. More... | |
CLGEMMLowpMatrixMultiplyCore (const CLGEMMLowpMatrixMultiplyCore &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLGEMMLowpMatrixMultiplyCore (CLGEMMLowpMatrixMultiplyCore &&)=default | |
Default move constructor. More... | |
CLGEMMLowpMatrixMultiplyCore & | operator= (const CLGEMMLowpMatrixMultiplyCore &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLGEMMLowpMatrixMultiplyCore & | operator= (CLGEMMLowpMatrixMultiplyCore &&)=default |
Default move assignment operator. More... | |
~CLGEMMLowpMatrixMultiplyCore () | |
Default destructor. More... | |
void | configure (const ICLTensor *a, const ICLTensor *b, const ICLTensor *c, ICLTensor *output, const GEMMInfo &gemm_info=GEMMInfo()) |
Initialise the kernel's inputs, output. More... | |
void | configure (const CLCompileContext &compile_context, const ICLTensor *a, const ICLTensor *b, const ICLTensor *c, ICLTensor *output, const GEMMInfo &gemm_info=GEMMInfo()) |
Initialise the kernel's inputs, output. More... | |
void | run () override |
Run the kernels contained in the function. More... | |
void | prepare () override |
Prepare the function for executing. More... | |
Public Member Functions inherited from IFunction | |
virtual | ~IFunction ()=default |
Destructor. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *a, const ITensorInfo *b, const ITensorInfo *c, const ITensorInfo *output, const GEMMInfo &gemm_info=GEMMInfo()) |
Static function to check if given info will lead to a valid configuration of CLGEMMLowpMatrixMultiplyCore. More... | |
Basic function to execute GEMMLowpMatrixMultiplyCore on OpenCL.
Definition at line 42 of file CLGEMMLowpMatrixMultiplyCore.h.
CLGEMMLowpMatrixMultiplyCore | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Constructor.
Definition at line 58 of file CLGEMMLowpMatrixMultiplyCore.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
|
default |
Default destructor.
void configure | ( | const CLCompileContext & | compile_context, |
const ICLTensor * | a, | ||
const ICLTensor * | b, | ||
const ICLTensor * | c, | ||
ICLTensor * | output, | ||
const GEMMInfo & | gemm_info = GEMMInfo() |
||
) |
Initialise the kernel's inputs, output.
[in] | compile_context | The compile context to be used. |
[in] | a | First input tensor (Matrix A). Data type supported: QASYMM8/QASYMM8_SIGNED. |
[in] | b | Second input tensor (Matrix B). Data type supported: same as a |
[in] | c | Third input tensor (Matrix C). It can be a nullptr. Data type supported: S32 |
[out] | output | Output tensor. Data type supported: S32 or QASYMM8/QASYMM8_SIGNED if gemm_info.gemmlowp_output_stage != NONE |
[in] | gemm_info | (Optional) Specifies if the matrix A and/or matrix B have been reshaped and if the reshape of matrix B should be executed only for the first run |
Definition at line 72 of file CLGEMMLowpMatrixMultiplyCore.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC_0, arm_compute::ACL_SRC_1, arm_compute::ACL_SRC_2, ARM_COMPUTE_ERROR_ON_NULLPTR, arm_compute::test::validation::b, ITensor::info(), and GEMMInfo::retain_internal_weights().
void configure | ( | const ICLTensor * | a, |
const ICLTensor * | b, | ||
const ICLTensor * | c, | ||
ICLTensor * | output, | ||
const GEMMInfo & | gemm_info = GEMMInfo() |
||
) |
Initialise the kernel's inputs, output.
Valid data layouts:
Valid data type configurations:
src0 | src1 | src2 | dst |
---|---|---|---|
QASYMM8 | QASYMM8 | S32 | QASYMM8 |
QASYMM8 | QSYMM8_PER_CHANNEL | S32 | QASYMM8 |
QASYMM8 | QSYMM8 | S32 | QASYMM8 |
QASYMM8 | QASYMM8 | S32 | S32 |
QASYMM8 | QSYMM8_PER_CHANNEL | S32 | S32 |
QASYMM8 | QSYMM8 | S32 | S32 |
QASYMM8_SIGNED | QASYMM8_SIGNED | S32 | QASYMM8_SIGNED |
QASYMM8_SIGNED | QSYMM8_PER_CHANNEL | S32 | QASYMM8_SIGNED |
QASYMM8_SIGNED | QSYMM8 | S32 | QASYMM8_SIGNED |
QASYMM8_SIGNED | QASYMM8_SIGNED | S32 | S32 |
QASYMM8_SIGNED | QSYMM8_PER_CHANNEL | S32 | S32 |
QASYMM8_SIGNED | QSYMM8 | S32 | S32 |
[in] | a | First input tensor (Matrix A). Data type supported: QASYMM8/QASYMM8_SIGNED. |
[in] | b | Second input tensor (Matrix B). Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM8/QSYMM8_PER_CHANNEL |
[in] | c | Third input tensor (Matrix C). It can be a nullptr. Data type supported: S32 |
[out] | output | Output tensor. Data type supported: S32 or QASYMM8/QASYMM8_SIGNED if gemm_info.gemmlowp_output_stage != NONE |
[in] | gemm_info | (Optional) Specifies if the matrix A and/or matrix B have been reshaped and if the reshape of matrix B should be executed only for the first run |
Definition at line 66 of file CLGEMMLowpMatrixMultiplyCore.cpp.
References arm_compute::test::validation::b, and CLKernelLibrary::get().
Referenced by CLGEMMDeconvolutionLayer::configure(), and CLLSTMLayerQuantized::configure().
|
default |
Default move assignment operator.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
overridevirtual |
Prepare the function for executing.
Any one off pre-processing step required by the function is handled here
Reimplemented from IFunction.
Definition at line 121 of file CLGEMMLowpMatrixMultiplyCore.cpp.
References arm_compute::release_temporaries().
Referenced by CLGEMMDeconvolutionLayer::prepare(), and CLGEMMLowpMatrixMultiplyCore::run().
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 112 of file CLGEMMLowpMatrixMultiplyCore.cpp.
References CLGEMMLowpMatrixMultiplyCore::prepare().
Referenced by CLGEMMDeconvolutionLayer::run(), CLLSTMLayerQuantized::run(), and CLQLSTMLayer::run().
|
static |
Static function to check if given info will lead to a valid configuration of CLGEMMLowpMatrixMultiplyCore.
[in] | a | First input tensor info (Matrix A). Data type supported: QASYMM8. |
[in] | b | Second input tensor info (Matrix B). Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM8/QSYMM8_PER_CHANNEL |
[in] | c | Third input tensor info (Matrix C). It can be a nullptr. Data type supported: S32 |
[in] | output | Output tensor info. Data type supported: S32 or QASYMM8/QASYMM8_SIGNED if gemm_info.gemmlowp_output_stage != NONE |
[in] | gemm_info | (Optional) Specifies if the matrix A and/or matrix B have been reshaped and if the reshape of matrix B should be executed only for the first run |
Definition at line 103 of file CLGEMMLowpMatrixMultiplyCore.cpp.
References arm_compute::test::validation::b, and ClGemm::validate().
Referenced by CLGEMMDeconvolutionLayer::validate(), and CLLSTMLayerQuantized::validate().