24.02.1
|
Basic operator to execute BatchMatMul on OpenCL. More...
#include <ClMatMul.h>
Public Member Functions | |
ClMatMul () | |
Constructor. More... | |
~ClMatMul ()=default | |
Default destructor. More... | |
void | configure (const CLCompileContext &compile_context, ITensorInfo *lhs, ITensorInfo *rhs, ITensorInfo *dst, const MatMulInfo &matmul_info, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Initialise the kernel's inputs and output. More... | |
void | run (ITensorPack &tensors) override |
Run the kernels contained in the function. More... | |
Public Member Functions inherited from ICLOperator | |
ICLOperator (IRuntimeContext *ctx=nullptr) | |
Constructor. More... | |
ICLOperator (const ICLOperator &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICLOperator (ICLOperator &&)=default | |
Default move constructor. More... | |
ICLOperator & | operator= (const ICLOperator &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICLOperator & | operator= (ICLOperator &&)=default |
Default move assignment operator. More... | |
void | prepare (ITensorPack &constants) override |
Prepare the function for executing. More... | |
MemoryRequirements | workspace () const override |
Return the memory requirements required by the workspace. More... | |
Public Member Functions inherited from IOperator | |
virtual | ~IOperator ()=default |
Destructor. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *lhs, const ITensorInfo *rhs, const ITensorInfo *dst, const MatMulInfo &matmul_info, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Static function to check if given info will lead to a valid configuration. More... | |
Basic operator to execute BatchMatMul on OpenCL.
This operator calls the following OpenCL kernels:
Definition at line 43 of file ClMatMul.h.
ClMatMul | ( | ) |
|
default |
Default destructor.
void configure | ( | const CLCompileContext & | compile_context, |
ITensorInfo * | lhs, | ||
ITensorInfo * | rhs, | ||
ITensorInfo * | dst, | ||
const MatMulInfo & | matmul_info, | ||
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. Data types supported: F16/F32/QASYMM8_SIGNED/QASYMM8. |
[in] | rhs | Right-hand side tensor info. 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] | act_info | Class containing information about fused activation function. |
Definition at line 88 of file ClMatMul.cpp.
References arm_compute::test::validation::act_info, ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, ARM_COMPUTE_LOG_PARAMS, ClMatMulNativeKernelConfigurationFactory::create(), ClMatMulNativeKernelVariantFactory::create(), arm_compute::test::validation::dst, CLScheduler::get(), arm_compute::cl_matmul::NATIVE_FP, arm_compute::cl_matmul::NATIVE_MMUL_FP, arm_compute::cl_matmul::NATIVE_MMUL_QUANTIZED, arm_compute::cl_matmul::NATIVE_QUANTIZED, CLScheduler::target(), and arm_compute::validate().
|
overridevirtual |
Run the kernels contained in the function.
[in] | tensors | Vector that contains the tensors to operate on. |
Reimplemented from ICLOperator.
Definition at line 151 of file ClMatMul.cpp.
References CLScheduler::enqueue_op(), and CLScheduler::get().
|
static |
Static function to check if given info will lead to a valid configuration.
Similar to ClMatMul::configure()
Definition at line 52 of file ClMatMul.cpp.
References arm_compute::test::validation::act_info, ARM_COMPUTE_ERROR, ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ClMatMulNativeKernelConfigurationFactory::create(), ClMatMulNativeKernelVariantFactory::create(), arm_compute::test::validation::dst, arm_compute::F16, arm_compute::F32, CLScheduler::get(), arm_compute::cl_matmul::NATIVE_FP, arm_compute::cl_matmul::NATIVE_MMUL_FP, arm_compute::cl_matmul::NATIVE_MMUL_QUANTIZED, arm_compute::cl_matmul::NATIVE_QUANTIZED, arm_compute::QASYMM8, arm_compute::QASYMM8_SIGNED, tf_frozen_model_extractor::t, CLScheduler::target(), ClMatMulLowpNativeMMULKernel::validate(), ClMatMulNativeKernel::validate(), ClMatMulLowpNativeKernel::validate(), and ClMatMulNativeMMULKernel::validate().