21.02
|
Assembly kernel glue. More...
#include <NEGEMMAssemblyDispatch.h>
Data Structures | |
class | IFallback |
Public Member Functions | |
NEGEMMAssemblyDispatch (std::shared_ptr< IMemoryManager > memory_manager=nullptr, IWeightsManager *weights_manager=nullptr) | |
Constructor. More... | |
NEGEMMAssemblyDispatch (const NEGEMMAssemblyDispatch &)=delete | |
Prevent instances of this class from being copy constructed. More... | |
NEGEMMAssemblyDispatch & | operator= (const NEGEMMAssemblyDispatch &)=delete |
Prevent instances of this class from being copied. More... | |
NEGEMMAssemblyDispatch (NEGEMMAssemblyDispatch &&)=default | |
NEGEMMAssemblyDispatch & | operator= (NEGEMMAssemblyDispatch &&)=default |
~NEGEMMAssemblyDispatch ()=default | |
void | configure (const ITensor *a, const ITensor *b, const ITensor *c, ITensor *d, const AsmGemmInfo &info) |
If supported create a Compute Library function else fallback to the arm_gemm function. More... | |
bool | is_configured () const |
Was the function successfully configured ? More... | |
void | prepare () override |
Prepare the function for executing. More... | |
void | run () override |
Run the kernels contained in the function. 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 *d, const AsmGemmInfo &info) |
Indicates whether or not this function can be used to process the given parameters. More... | |
static bool | is_activation_supported (const ActivationLayerInfo &activation) |
Checks if activation is supported by the gemm assembly dispatcher. More... | |
Assembly kernel glue.
Definition at line 58 of file NEGEMMAssemblyDispatch.h.
NEGEMMAssemblyDispatch | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr , |
IWeightsManager * | weights_manager = nullptr |
||
) |
Constructor.
Definition at line 745 of file NEGEMMAssemblyDispatch.cpp.
|
delete |
Prevent instances of this class from being copy constructed.
|
default |
|
default |
void configure | ( | const ITensor * | a, |
const ITensor * | b, | ||
const ITensor * | c, | ||
ITensor * | d, | ||
const AsmGemmInfo & | info | ||
) |
If supported create a Compute Library function else fallback to the arm_gemm function.
[in] | a | Input tensor (Matrix A) |
[in] | b | Input tensor (Matrix B) |
[in] | c | Input tensor (Matrix C) used to pass the bias for quantized calculations |
[out] | d | Output tensor to store the result of matrix multiplication. Data type supported: same as input0 . |
[in] | info | GEMM meta-data |
Definition at line 787 of file NEGEMMAssemblyDispatch.cpp.
References AsmGemmInfo::activation_info, ARM_COMPUTE_ERROR_ON_NULLPTR, arm_compute::test::validation::b, arm_compute::BFLOAT16, ITensorInfo::data_type(), arm_compute::F16, arm_compute::F32, ITensor::info(), arm_compute::test::validation::info, arm_compute::QASYMM8, arm_compute::QASYMM8_SIGNED, arm_compute::S32, arm_compute::S8, arm_compute::U8, and NEGEMMAssemblyDispatch::validate().
|
static |
Checks if activation is supported by the gemm assembly dispatcher.
[in] | activation | Activation to check |
Definition at line 781 of file NEGEMMAssemblyDispatch.cpp.
References tf_frozen_model_extractor::None.
Referenced by NEGEMM::configure(), and NEGEMMLowpMatrixMultiplyCore::configure().
bool is_configured | ( | ) | const |
Was the function successfully configured ?
Definition at line 848 of file NEGEMMAssemblyDispatch.cpp.
|
delete |
Prevent instances of this class from being copied.
|
default |
|
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 842 of file NEGEMMAssemblyDispatch.cpp.
References ARM_COMPUTE_ERROR_ON.
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 853 of file NEGEMMAssemblyDispatch.cpp.
References ARM_COMPUTE_ERROR_ON.
|
static |
Indicates whether or not this function can be used to process the given parameters.
[in] | a | Input tensor info (Matrix A) |
[in] | b | Input tensor info (Matrix B) |
[in] | c | Input tensor info (Matrix C) used to pass the bias for quantized calculations |
[in] | d | Output tensor to store the result of matrix multiplication. Data type supported: same as input0 . |
[in] | info | GEMM meta-data |
Definition at line 750 of file NEGEMMAssemblyDispatch.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON_CPU_BF16_UNSUPPORTED, ARM_COMPUTE_RETURN_ERROR_ON_CPU_F16_UNSUPPORTED, ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES, ARM_COMPUTE_RETURN_ERROR_ON_MSG, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_UNUSED, arm_compute::BFLOAT16, ITensorInfo::data_type(), ITensorInfo::element_size(), arm_compute::F16, arm_compute::F32, arm_compute::is_data_type_quantized_per_channel(), arm_compute::QASYMM8, arm_compute::QASYMM8_SIGNED, arm_compute::QSYMM8_PER_CHANNEL, arm_compute::S32, arm_compute::S8, arm_compute::U32, and arm_compute::U8.
Referenced by NEGEMMAssemblyDispatch::configure(), NEGEMM::configure(), NEGEMMConv2d::validate(), NEGEMM::validate(), and NEGEMMLowpMatrixMultiplyCore::validate().