ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Utils.h File Reference
#include "luci_interpreter/core/Tensor.h"
#include "Builders.h"
#include "Params.h"
#include <cassert>
#include <cstdint>
#include <cmath>

Go to the source code of this file.

Data Structures

class  luci_interpreter::kernels::BroadcastableWrapper< T >
 
class  luci_interpreter::kernels::VectorOfTensors< T, is_const >
 
struct  luci_interpreter::kernels::ChannelQuantMultipliers
 
class  luci_interpreter::kernels::VectorOfQuantizedTensors< is_const >
 

Namespaces

namespace  luci_interpreter
 
namespace  luci_interpreter::kernels
 

Macros

#define LUCI_INTERPRETER_CHECK(cond)
 

Typedefs

using luci_interpreter::kernels::Activation = luci_interpreter::FusedActFunc
 

Functions

int32_t luci_interpreter::kernels::computePadding (int32_t stride, int32_t dilation_rate, int32_t in_size, int32_t filter_size, int32_t out_size)
 
int32_t luci_interpreter::kernels::computePaddingWithOffset (int32_t stride, int32_t dilation_rate, int32_t in_size, int32_t filter_size, int32_t out_size, int32_t *offset)
 
int32_t luci_interpreter::kernels::computeOutputSize (Padding padding, int32_t image_size, int32_t filter_size, int32_t stride, int32_t dilation_rate=1)
 
int32_t luci_interpreter::kernels::calcOffset (const circle::Tensor *tensor, int32_t d0, int32_t d1, int32_t d2, int32_t d3)
 
template<typename T >
void luci_interpreter::kernels::calculateActivationRange (Activation activation, T *activation_min, T *activation_max)
 
luci_interpreter::RuntimeShape luci_interpreter::kernels::calculateShapeForBroadcast (const circle::Tensor *input1, const circle::Tensor *input2)
 
luci_interpreter::RuntimeShape luci_interpreter::kernels::getTensorShape (const circle::Tensor *tensor)
 
void luci_interpreter::kernels::getTensorDims (const circle::Tensor *tensor, BaseRuntimeGraph *runtime_graph, int32_t *dims)
 
template<typename T >
const T * luci_interpreter::kernels::getTensorData (const uint8_t *tensor_data)
 
template<typename T >
T * luci_interpreter::kernels::getTensorData (uint8_t *tensor_data)
 
luci_interpreter::RuntimeShape luci_interpreter::kernels::getTensorRuntimeShape (const circle::Tensor *circle_tensor, BaseRuntimeGraph *runtime_graph)
 
template<typename T >
constexpr bool luci_interpreter::kernels::one_of_types ()
 
template<typename T , typename U , typename... Other>
constexpr bool luci_interpreter::kernels::one_of_types ()
 
void luci_interpreter::kernels::matrixScalarMultiplyAccumulate (const int8_t *matrix, int32_t scalar, int32_t n_row, int32_t n_col, int32_t *output)
 
bool luci_interpreter::kernels::areShapesEqual (const luci_interpreter::RuntimeShape &input_shape1, const luci_interpreter::RuntimeShape &input_shape2)
 
bool luci_interpreter::kernels::checkedLog2 (const float x, int *log2_result)
 
int luci_interpreter::kernels::calculateInputRadius (int input_integer_bits, int input_left_shift, int total_signed_bits)
 
void luci_interpreter::kernels::calculateActivationRangeQuantized (Activation activation, const circle::Tensor *output, int32_t *activation_min, int32_t *activation_max)
 
void luci_interpreter::kernels::calculateActivationRangeQuantized (Activation activation, int32_t output_zero_point, float output_scale, DataType data_type, int32_t *activation_min, int32_t *activation_max)
 
void luci_interpreter::kernels::quantizeMultiplier (double double_multiplier, int32_t *quantized_multiplier, int *shift)
 
void luci_interpreter::kernels::quantizeMultiplierSmallerThanOneExp (double double_multiplier, int32_t *quantized_multiplier, int *left_shift)
 
double luci_interpreter::kernels::getQuantizedConvolutionMultipler (float input_scale, float filter_scale, float output_scale)
 
std::vector< double > luci_interpreter::kernels::getQuantizedConvolutionMultiplers (float input_scale, const std::vector< float > &filter_scale, float output_scale)
 
std::vector< ChannelQuantMultipliersluci_interpreter::kernels::quantizeMultipliers (const std::vector< double > &effective_scale)
 

Macro Definition Documentation

◆ LUCI_INTERPRETER_CHECK

#define LUCI_INTERPRETER_CHECK (   cond)
Value:
if (!(cond)) \
{ \
assert(false && "LUCI_INTERPRETER_CHECK fails"); \
}

Definition at line 36 of file Utils.h.

38 { \
39 assert(false && "LUCI_INTERPRETER_CHECK fails"); \
40 }