summaryrefslogtreecommitdiff
path: root/onert-micro/luci-interpreter/pal/mcu/PALConv2d.h
diff options
context:
space:
mode:
Diffstat (limited to 'onert-micro/luci-interpreter/pal/mcu/PALConv2d.h')
-rw-r--r--onert-micro/luci-interpreter/pal/mcu/PALConv2d.h66
1 files changed, 6 insertions, 60 deletions
diff --git a/onert-micro/luci-interpreter/pal/mcu/PALConv2d.h b/onert-micro/luci-interpreter/pal/mcu/PALConv2d.h
index 03f01b535..c979f7610 100644
--- a/onert-micro/luci-interpreter/pal/mcu/PALConv2d.h
+++ b/onert-micro/luci-interpreter/pal/mcu/PALConv2d.h
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2021 Samsung Electronics Co., Ltd. All Rights Reserved
- * Copyright 2019 The TensorFlow Authors. All Rights Reserved.
+ * Copyright 2017 The TensorFlow Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,70 +17,16 @@
#ifndef LUCI_INTERPRETER_PAL_CONV2D_H
#define LUCI_INTERPRETER_PAL_CONV2D_H
-
-#include <tensorflow/lite/kernels/internal/reference/conv.h>
-#include <tensorflow/lite/kernels/internal/reference/integer_ops/conv.h>
+#include "PALConv2DCommon.h"
namespace luci_interpreter_pal
{
-static inline void Conv(const tflite::ConvParams &params, const tflite::RuntimeShape &input_shape,
- const float *input_data, const tflite::RuntimeShape &filter_shape,
- const float *filter_data, const tflite::RuntimeShape &bias_shape,
- const float *bias_data, const tflite::RuntimeShape &output_shape,
- float *output_data, const tflite::RuntimeShape &scratchpad_shape,
- float *scratchpad_data)
-{
- (void)scratchpad_shape;
- (void)scratchpad_data;
- tflite::reference_ops::Conv(params, input_shape, input_data, filter_shape, filter_data,
- bias_shape, bias_data, output_shape, output_data,
- tflite::RuntimeShape(), nullptr);
-}
-
-static inline void Conv(const tflite::ConvParams &params, const tflite::RuntimeShape &input_shape,
- const uint8_t *input_data, const tflite::RuntimeShape &filter_shape,
- const uint8_t *filter_data, const tflite::RuntimeShape &bias_shape,
- const int32_t *bias_data, const tflite::RuntimeShape &output_shape,
- uint8_t *output_data, const tflite::RuntimeShape &scratchpad_shape,
- uint8_t *scratchpad_data)
+static inline void QuantizedConvPerChannel(const ConvParams &, const int32_t *, const int8_t *,
+ const int32_t *, const int8_t *, const int32_t *,
+ const int32_t *, int8_t *)
{
- (void)scratchpad_shape;
- (void)scratchpad_data;
- tflite::reference_ops::Conv(params, input_shape, input_data, filter_shape, filter_data,
- bias_shape, bias_data, output_shape, output_data, scratchpad_shape,
- scratchpad_data, nullptr);
+ assert(false && "Not supported yet");
}
-
-static inline void
-ConvPerChannel(const tflite::ConvParams &params, const int32_t *mult, const int32_t *shifts,
- const tflite::RuntimeShape &input_shape, const int8_t *input_data,
- const tflite::RuntimeShape &filter_shape, const int8_t *filter_data,
- const tflite::RuntimeShape &bias_shape, const int32_t *bias_data,
- const tflite::RuntimeShape &output_shape, int8_t *output_data,
- const tflite::RuntimeShape &scratchpad_shape, int8_t *scratchpad_data)
-{
- (void)scratchpad_shape;
- (void)scratchpad_data;
- tflite::reference_integer_ops::ConvPerChannel(params, mult, shifts, input_shape, input_data,
- filter_shape, filter_data, bias_shape, bias_data,
- output_shape, output_data);
-}
-
-static inline void SetupScratchpadTensor(luci_interpreter::Tensor *scratchpad,
- const luci_interpreter::DataType &input_data_type,
- const tflite::ConvParams &params,
- const tflite::RuntimeShape &input_shape,
- const tflite::RuntimeShape &filter_shape,
- const tflite::RuntimeShape &output_shape)
-{
- (void)input_data_type;
- (void)params;
- (void)input_shape;
- (void)filter_shape;
- (void)output_shape;
- (void)scratchpad;
-}
-
} // namespace luci_interpreter_pal
#endif // LUCI_INTERPRETER_PAL_CONV2D_H