ONE - On-device Neural Engine
|
Namespaces | |
namespace | pal |
namespace | testing |
Data Structures | |
class | KernelBuiltinExecuteRegistry |
class | KernelCustomExecuteRegistry |
struct | OMExecuteArgs |
struct | OMKernelExecute |
class | OMRuntimeKernel |
Typedefs | |
using | KernelExecuteFunc = OMStatus(const OMExecuteArgs &) |
Functions | |
OMStatus | execute_arg_common (const OMExecuteArgs &execute_args, const std::function< OMStatus(const core::OMRuntimeShape &input1_shape, const float *input1_data, const int *input2_data, const core::OMRuntimeShape &output_shape, int *output_data)> &f_float) |
template<typename T > | |
void | readDataKernel (OMRuntimeKernel *runtime_kernel, const T *&cast_input_data1, const T *&cast_input_data2, bool *&cast_output_data, core::OMRuntimeShape &input1_shape_ref, core::OMRuntimeShape &input2_shape_ref, core::OMRuntimeShape &output_shape_ref) |
template<typename T > | |
void | evalComparisonGeneric (OMRuntimeKernel *runtime_kernel, bool F(T, T)) |
template<typename T , typename AccType > | |
void | evalQuantizedComparisonGeneric (OMRuntimeKernel *runtime_kernel, bool F(AccType, AccType)) |
OMStatus | createConvParams (core::ConvQuant ¶ms, const circle::Tensor *input, const circle::Tensor *filter, const circle::Tensor *output, circle::ActivationFunctionType act_type) |
OMStatus | execute_math_common (const OMExecuteArgs &execute_args, const std::function< OMStatus(const core::OMRuntimeShape &input_shape, const float *input_data, const core::OMRuntimeShape &output_shape, float *output_data)> &f_float) |
OMStatus | execute_pooling_common (const OMExecuteArgs &execute_args, const std::function< OMStatus(const core::Pool2DParams ¶ms, const core::OMRuntimeShape &input_shape, const float *input_data, const core::OMRuntimeShape &output_shape, float *output_data)> &f_float, const std::function< OMStatus(const core::Pool2DParams ¶ms, const core::OMRuntimeShape &input_shape, const int8_t *input_data, const core::OMRuntimeShape &output_shape, int8_t *output_data)> &f_int8) |
OMStatus | readKernelDataTISO (const OMExecuteArgs &execute_args, uint8_t *&input_data1, uint8_t *&input_data2, uint8_t *&output_data, core::OMRuntimeShape &input1_shape_ref, core::OMRuntimeShape &input2_shape_ref, core::OMRuntimeShape &output_shape_ref, circle::TensorType &tensor_type) |
OMStatus | execute_relu_common (const OMExecuteArgs &execute_args, bool is_relu_6) |
OMStatus | execute_reshape_common (const OMExecuteArgs &execute_args) |
OMStatus | execute_spaces_batches_nd_common (const OMExecuteArgs &execute_args, const std::function< OMStatus(const core::OMRuntimeShape &unextended_input1_shape, const float *input1_data, const core::OMRuntimeShape &unextended_input2_shape, const int32_t *block_shape_data, const core::OMRuntimeShape &unextended_input3_shape, const int32_t *crops_data, const core::OMRuntimeShape &unextended_output_shape, float *output_data)> &f) |
void | readQuantParams (const circle::Tensor *tensor, long &zero_point, float &scale) |
template<typename T > | |
OMStatus | calculateActivationRange (circle::ActivationFunctionType activation, T *activation_min, T *activation_max) |
double | getQuantizedConvolutionMultipler (float input_scale, float filter_scale, float output_scale) |
void | quantizeMultiplier (double double_multiplier, int32_t *quantized_multiplier, int *shift) |
void | quantizeMultiplierSmallerThanOneExp (double double_multiplier, int32_t *quantized_multiplier, int *left_shift) |
std::vector< double > | getQuantizedConvolutionMultiplers (float input_scale, const flatbuffers::Vector< float > *filter_scale, float output_scale) |
OMStatus | calculateActivationRangeQuantized (circle::ActivationFunctionType activation, int32_t output_zero_point, float output_scale, circle::TensorType data_type, int32_t *activation_min, int32_t *activation_max) |
int | computeOutSize (circle::Padding padding, int image_size, int filter_size, int stride, int dilation_rate=1) |
int | computePadding (int32_t stride, int32_t dilation_rate, int32_t in_size, int32_t filter_size, int32_t out_size) |
void | computePaddingHeightWidth (int32_t stride_height, int32_t stride_width, int32_t dilation_rate_height, int32_t dilation_rate_width, int32_t in_height, int32_t in_width, int32_t filter_height, int32_t filter_width, circle::Padding padding, int32_t *padding_h, int32_t *padding_w) |
void | calculateQuantParams (core::ArithmeticQuantParams ¶ms, const circle::Tensor *input1, const circle::Tensor *input2, const circle::Tensor *output, circle::ActivationFunctionType act) |
OMStatus | SISOHeader (const OMExecuteArgs &execute_args, const circle::Tensor **input, const circle::Tensor **output, uint8_t **input_data, uint8_t **output_data) |
OMStatus | TISOHeader (const OMExecuteArgs &execute_args, const circle::Tensor **input1, const circle::Tensor **input2, const circle::Tensor **output, OMRuntimeKernel *runtime_kernel) |
int | calculateInputRadius (int input_integer_bits, int input_left_shift, int total_signed_bits) |
Variables | |
constexpr KernelBuiltinExecuteRegistry | kernel_builtin_execute |
constexpr KernelCustomExecuteRegistry | kernel_custom_execute |
using onert_micro::execute::KernelExecuteFunc = typedef OMStatus(const OMExecuteArgs &) |
Definition at line 31 of file OMKernelExecutionBuilder.h.
OMStatus onert_micro::execute::calculateActivationRange | ( | circle::ActivationFunctionType | activation, |
T * | activation_min, | ||
T * | activation_max | ||
) |
Definition at line 36 of file OMUtils.h.
References onert_micro::Ok, and onert_micro::UnsupportedActivation.
OMStatus onert_micro::execute::calculateActivationRangeQuantized | ( | circle::ActivationFunctionType | activation, |
int32_t | output_zero_point, | ||
float | output_scale, | ||
circle::TensorType | data_type, | ||
int32_t * | activation_min, | ||
int32_t * | activation_max | ||
) |
Definition at line 112 of file OMUtils.cpp.
References onert_micro::UnsupportedType.
Referenced by calculateQuantParams(), and createConvParams().
|
inline |
Definition at line 170 of file OMUtils.h.
void onert_micro::execute::calculateQuantParams | ( | core::ArithmeticQuantParams & | params, |
const circle::Tensor * | input1, | ||
const circle::Tensor * | input2, | ||
const circle::Tensor * | output, | ||
circle::ActivationFunctionType | act | ||
) |
Definition at line 194 of file OMUtils.cpp.
References calculateActivationRangeQuantized(), onert_micro::core::ArithmeticQuantParams::input1_multiplier, onert_micro::core::ArithmeticQuantParams::input1_offset, onert_micro::core::ArithmeticQuantParams::input1_shift, onert_micro::core::ArithmeticQuantParams::input2_multiplier, onert_micro::core::ArithmeticQuantParams::input2_offset, onert_micro::core::ArithmeticQuantParams::input2_shift, onert_micro::core::ArithmeticQuantParams::left_shift, onert_micro::core::ArithmeticQuantParams::output_multiplier, onert_micro::core::ArithmeticQuantParams::output_offset, onert_micro::core::ArithmeticQuantParams::output_shift, onert_micro::core::ArithmeticQuantParams::quantized_activation_max, onert_micro::core::ArithmeticQuantParams::quantized_activation_min, quantizeMultiplierSmallerThanOneExp(), and readQuantParams().
|
inline |
Definition at line 114 of file OMUtils.h.
Referenced by computePaddingHeightWidth().
|
inline |
Definition at line 133 of file OMUtils.h.
Referenced by computePaddingHeightWidth().
|
inline |
Definition at line 141 of file OMUtils.h.
References computeOutSize(), and computePadding().
OMStatus onert_micro::execute::createConvParams | ( | core::ConvQuant & | params, |
const circle::Tensor * | input, | ||
const circle::Tensor * | filter, | ||
const circle::Tensor * | output, | ||
circle::ActivationFunctionType | act_type | ||
) |
Definition at line 23 of file ConvolutionCommon.cpp.
References calculateActivationRangeQuantized(), getQuantizedConvolutionMultiplers(), onert_micro::core::ConvQuant::input_offset, onert_micro::Ok, onert_micro::core::ConvQuant::output_offset, onert_micro::core::ConvQuant::per_channel_output_multiplier, onert_micro::core::ConvQuant::per_channel_output_shift, onert_micro::core::ConvQuant::quantized_activation_max, onert_micro::core::ConvQuant::quantized_activation_min, quantizeMultiplier(), and onert_micro::core::ConvQuant::weights_offset.
void onert_micro::execute::evalComparisonGeneric | ( | OMRuntimeKernel * | runtime_kernel, |
bool | FT, T | ||
) |
Definition at line 82 of file ComparisonCommon.h.
References onert_micro::core::OMRuntimeShape::flatSize(), onert_micro::core::ComparisonParams::is_broadcast, output_shape, and readDataKernel().
void onert_micro::execute::evalQuantizedComparisonGeneric | ( | OMRuntimeKernel * | runtime_kernel, |
bool | FAccType, AccType | ||
) |
Definition at line 114 of file ComparisonCommon.h.
References onert_micro::core::OMRuntimeShape::flatSize(), onert_micro::core::ComparisonParams::input1_multiplier, onert_micro::core::ComparisonParams::input1_offset, onert_micro::core::ComparisonParams::input1_shift, onert_micro::core::ComparisonParams::input2_multiplier, onert_micro::core::ComparisonParams::input2_offset, onert_micro::core::ComparisonParams::input2_shift, onert_micro::execute::OMRuntimeKernel::inputs, onert_micro::core::ComparisonParams::is_broadcast, onert_micro::core::ComparisonParams::left_shift, output_shape, onert_micro::execute::OMRuntimeKernel::outputs, quantizeMultiplierSmallerThanOneExp(), and readDataKernel().
OMStatus onert_micro::execute::execute_arg_common | ( | const OMExecuteArgs & | execute_args, |
const std::function< OMStatus(const core::OMRuntimeShape &input1_shape, const float *input1_data, const int *input2_data, const core::OMRuntimeShape &output_shape, int *output_data)> & | f_float | ||
) |
Definition at line 32 of file ArgCommon.cpp.
References onert_micro::execute::OMRuntimeKernel::getDataFromStorage(), onert_micro::execute::OMRuntimeKernel::inputs, onert_micro::execute::OMRuntimeKernel::inputs_data, onert_micro::execute::OMExecuteArgs::kernel_index, output_shape, onert_micro::execute::OMRuntimeKernel::outputs, onert_micro::execute::OMRuntimeKernel::outputs_data, onert_micro::execute::OMRuntimeKernel::readKernel(), onert_micro::execute::OMExecuteArgs::runtime_context, onert_micro::execute::OMExecuteArgs::runtime_storage, and onert_micro::UnsupportedType.
OMStatus onert_micro::execute::execute_math_common | ( | const OMExecuteArgs & | execute_args, |
const std::function< OMStatus(const core::OMRuntimeShape &input_shape, const float *input_data, const core::OMRuntimeShape &output_shape, float *output_data)> & | f_float | ||
) |
OMStatus onert_micro::execute::execute_pooling_common | ( | const OMExecuteArgs & | execute_args, |
const std::function< OMStatus(const core::Pool2DParams ¶ms, const core::OMRuntimeShape &input_shape, const float *input_data, const core::OMRuntimeShape &output_shape, float *output_data)> & | f_float, | ||
const std::function< OMStatus(const core::Pool2DParams ¶ms, const core::OMRuntimeShape &input_shape, const int8_t *input_data, const core::OMRuntimeShape &output_shape, int8_t *output_data)> & | f_int8 | ||
) |
OMStatus onert_micro::execute::execute_relu_common | ( | const OMExecuteArgs & | execute_args, |
bool | is_relu_6 | ||
) |
Definition at line 32 of file ReluCommon.cpp.
References onert_micro::execute::OMRuntimeKernel::first_operator, onert_micro::core::OMRuntimeShape::flatSize(), onert_micro::execute::OMRuntimeKernel::getDataFromStorage(), onert_micro::execute::OMRuntimeKernel::inputs, onert_micro::execute::OMRuntimeKernel::inputs_data, onert_micro::execute::OMExecuteArgs::kernel_index, onert_micro::Ok, output_shape, onert_micro::execute::OMRuntimeKernel::outputs, onert_micro::execute::OMRuntimeKernel::outputs_data, onert_micro::execute::OMRuntimeKernel::readKernel(), onert_micro::execute::pal::ReLUCommon(), onert_micro::execute::OMExecuteArgs::runtime_context, onert_micro::execute::OMExecuteArgs::runtime_storage, and onert_micro::UnsupportedType.
OMStatus onert_micro::execute::execute_reshape_common | ( | const OMExecuteArgs & | execute_args | ) |
Definition at line 31 of file ReshapeCommon.cpp.
References onert_micro::core::OMRuntimeShape::flatSize(), onert_micro::execute::OMRuntimeKernel::getDataFromStorage(), onert_micro::execute::OMRuntimeKernel::inputs, onert_micro::execute::OMRuntimeKernel::inputs_data, onert_micro::execute::OMExecuteArgs::kernel_index, onert_micro::Ok, onert_micro::core::onertMicroDatatype(), onert_micro::execute::OMRuntimeKernel::outputs, onert_micro::execute::OMRuntimeKernel::outputs_data, onert_micro::execute::OMRuntimeKernel::readKernel(), onert_micro::execute::OMExecuteArgs::runtime_context, and onert_micro::execute::OMExecuteArgs::runtime_storage.
OMStatus onert_micro::execute::execute_spaces_batches_nd_common | ( | const OMExecuteArgs & | execute_args, |
const std::function< OMStatus(const core::OMRuntimeShape &unextended_input1_shape, const float *input1_data, const core::OMRuntimeShape &unextended_input2_shape, const int32_t *block_shape_data, const core::OMRuntimeShape &unextended_input3_shape, const int32_t *crops_data, const core::OMRuntimeShape &unextended_output_shape, float *output_data)> & | f | ||
) |
|
inline |
Definition at line 65 of file OMUtils.h.
Referenced by getQuantizedConvolutionMultiplers().
|
inline |
Definition at line 95 of file OMUtils.h.
References getQuantizedConvolutionMultipler(), and flatbuffers::Vector< T >::size().
Referenced by createConvParams().
void onert_micro::execute::quantizeMultiplier | ( | double | double_multiplier, |
int32_t * | quantized_multiplier, | ||
int * | shift | ||
) |
Definition at line 23 of file OMUtils.cpp.
Referenced by createConvParams(), and quantizeMultiplierSmallerThanOneExp().
void onert_micro::execute::quantizeMultiplierSmallerThanOneExp | ( | double | double_multiplier, |
int32_t * | quantized_multiplier, | ||
int * | left_shift | ||
) |
Definition at line 60 of file OMUtils.cpp.
References quantizeMultiplier().
Referenced by calculateQuantParams(), and evalQuantizedComparisonGeneric().
void onert_micro::execute::readDataKernel | ( | OMRuntimeKernel * | runtime_kernel, |
const T *& | cast_input_data1, | ||
const T *& | cast_input_data2, | ||
bool *& | cast_output_data, | ||
core::OMRuntimeShape & | input1_shape_ref, | ||
core::OMRuntimeShape & | input2_shape_ref, | ||
core::OMRuntimeShape & | output_shape_ref | ||
) |
Definition at line 44 of file ComparisonCommon.h.
References onert_micro::execute::OMRuntimeKernel::inputs, onert_micro::execute::OMRuntimeKernel::inputs_data, onert_micro::execute::OMRuntimeKernel::outputs, and onert_micro::execute::OMRuntimeKernel::outputs_data.
Referenced by evalComparisonGeneric(), and evalQuantizedComparisonGeneric().
OMStatus onert_micro::execute::readKernelDataTISO | ( | const OMExecuteArgs & | execute_args, |
uint8_t *& | input_data1, | ||
uint8_t *& | input_data2, | ||
uint8_t *& | output_data, | ||
core::OMRuntimeShape & | input1_shape_ref, | ||
core::OMRuntimeShape & | input2_shape_ref, | ||
core::OMRuntimeShape & | output_shape_ref, | ||
circle::TensorType & | tensor_type | ||
) |
Definition at line 32 of file ReadKernelDataCommon.cpp.
References onert_micro::execute::OMRuntimeKernel::getDataFromStorage(), TensorIndexTISO::input1TensorIdx, TensorIndexTISO::input2TensorIdx, onert_micro::execute::OMRuntimeKernel::inputs, onert_micro::execute::OMRuntimeKernel::inputs_data, onert_micro::execute::OMExecuteArgs::kernel_index, onert_micro::Ok, onert_micro::execute::OMRuntimeKernel::outputs, onert_micro::execute::OMRuntimeKernel::outputs_data, TensorIndexTISO::outputTensorIdx, onert_micro::execute::OMRuntimeKernel::readKernel(), onert_micro::execute::OMExecuteArgs::runtime_context, and onert_micro::execute::OMExecuteArgs::runtime_storage.
void onert_micro::execute::readQuantParams | ( | const circle::Tensor * | tensor, |
long & | zero_point, | ||
float & | scale | ||
) |
Definition at line 143 of file OMUtils.cpp.
Referenced by calculateQuantParams().
OMStatus onert_micro::execute::SISOHeader | ( | const OMExecuteArgs & | execute_args, |
const circle::Tensor ** | input, | ||
const circle::Tensor ** | output, | ||
uint8_t ** | input_data, | ||
uint8_t ** | output_data | ||
) |
Definition at line 159 of file OMUtils.cpp.
References onert_micro::execute::OMRuntimeKernel::getDataFromStorage(), onert_micro::execute::OMRuntimeKernel::inputs, onert_micro::execute::OMRuntimeKernel::inputs_data, onert_micro::execute::OMExecuteArgs::kernel_index, onert_micro::Ok, onert_micro::execute::OMRuntimeKernel::outputs, onert_micro::execute::OMRuntimeKernel::outputs_data, onert_micro::execute::OMRuntimeKernel::readKernel(), onert_micro::execute::OMExecuteArgs::runtime_context, and onert_micro::execute::OMExecuteArgs::runtime_storage.
OMStatus onert_micro::execute::TISOHeader | ( | const OMExecuteArgs & | execute_args, |
const circle::Tensor ** | input1, | ||
const circle::Tensor ** | input2, | ||
const circle::Tensor ** | output, | ||
OMRuntimeKernel * | runtime_kernel | ||
) |
Definition at line 240 of file OMUtils.cpp.
References onert_micro::execute::OMRuntimeKernel::getDataFromStorage(), onert_micro::execute::OMRuntimeKernel::inputs, onert_micro::execute::OMExecuteArgs::kernel_index, onert_micro::Ok, onert_micro::execute::OMRuntimeKernel::outputs, onert_micro::execute::OMRuntimeKernel::readKernel(), onert_micro::execute::OMExecuteArgs::runtime_context, and onert_micro::execute::OMExecuteArgs::runtime_storage.
|
constexpr |
Definition at line 126 of file OMKernelExecutionBuilder.h.
Referenced by onert_micro::execute::OMKernelExecute::runForward().
|
constexpr |
Definition at line 127 of file OMKernelExecutionBuilder.h.
Referenced by onert_micro::execute::OMKernelExecute::runForward().