ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Utils.h File Reference
#include "core/KernelParams.h"
#include "luci_interpreter/core/Tensor.h"
#include <tensorflow/lite/kernels/internal/tensor_utils.h>
#include <tensorflow/lite/kernels/internal/types.h>
#include <cassert>
#include <cstdint>
#include <stdexcept>

Go to the source code of this file.

Data Structures

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

Namespaces

namespace  luci_interpreter
 
namespace  luci_interpreter::kernels
 

Macros

#define LUCI_INTERPRETER_CHECK(cond)
 

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 Shape &shape, int32_t d0, int32_t d1, int32_t d2, int32_t d3)
 
TfLiteFusedActivation luci_interpreter::kernels::getTfLiteActivation (Activation activation)
 
template<typename T >
void luci_interpreter::kernels::calculateActivationRange (Activation activation, T *activation_min, T *activation_max)
 
void luci_interpreter::kernels::calculateActivationRangeQuantized (Activation activation, const Tensor *output, int32_t *activation_min, int32_t *activation_max)
 
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 ()
 
template<typename T >
void luci_interpreter::kernels::fillArithmeticActivationRange (tflite::ArithmeticParams &p, Activation act)
 
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)
 
Shape luci_interpreter::kernels::calculateShapeForBroadcast (const Shape &input1_shape, const Shape &input2_shape)
 
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)
 
tflite::RuntimeShape luci_interpreter::kernels::getTensorShape (const Tensor *tensor)
 
template<typename T >
const T * luci_interpreter::kernels::getTensorData (const Tensor *tensor)
 
template<typename T >
T * luci_interpreter::kernels::getTensorData (Tensor *tensor)
 

Macro Definition Documentation

◆ LUCI_INTERPRETER_CHECK

#define LUCI_INTERPRETER_CHECK (   cond)
Value:
if (!(cond)) \
throw std::runtime_error(std::string(__FILE__) + ":" + std::to_string(__LINE__) + +"(" + \
std::string(#cond) + ") was not true.");

Definition at line 36 of file Utils.h.

38 :" + std::to_string(__LINE__) + +"(" + \
39 std::string(#cond) + ") was not true.");