17#ifndef LUCI_INTERPRETER_PAL_CONV2D_H
18#define LUCI_INTERPRETER_PAL_CONV2D_H
20#include <tensorflow/lite/kernels/internal/reference/conv.h>
21#include <tensorflow/lite/kernels/internal/reference/integer_ops/conv.h>
25static inline void Conv(
const tflite::ConvParams ¶ms,
const tflite::RuntimeShape &input_shape,
26 const float *input_data,
const tflite::RuntimeShape &filter_shape,
27 const float *filter_data,
const tflite::RuntimeShape &bias_shape,
28 const float *bias_data,
const tflite::RuntimeShape &
output_shape,
29 float *output_data,
const tflite::RuntimeShape &scratchpad_shape,
30 float *scratchpad_data)
32 (void)scratchpad_shape;
33 (void)scratchpad_data;
34 tflite::reference_ops::Conv(params, input_shape, input_data, filter_shape, filter_data,
36 tflite::RuntimeShape(),
nullptr);
39static inline void Conv(
const tflite::ConvParams ¶ms,
const tflite::RuntimeShape &input_shape,
40 const uint8 *input_data,
const tflite::RuntimeShape &filter_shape,
41 const uint8 *filter_data,
const tflite::RuntimeShape &bias_shape,
43 uint8 *output_data,
const tflite::RuntimeShape &scratchpad_shape,
44 uint8 *scratchpad_data)
46 (void)scratchpad_shape;
47 (void)scratchpad_data;
48 tflite::reference_ops::Conv(params, input_shape, input_data, filter_shape, filter_data,
49 bias_shape, bias_data,
output_shape, output_data, scratchpad_shape,
50 scratchpad_data,
nullptr);
53static inline void ConvPerChannel(
const tflite::ConvParams ¶ms,
const int32_t *mult,
54 const int32_t *shifts,
const tflite::RuntimeShape &input_shape,
55 const int8 *input_data,
const tflite::RuntimeShape &filter_shape,
56 const int8 *filter_data,
const tflite::RuntimeShape &bias_shape,
58 int8 *output_data,
const tflite::RuntimeShape &scratchpad_shape,
59 int8 *scratchpad_data)
61 (void)scratchpad_shape;
62 (void)scratchpad_data;
63 tflite::reference_integer_ops::ConvPerChannel(params, mult, shifts, input_shape, input_data,
64 filter_shape, filter_data, bias_shape, bias_data,
70 const tflite::ConvParams ¶ms,
71 const tflite::RuntimeShape &input_shape,
72 const tflite::RuntimeShape &filter_shape,
75 (void)input_data_type;
void set_allocatable(bool value)
const luci_interpreter::RuntimeShape output_shape
DataType
"scalar" value type
void Conv(const ConvParams ¶ms, const Shape &input_shape, const uint8_t *input_data, const Shape &filter_shape, const uint8_t *filter_data, const Shape &bias_shape, const int32_t *bias_data, const Shape &output_shape, uint8_t *output_data, const Shape &im2col_shape, uint8_t *im2col_data)