24.02.1
|
Basic function to execute MatMul (Matrix Multiplication) on OpenCL. More...
#include <CLMatMul.h>
Public Member Functions | |
CLMatMul () | |
Default constructor. More... | |
~CLMatMul () | |
Default destructor. More... | |
CLMatMul (const CLMatMul &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLMatMul (CLMatMul &&) | |
Default move constructor. More... | |
CLMatMul & | operator= (const CLMatMul &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLMatMul & | operator= (CLMatMul &&) |
Default move assignment operator. More... | |
void | configure (const CLCompileContext &compile_context, ICLTensor *rhs, ICLTensor *lhs, ICLTensor *dst, const MatMulInfo &matmul_info, const GpuMatMulSettings &settings=GpuMatMulSettings{}, const ActivationLayerInfo &act_info=ActivationLayerInfo{}) |
Initialise the kernel's inputs and output. More... | |
void | configure (ICLTensor *lhs, ICLTensor *rhs, ICLTensor *dst, const MatMulInfo &matmul_info, const GpuMatMulSettings &settings=GpuMatMulSettings{}, const ActivationLayerInfo &act_info=ActivationLayerInfo{}) |
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 *lhs, const ITensorInfo *rhs, const ITensorInfo *output, const MatMulInfo &matmul_info, const ActivationLayerInfo &act_info=ActivationLayerInfo{}) |
Static function to check if given info will lead to a valid configuration of CLMatMul. More... | |
Basic function to execute MatMul (Matrix Multiplication) on OpenCL.
Definition at line 50 of file CLMatMul.h.
CLMatMul | ( | ) |
Default constructor.
Definition at line 40 of file CLMatMul.cpp.
|
default |
Default destructor.
Prevent instances of this class from being copied (As this class contains pointers)
void configure | ( | const CLCompileContext & | compile_context, |
ICLTensor * | rhs, | ||
ICLTensor * | lhs, | ||
ICLTensor * | dst, | ||
const MatMulInfo & | matmul_info, | ||
const GpuMatMulSettings & | settings = GpuMatMulSettings{} , |
||
const ActivationLayerInfo & | act_info = ActivationLayerInfo{} |
||
) |
Initialise the kernel's inputs and output.
Valid data layouts:
Valid data type configurations:
lhs | rhs | dst |
---|---|---|
F32 | F32 | F32 |
F16 | F16 | F16 |
QASYMM8_SIGNED | QASYMM8_SIGNED | QASYMM8_SIGNED |
QASYMM8 | QASYMM8 | QASYMM8 |
[in] | compile_context | The compile context to be used. |
[in] | lhs | Left-hand side tensor info containing the input activations as Matrix A. Data types supported: F16/F32/QASYMM8_SIGNED/QASYMM8. |
[in] | rhs | Right-hand side tensor info containing the input weights as Matrix B. Data types supported: same as lhs . |
[out] | dst | Output tensor to store the result of the batched matrix multiplication. Data types supported: same as lhs . |
[in] | matmul_info | Contains MatMul operation information described in MatMulInfo. |
[in] | settings | Contains flags for function level settings |
[in] | act_info | (Optional) Contains activation function and lower and upper bound values for bounded activation functions. |
Definition at line 57 of file CLMatMul.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC_0, arm_compute::ACL_SRC_1, arm_compute::test::validation::act_info, ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_UNUSED, and ITensor::info().
Referenced by CLMatMul::configure().
void configure | ( | ICLTensor * | lhs, |
ICLTensor * | rhs, | ||
ICLTensor * | dst, | ||
const MatMulInfo & | matmul_info, | ||
const GpuMatMulSettings & | settings = GpuMatMulSettings{} , |
||
const ActivationLayerInfo & | act_info = ActivationLayerInfo{} |
||
) |
Initialise the kernel's inputs and output.
Similar to CLMatMul::configure()
Definition at line 46 of file CLMatMul.cpp.
References arm_compute::test::validation::act_info, ARM_COMPUTE_UNUSED, CLMatMul::configure(), and CLKernelLibrary::get().
Prevent instances of this class from being copied (As this class contains pointers)
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 82 of file CLMatMul.cpp.
|
static |
Static function to check if given info will lead to a valid configuration of CLMatMul.
[in] | lhs | Left-hand side (Matrix A) tensor info. Data types supported: F16/F32/QASYMM8_SIGNED/QASYMM8. |
[in] | rhs | Right-hand side (Matrix B) tensor info. Data types supported: same as lhs . |
[out] | output | Output tensor info to store the result of the batched matrix multiplication. Data types supported: same as lhs . |
[in] | matmul_info | Contains MatMul operation information described in MatMulInfo. |
[in] | act_info | (Optional) Contains activation function and lower and upper bound values for bounded activation functions. |
Definition at line 73 of file CLMatMul.cpp.
References arm_compute::test::validation::act_info, and ClGemm::validate().