Move schema version into micro_interpreter.h
This is a first (somewhat non-intuitive) step towards being able to use clang as part of the github CI system. The benefits of this refactor are that we avoid a dependency into tensorflow/core which reduces the number of files that need to be downloaded as part of a bazel build from a TFLM CI docker image. The tflite schema version has been unchanged since at-least Oct 2018 (when tflite was moved out of tensorflow/contrib). Progress towards preventing a repeat of https://github.com/tensorflow/tensorflow/issues/46415
This commit is contained in:
parent
4491d6ee3a
commit
4dadd12623
@ -58,7 +58,6 @@ cc_binary(
|
||||
],
|
||||
deps = [
|
||||
":micro_benchmark",
|
||||
"//tensorflow/lite:schema_fbs_version",
|
||||
"//tensorflow/lite/c:common",
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
|
@ -24,7 +24,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_interpreter.h"
|
||||
#include "tensorflow/lite/micro/micro_utils.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
/*
|
||||
* Person Detection benchmark. Evaluates runtime performance of the visual
|
||||
|
@ -34,7 +34,6 @@ tflite_micro_cc_test(
|
||||
],
|
||||
deps = [
|
||||
":model",
|
||||
"//tensorflow/lite:schema_fbs_version",
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
"//tensorflow/lite/micro:op_resolvers",
|
||||
@ -85,7 +84,6 @@ cc_binary(
|
||||
":constants",
|
||||
":model",
|
||||
":output_handler",
|
||||
"//tensorflow/lite:schema_fbs_version",
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
"//tensorflow/lite/micro:op_resolvers",
|
||||
|
@ -21,7 +21,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_interpreter.h"
|
||||
#include "tensorflow/lite/micro/testing/micro_test.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
TF_LITE_MICRO_TESTS_BEGIN
|
||||
|
||||
|
@ -22,7 +22,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_error_reporter.h"
|
||||
#include "tensorflow/lite/micro/micro_interpreter.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
// Globals, used for compatibility with Arduino-style sketches.
|
||||
namespace {
|
||||
|
@ -35,7 +35,6 @@ tflite_micro_cc_test(
|
||||
],
|
||||
deps = [
|
||||
":image_model_data",
|
||||
"//tensorflow/lite:schema_fbs_version",
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
"//tensorflow/lite/micro:op_resolvers",
|
||||
|
@ -21,7 +21,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
|
||||
#include "tensorflow/lite/micro/testing/micro_test.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
#define IMAGE_BYTES 3072
|
||||
#define LABEL_BYTES 1
|
||||
|
@ -24,7 +24,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_interpreter.h"
|
||||
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
#define NUM_OUT_CH 3
|
||||
#define CNN_IMG_SIZE 32
|
||||
|
@ -42,7 +42,6 @@ tflite_micro_cc_test(
|
||||
deps = [
|
||||
":magic_wand_model_data",
|
||||
":sample_feature_data",
|
||||
"//tensorflow/lite:schema_fbs_version",
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
"//tensorflow/lite/micro:op_resolvers",
|
||||
@ -158,7 +157,6 @@ cc_binary(
|
||||
":gesture_predictor",
|
||||
":magic_wand_model_data",
|
||||
":output_handler",
|
||||
"//tensorflow/lite:schema_fbs_version",
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
"//tensorflow/lite/micro:op_resolvers",
|
||||
|
@ -21,7 +21,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
|
||||
#include "tensorflow/lite/micro/testing/micro_test.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
TF_LITE_MICRO_TESTS_BEGIN
|
||||
|
||||
|
@ -24,7 +24,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_interpreter.h"
|
||||
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
// Globals, used for compatibility with Arduino-style sketches.
|
||||
namespace {
|
||||
|
@ -50,7 +50,6 @@ tflite_micro_cc_test(
|
||||
"micro_speech_test.cc",
|
||||
],
|
||||
deps = [
|
||||
"//tensorflow/lite:schema_fbs_version",
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
"//tensorflow/lite/micro:op_resolvers",
|
||||
@ -362,7 +361,6 @@ cc_binary(
|
||||
":command_responder",
|
||||
":feature_provider",
|
||||
":recognize_commands",
|
||||
"//tensorflow/lite:schema_fbs_version",
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
"//tensorflow/lite/micro:op_resolvers",
|
||||
@ -384,7 +382,6 @@ cc_binary(
|
||||
":command_responder",
|
||||
":feature_provider",
|
||||
":recognize_commands",
|
||||
"//tensorflow/lite:schema_fbs_version",
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
"//tensorflow/lite/micro:op_resolvers",
|
||||
|
@ -24,7 +24,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_interpreter.h"
|
||||
#include "tensorflow/lite/micro/testing/micro_test.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
extern int16_t captured_data[16000];
|
||||
uint8_t g_silence_score = 0;
|
||||
|
@ -28,7 +28,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_interpreter.h"
|
||||
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
extern int32_t g_latest_audio_timestamp;
|
||||
void setup_tf();
|
||||
|
@ -25,7 +25,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_interpreter.h"
|
||||
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
// Globals, used for compatibility with Arduino-style sketches.
|
||||
namespace {
|
||||
|
@ -21,7 +21,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
|
||||
#include "tensorflow/lite/micro/testing/micro_test.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
TF_LITE_MICRO_TESTS_BEGIN
|
||||
|
||||
|
@ -22,7 +22,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_utils.h"
|
||||
#include "tensorflow/lite/micro/testing/micro_test.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
#ifndef TENSOR_ARENA_SIZE
|
||||
#define TENSOR_ARENA_SIZE (1024)
|
||||
|
@ -63,7 +63,6 @@ tflite_micro_cc_test(
|
||||
":model_settings",
|
||||
":person_detect_model_data",
|
||||
":simple_images_test_data",
|
||||
"//tensorflow/lite:schema_fbs_version",
|
||||
"//tensorflow/lite/c:common",
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
@ -142,7 +141,6 @@ cc_binary(
|
||||
":image_provider",
|
||||
":model_settings",
|
||||
":person_detect_model_data",
|
||||
"//tensorflow/lite:schema_fbs_version",
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
"//tensorflow/lite/micro:op_resolvers",
|
||||
|
@ -23,7 +23,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_interpreter.h"
|
||||
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
// Globals, used for compatibility with Arduino-style sketches.
|
||||
namespace {
|
||||
|
@ -23,7 +23,6 @@ limitations under the License.
|
||||
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
|
||||
#include "tensorflow/lite/micro/testing/micro_test.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/version.h"
|
||||
|
||||
// Create an area of memory to use for input, output, and intermediate arrays.
|
||||
constexpr int tensor_arena_size = 136 * 1024;
|
||||
|
@ -28,6 +28,10 @@ limitations under the License.
|
||||
#include "tensorflow/lite/portable_type_to_tflitetype.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
|
||||
// Copied from tensorflow/lite/version.h to avoid a dependency chain into
|
||||
// tensorflow/core.
|
||||
#define TFLITE_SCHEMA_VERSION (3)
|
||||
|
||||
namespace tflite {
|
||||
|
||||
namespace internal {
|
||||
|
@ -387,7 +387,6 @@ $(wildcard tensorflow/lite/micro/benchmarks/*model_data.h) \
|
||||
$(wildcard tensorflow/lite/micro/kernels/*.h) \
|
||||
$(wildcard tensorflow/lite/micro/memory_planner/*.h) \
|
||||
LICENSE \
|
||||
tensorflow/core/public/version.h \
|
||||
tensorflow/lite/c/builtin_op_data.h \
|
||||
tensorflow/lite/c/c_api_types.h \
|
||||
tensorflow/lite/c/common.h \
|
||||
@ -455,8 +454,7 @@ tensorflow/lite/kernels/op_macros.h \
|
||||
tensorflow/lite/kernels/padding.h \
|
||||
tensorflow/lite/portable_type_to_tflitetype.h \
|
||||
tensorflow/lite/schema/schema_generated.h \
|
||||
tensorflow/lite/schema/schema_utils.h \
|
||||
tensorflow/lite/version.h
|
||||
tensorflow/lite/schema/schema_utils.h
|
||||
|
||||
# TODO(b/165940489): Figure out how to avoid including fixed point
|
||||
# platform-specific headers.
|
||||
|
Loading…
Reference in New Issue
Block a user