ONE - On-device Neural Engine
Loading...
Searching...
No Matches
PALreference_ops.h File Reference
#include <stdint.h>
#include <sys/types.h>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <functional>
#include <limits>
#include <memory>
#include <type_traits>
#include "third_party/eigen3/Eigen/Core"
#include "fixedpoint/fixedpoint.h"
#include "ruy/profiler/instrumentation.h"
#include "tensorflow/lite/c/common.h"
#include "tensorflow/lite/kernels/internal/common.h"
#include "tensorflow/lite/kernels/internal/quantization_util.h"
#include "tensorflow/lite/kernels/internal/reference/add.h"
#include "tensorflow/lite/kernels/internal/reference/add_n.h"
#include "tensorflow/lite/kernels/internal/reference/arg_min_max.h"
#include "tensorflow/lite/kernels/internal/reference/batch_matmul.h"
#include "tensorflow/lite/kernels/internal/reference/batch_to_space_nd.h"
#include "tensorflow/lite/kernels/internal/reference/binary_function.h"
#include "tensorflow/lite/kernels/internal/reference/cast.h"
#include "tensorflow/lite/kernels/internal/reference/ceil.h"
#include "tensorflow/lite/kernels/internal/reference/comparisons.h"
#include "tensorflow/lite/kernels/internal/reference/concatenation.h"
#include "tensorflow/lite/kernels/internal/reference/conv.h"
#include "tensorflow/lite/kernels/internal/reference/depth_to_space.h"
#include "tensorflow/lite/kernels/internal/reference/dequantize.h"
#include "tensorflow/lite/kernels/internal/reference/div.h"
#include "tensorflow/lite/kernels/internal/reference/elu.h"
#include "tensorflow/lite/kernels/internal/reference/exp.h"
#include "tensorflow/lite/kernels/internal/reference/fill.h"
#include "tensorflow/lite/kernels/internal/reference/floor.h"
#include "tensorflow/lite/kernels/internal/reference/floor_div.h"
#include "tensorflow/lite/kernels/internal/reference/floor_mod.h"
#include "tensorflow/lite/kernels/internal/reference/fully_connected.h"
#include "tensorflow/lite/kernels/internal/reference/gather.h"
#include "tensorflow/lite/kernels/internal/reference/hard_swish.h"
#include "tensorflow/lite/kernels/internal/reference/l2normalization.h"
#include "tensorflow/lite/kernels/internal/reference/leaky_relu.h"
#include "tensorflow/lite/kernels/internal/reference/log_softmax.h"
#include "tensorflow/lite/kernels/internal/reference/logistic.h"
#include "tensorflow/lite/kernels/internal/reference/maximum_minimum.h"
#include "tensorflow/lite/kernels/internal/reference/mul.h"
#include "tensorflow/lite/kernels/internal/reference/neg.h"
#include "tensorflow/lite/kernels/internal/reference/pad.h"
#include "tensorflow/lite/kernels/internal/reference/pooling.h"
#include "tensorflow/lite/kernels/internal/reference/prelu.h"
#include "tensorflow/lite/kernels/internal/reference/process_broadcast_shapes.h"
#include "tensorflow/lite/kernels/internal/reference/quantize.h"
#include "tensorflow/lite/kernels/internal/reference/reduce.h"
#include "tensorflow/lite/kernels/internal/reference/requantize.h"
#include "tensorflow/lite/kernels/internal/reference/resize_bilinear.h"
#include "tensorflow/lite/kernels/internal/reference/resize_nearest_neighbor.h"
#include "tensorflow/lite/kernels/internal/reference/round.h"
#include "tensorflow/lite/kernels/internal/reference/softmax.h"
#include "tensorflow/lite/kernels/internal/reference/space_to_batch_nd.h"
#include "tensorflow/lite/kernels/internal/reference/space_to_depth.h"
#include "tensorflow/lite/kernels/internal/reference/strided_slice.h"
#include "tensorflow/lite/kernels/internal/reference/string_comparisons.h"
#include "tensorflow/lite/kernels/internal/reference/sub.h"
#include "tensorflow/lite/kernels/internal/reference/tanh.h"
#include "tensorflow/lite/kernels/internal/reference/transpose.h"
#include "tensorflow/lite/kernels/internal/reference/transpose_conv.h"
#include "tensorflow/lite/kernels/internal/strided_slice_logic.h"
#include "tensorflow/lite/kernels/internal/tensor.h"
#include "tensorflow/lite/kernels/internal/types.h"

Go to the source code of this file.

Data Structures

struct  tflite::reference_ops::GatherNdHelperResult
 

Namespaces

namespace  tflite
 
namespace  tflite::reference_ops
 

Functions

template<typename T >
void tflite::reference_ops::Relu (const RuntimeShape &input_shape, const T *input_data, const RuntimeShape &output_shape, T *output_data)
 
template<typename T >
void tflite::reference_ops::Relu1 (const RuntimeShape &input_shape, const T *input_data, const RuntimeShape &output_shape, T *output_data)
 
void tflite::reference_ops::Relu6 (const RuntimeShape &input_shape, const float *input_data, const RuntimeShape &output_shape, float *output_data)
 
template<typename T >
void tflite::reference_ops::ReluX (const tflite::ReluParams &params, const RuntimeShape &input_shape, const T *input_data, const RuntimeShape &output_shape, T *output_data)
 
template<typename T >
void tflite::reference_ops::ReluX (const tflite::ActivationParams &params, const RuntimeShape &input_shape, const T *input_data, const RuntimeShape &output_shape, T *output_data)
 
void tflite::reference_ops::BroadcastMulFivefold (const ArithmeticParams &unswitched_params, const RuntimeShape &unswitched_input1_shape, const uint8 *unswitched_input1_data, const RuntimeShape &unswitched_input2_shape, const uint8 *unswitched_input2_data, const RuntimeShape &output_shape, uint8 *output_data)
 
void tflite::reference_ops::Mul (const ArithmeticParams &params, const RuntimeShape &input1_shape, const int16 *input1_data, const RuntimeShape &input2_shape, const int16 *input2_data, const RuntimeShape &output_shape, int16 *output_data)
 
void tflite::reference_ops::Mul (const ArithmeticParams &params, const RuntimeShape &input1_shape, const int16 *input1_data, const RuntimeShape &input2_shape, const int16 *input2_data, const RuntimeShape &output_shape, uint8 *output_data)
 
void tflite::reference_ops::Sub16 (const ArithmeticParams &params, const RuntimeShape &input1_shape, const int16_t *input1_data, const RuntimeShape &input2_shape, const int16_t *input2_data, const RuntimeShape &output_shape, int16_t *output_data)
 
template<typename Scalar >
void tflite::reference_ops::Pack (const PackParams &params, const RuntimeShape *const *input_shapes, const Scalar *const *input_data, const RuntimeShape &output_shape, Scalar *output_data)
 
template<typename Scalar >
void tflite::reference_ops::Unpack (const UnpackParams &params, const RuntimeShape &input_shape, const Scalar *input_data, const RuntimeShape &output_shape, Scalar *const *output_datas)
 
template<typename Scalar >
void tflite::reference_ops::PackWithScaling (const PackParams &params, const RuntimeShape *const *input_shapes, const uint8 *const *input_data, const RuntimeShape &output_shape, uint8 *output_data)
 
template<typename Scalar >
void tflite::reference_ops::DepthConcatenation (const ConcatenationParams &params, const RuntimeShape *const *input_shapes, const Scalar *const *input_data, const RuntimeShape &output_shape, Scalar *output_data)
 
void tflite::reference_ops::LstmCell (const LstmCellParams &params, const RuntimeShape &unextended_input_shape, const float *input_data, const RuntimeShape &unextended_prev_activ_shape, const float *prev_activ_data, const RuntimeShape &weights_shape, const float *weights_data, const RuntimeShape &unextended_bias_shape, const float *bias_data, const RuntimeShape &unextended_prev_state_shape, const float *prev_state_data, const RuntimeShape &unextended_output_state_shape, float *output_state_data, const RuntimeShape &unextended_output_activ_shape, float *output_activ_data, const RuntimeShape &unextended_concat_temp_shape, float *concat_temp_data, const RuntimeShape &unextended_activ_temp_shape, float *activ_temp_data)
 
template<int StateIntegerBits>
void tflite::reference_ops::LstmCell (const LstmCellParams &params, const RuntimeShape &unextended_input_shape, const uint8 *input_data_uint8, const RuntimeShape &unextended_prev_activ_shape, const uint8 *prev_activ_data_uint8, const RuntimeShape &weights_shape, const uint8 *weights_data_uint8, const RuntimeShape &unextended_bias_shape, const int32 *bias_data_int32, const RuntimeShape &unextended_prev_state_shape, const int16 *prev_state_data_int16, const RuntimeShape &unextended_output_state_shape, int16 *output_state_data_int16, const RuntimeShape &unextended_output_activ_shape, uint8 *output_activ_data_uint8, const RuntimeShape &unextended_concat_temp_shape, uint8 *concat_temp_data_uint8, const RuntimeShape &unextended_activ_temp_shape, int16 *activ_temp_data_int16, void *gemmlowp_context)
 
template<typename Scalar >
void tflite::reference_ops::Split (const SplitParams &params, const RuntimeShape &input_shape, const Scalar *input_data, const RuntimeShape *const *output_shapes, Scalar *const *output_data)
 
int tflite::reference_ops::NodeOffset (int b, int h, int w, int height, int width)
 
void tflite::reference_ops::LocalResponseNormalization (const tflite::LocalResponseNormalizationParams &op_params, const RuntimeShape &input_shape, const float *input_data, const RuntimeShape &output_shape, float *output_data)
 
void tflite::reference_ops::Dequantize (const RuntimeShape &input_shape, const Eigen::half *input_data, const RuntimeShape &output_shape, float *output_data)
 
void tflite::reference_ops::FakeQuant (const tflite::FakeQuantParams &op_params, const RuntimeShape &input_shape, const float *input_data, const RuntimeShape &output_shape, float *output_data)
 
GatherNdHelperResult tflite::reference_ops::GatherNdHelper (const RuntimeShape &params_shape, const RuntimeShape &indices_shape)
 
template<typename ParamsT , typename IndicesT = int32>
void tflite::reference_ops::GatherNd (const RuntimeShape &params_shape, const ParamsT *params_data, const RuntimeShape &indices_shape, const IndicesT *indices_data, const RuntimeShape &output_shape, ParamsT *output_data)
 
template<typename IndicesT = int32>
void tflite::reference_ops::GatherNdString (const RuntimeShape &params_shape, const TfLiteTensor *params_data, const RuntimeShape &indices_shape, const IndicesT *indices_data, const RuntimeShape &output_shape, TfLiteTensor *output_data)
 
template<typename IndicesT , typename UpdatesT >
void tflite::reference_ops::ScatterNd (const RuntimeShape &indices_shape, const IndicesT *indices_data, const RuntimeShape &updates_shape, const UpdatesT *updates_data, const RuntimeShape &output_shape, UpdatesT *output_data)
 
template<typename T >
void tflite::reference_ops::Slice (const tflite::SliceParams &op_params, const RuntimeShape &input_shape, const RuntimeShape &output_shape, SequentialTensorWriter< T > *writer)
 
template<typename T >
void tflite::reference_ops::Slice (const tflite::SliceParams &op_params, const RuntimeShape &input_shape, const T *input_data, const RuntimeShape &output_shape, T *output_data)
 
template<typename T >
void tflite::reference_ops::Slice (const tflite::SliceParams &op_params, const RuntimeShape &input_shape, const TfLiteTensor *input, const RuntimeShape &output_shape, TfLiteTensor *output)
 
template<typename T >
void tflite::reference_ops::Minimum (const RuntimeShape &input1_shape, const T *input1_data, const T *input2_data, const RuntimeShape &output_shape, T *output_data)
 
template<typename T >
void tflite::reference_ops::Minimum (const RuntimeShape &input1_shape, const T *input1_data, const RuntimeShape &, const T *input2_data, const RuntimeShape &output_shape, T *output_data)
 
template<typename T >
void tflite::reference_ops::Maximum (const RuntimeShape &input1_shape, const T *input1_data, const T *input2_data, const RuntimeShape &output_shape, T *output_data)
 
template<typename T >
void tflite::reference_ops::Maximum (const RuntimeShape &input1_shape, const T *input1_data, const RuntimeShape &, const T *input2_data, const RuntimeShape &output_shape, T *output_data)
 
template<typename T1 , typename T2 , typename T3 >
void tflite::reference_ops::ArgMax (const RuntimeShape &input1_shape, const T1 *input1_data, const T3 *input2_data, const RuntimeShape &output_shape, T2 *output_data)
 
template<typename T1 , typename T2 , typename T3 >
void tflite::reference_ops::ArgMax (const RuntimeShape &input1_shape, const T1 *input1_data, const RuntimeShape &input2_shape, const T3 *input2_data, const RuntimeShape &output_shape, T2 *output_data)
 
template<typename D , typename T >
void tflite::reference_ops::Select (const RuntimeShape &input_condition_shape, const D *input_condition_data, const RuntimeShape &input_x_shape, const T *input_x_data, const RuntimeShape &input_y_shape, const T *input_y_data, const RuntimeShape &output_shape, T *output_data)
 
template<typename D , typename T >
void tflite::reference_ops::RankOneSelect (const RuntimeShape &input_condition_shape, const D *input_condition_data, const RuntimeShape &input_x_shape, const T *input_x_data, const RuntimeShape &input_y_shape, const T *input_y_data, const RuntimeShape &output_shape, T *output_data)
 
template<typename D , typename T >
void tflite::reference_ops::BroadcastSelect4DSlow (const RuntimeShape &input_condition_shape, const D *input_condition_data, const RuntimeShape &input_x_shape, const T *input_x_data, const RuntimeShape &input_y_shape, const T *input_y_data, const RuntimeShape &output_shape, T *output_data)
 
template<typename D , typename T >
void tflite::reference_ops::SelectTrueCoords (const RuntimeShape &input_condition_shape, const D *input_condition_data, T *output_data)
 
template<typename T , typename TI >
void tflite::reference_ops::SparseToDense (const std::vector< std::vector< TI > > &indices, const T *values, T default_value, bool value_is_scalar, const RuntimeShape &unextended_output_shape, T *output_data)
 
template<typename T >
void tflite::reference_ops::Pow (const RuntimeShape &input1_shape, const T *input1_data, const RuntimeShape &input2_shape, const T *input2_data, const RuntimeShape &output_shape, T *output_data)
 
template<typename T >
void tflite::reference_ops::BroadcastPow4DSlow (const RuntimeShape &unextended_input1_shape, const T *input1_data, const RuntimeShape &unextended_input2_shape, const T *input2_data, const RuntimeShape &unextended_output_shape, T *output_data)
 
template<typename Scalar >
void tflite::reference_ops::Reverse (int axis, const RuntimeShape &input_shape, const Scalar *input_data, const RuntimeShape &output_shape, Scalar *output_data)
 
template<typename Scalar , typename TS >
void tflite::reference_ops::ReverseSequence (const TS *seq_lengths, const int seq_dim, const int batch_dim, const RuntimeShape &input_shape, const Scalar *input_data, const RuntimeShape &output_shape, Scalar *output_data)
 
template<typename T >
void tflite::reference_ops::SegmentSum (const RuntimeShape &input_shape, const T *input_data, const RuntimeShape &segment_ids_shape, const int32_t *segment_ids_data, const RuntimeShape &output_shape, T *output_data)