Compute Library
18.05
|
Basic function to execute GEMM on OpenGLES Compute. More...
#include <GCGEMM.h>
Public Member Functions | |
GCGEMM (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Default constructor. More... | |
void | configure (const IGCTensor *a, const IGCTensor *b, const IGCTensor *c, IGCTensor *output, float alpha, float beta, const GEMMInfo &gemm_info=GEMMInfo()) |
Initialise the kernel's inputs and output. More... | |
void | run () override |
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 *a, const ITensorInfo *b, const IGCTensor *c, const ITensorInfo *output, const float alpha, const float beta, const GEMMInfo &gemm_info=GEMMInfo()) |
Static function to check if given info will lead to a valid configuration of GCGEMM. More... | |
Basic function to execute GEMM on OpenGLES Compute.
This function calls the following kernels:
GCGEMM | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Default constructor.
void configure | ( | const IGCTensor * | a, |
const IGCTensor * | b, | ||
const IGCTensor * | c, | ||
IGCTensor * | output, | ||
float | alpha, | ||
float | beta, | ||
const GEMMInfo & | gemm_info = GEMMInfo() |
||
) |
Initialise the kernel's inputs and output.
[in] | a | First input tensor (Matrix or Vector A). Data types supported: F32 |
[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 if just the multiplication between a and b is needed. Data type supported: same as a . |
[out] | output | Output tensor. Data type supported: same as a |
[in] | alpha | Weight of the matrix product |
[in] | beta | Weight of matrix C |
[in] | gemm_info | (Optional) Specifies if the matrix A and/or matrix B have been reshaped and if the reshape of matrix B should happen only for the first run |
|
overridevirtual |
Run the kernels contained in the function.
For NEON kernels:
For OpenCL kernels:
Implements IFunction.
|
static |
Static function to check if given info will lead to a valid configuration of GCGEMM.
[in] | a | First input tensor (Matrix or Vector A). Data types supported: F16/F32 |
[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 if just the multiplication between a and b is needed. Data type supported: same as a . |
[out] | output | Output tensor. Data type supported: same as a |
[in] | alpha | Weight of the matrix product |
[in] | beta | Weight of matrix C |
[in] | gemm_info | (Optional) Specifies if the matrix A and/or matrix B have been reshaped and if the reshape of matrix B should happen only for the first run |