24.02.1
|
Function to run Gemm on quantized types. More...
#include <NEGEMMLowpMatrixMultiplyCore.h>
Public Member Functions | |
NEGEMMLowpMatrixMultiplyCore (std::shared_ptr< IMemoryManager > memory_manager=nullptr, IWeightsManager *weights_manager=nullptr) | |
Constructor. More... | |
NEGEMMLowpMatrixMultiplyCore (const NEGEMMLowpMatrixMultiplyCore &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEGEMMLowpMatrixMultiplyCore (NEGEMMLowpMatrixMultiplyCore &&)=default | |
Default move constructor. More... | |
NEGEMMLowpMatrixMultiplyCore & | operator= (const NEGEMMLowpMatrixMultiplyCore &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEGEMMLowpMatrixMultiplyCore & | operator= (NEGEMMLowpMatrixMultiplyCore &&)=default |
Default move assignment operator. More... | |
~NEGEMMLowpMatrixMultiplyCore () | |
Default destructor. More... | |
void | configure (const ITensor *a, const ITensor *b, const ITensor *c, ITensor *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 NEGEMMLowpMatrixMultiplyCore. More... | |
Function to run Gemm on quantized types.
This function calls the following:
Definition at line 46 of file NEGEMMLowpMatrixMultiplyCore.h.
NEGEMMLowpMatrixMultiplyCore | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr , |
IWeightsManager * | weights_manager = nullptr |
||
) |
Constructor.
Definition at line 53 of file NEGEMMLowpMatrixMultiplyCore.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 ITensor * | a, |
const ITensor * | b, | ||
const ITensor * | c, | ||
ITensor * | 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 |
output
type is S32 if gemm_info.type
== GEMMLowpOutputStageType::NONE. It is QASYMM8/QASYMM8_SIGNED otherwise[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: Data type supported: S32/QASYMM8/QASYMM8_SIGNED |
[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 62 of file NEGEMMLowpMatrixMultiplyCore.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::reshape_b_only_on_first_run().
Referenced by NELSTMLayerQuantized::configure(), arm_compute::test::validation::DATA_TEST_CASE(), and main().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move assignment operator.
|
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 111 of file NEGEMMLowpMatrixMultiplyCore.cpp.
References arm_compute::mlgo::parser::end().
Referenced by NEGEMMLowpMatrixMultiplyCore::run().
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 104 of file NEGEMMLowpMatrixMultiplyCore.cpp.
References NEGEMMLowpMatrixMultiplyCore::prepare().
Referenced by main(), NELSTMLayerQuantized::run(), and NEQLSTMLayer::run().
|
static |
Static function to check if given info will lead to a valid configuration of NEGEMMLowpMatrixMultiplyCore.
Similar to NEGEMMLowpMatrixMultiplyCore::configure()
Definition at line 88 of file NEGEMMLowpMatrixMultiplyCore.cpp.
References arm_compute::test::validation::b, GEMMInfo::reshape_b_only_on_first_run(), and CpuGemmLowpMatrixMultiplyCore::validate().
Referenced by NELSTMLayerQuantized::validate().