Revert TF Micro support for embedded build using proxy macros.
PiperOrigin-RevId: 323656191 Change-Id: I5940e6ff40e3019372d2cf73265a02f47f8cc0c1
This commit is contained in:
parent
dd13d3b4c6
commit
a6f0697328
@ -1,6 +1,5 @@
|
|||||||
load("//tensorflow:tensorflow.bzl", "if_not_windows", "tf_cc_test")
|
load("//tensorflow:tensorflow.bzl", "if_not_windows", "tf_cc_test")
|
||||||
load("//tensorflow/lite:build_def.bzl", "if_tflite_experimental_runtime", "tflite_cc_shared_object", "tflite_copts", "tflite_experimental_runtime_linkopts")
|
load("//tensorflow/lite:build_def.bzl", "if_tflite_experimental_runtime", "tflite_cc_shared_object", "tflite_copts", "tflite_experimental_runtime_linkopts")
|
||||||
load("//tensorflow/lite/micro:build_def.bzl", "cc_library")
|
|
||||||
load("//tensorflow/lite:special_rules.bzl", "tflite_portable_test_suite")
|
load("//tensorflow/lite:special_rules.bzl", "tflite_portable_test_suite")
|
||||||
|
|
||||||
package(
|
package(
|
||||||
@ -83,7 +82,6 @@ FRAMEWORK_LIB_HDRS = [
|
|||||||
cc_library(
|
cc_library(
|
||||||
name = "version",
|
name = "version",
|
||||||
hdrs = ["version.h"],
|
hdrs = ["version.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = TFLITE_DEFAULT_COPTS,
|
copts = TFLITE_DEFAULT_COPTS,
|
||||||
# Note that we only use the header defines from :version_lib.
|
# Note that we only use the header defines from :version_lib.
|
||||||
deps = ["//tensorflow/core:version_lib"],
|
deps = ["//tensorflow/core:version_lib"],
|
||||||
@ -139,7 +137,6 @@ cc_library(
|
|||||||
name = "external_cpu_backend_context",
|
name = "external_cpu_backend_context",
|
||||||
srcs = ["external_cpu_backend_context.cc"],
|
srcs = ["external_cpu_backend_context.cc"],
|
||||||
hdrs = ["external_cpu_backend_context.h"],
|
hdrs = ["external_cpu_backend_context.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = TFLITE_DEFAULT_COPTS,
|
copts = TFLITE_DEFAULT_COPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//tensorflow/lite/c:common",
|
"//tensorflow/lite/c:common",
|
||||||
@ -193,7 +190,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"string_type.h",
|
"string_type.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = TFLITE_DEFAULT_COPTS,
|
copts = TFLITE_DEFAULT_COPTS,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -309,7 +305,6 @@ cc_library(
|
|||||||
name = "string_util",
|
name = "string_util",
|
||||||
srcs = ["string_util.cc"],
|
srcs = ["string_util.cc"],
|
||||||
hdrs = ["string_util.h"],
|
hdrs = ["string_util.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = TFLITE_DEFAULT_COPTS,
|
copts = TFLITE_DEFAULT_COPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":string",
|
":string",
|
||||||
@ -620,7 +615,6 @@ cc_library(
|
|||||||
cc_library(
|
cc_library(
|
||||||
name = "type_to_tflitetype",
|
name = "type_to_tflitetype",
|
||||||
hdrs = ["type_to_tflitetype.h"],
|
hdrs = ["type_to_tflitetype.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
deps = ["//tensorflow/lite/c:common"],
|
deps = ["//tensorflow/lite/c:common"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -3,10 +3,6 @@ load(
|
|||||||
"tflite_cc_shared_object",
|
"tflite_cc_shared_object",
|
||||||
"tflite_copts",
|
"tflite_copts",
|
||||||
)
|
)
|
||||||
load(
|
|
||||||
"//tensorflow/lite/micro:build_def.bzl",
|
|
||||||
"cc_library",
|
|
||||||
)
|
|
||||||
|
|
||||||
package(
|
package(
|
||||||
default_visibility = ["//visibility:public"],
|
default_visibility = ["//visibility:public"],
|
||||||
@ -126,7 +122,6 @@ cc_library(
|
|||||||
"builtin_op_data.h",
|
"builtin_op_data.h",
|
||||||
"common.h",
|
"common.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
alwayslink = 1,
|
alwayslink = 1,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
load("//tensorflow/lite:build_def.bzl", "tflite_copts")
|
load("//tensorflow/lite:build_def.bzl", "tflite_copts")
|
||||||
load("//tensorflow/lite/micro:build_def.bzl", "cc_library", "micro_copts")
|
load("//tensorflow/lite/micro:build_def.bzl", "micro_copts")
|
||||||
|
|
||||||
package(
|
package(
|
||||||
default_visibility = ["//visibility:public"],
|
default_visibility = ["//visibility:public"],
|
||||||
@ -21,7 +21,6 @@ cc_library(
|
|||||||
"profiler.h",
|
"profiler.h",
|
||||||
"tensor_utils.h",
|
"tensor_utils.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts() + micro_copts(),
|
copts = tflite_copts() + micro_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
"@flatbuffers//:runtime_cc",
|
"@flatbuffers//:runtime_cc",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
load("//tensorflow/lite:build_def.bzl", "tflite_copts")
|
load("//tensorflow/lite:build_def.bzl", "tflite_copts")
|
||||||
load("//tensorflow/lite/micro:build_def.bzl", "cc_library", "micro_copts")
|
load("//tensorflow/lite/micro:build_def.bzl", "micro_copts")
|
||||||
load("//tensorflow/lite:special_rules.bzl", "tflite_portable_test_suite_combined")
|
load("//tensorflow/lite:special_rules.bzl", "tflite_portable_test_suite_combined")
|
||||||
load("//tensorflow:tensorflow.bzl", "tf_opts_nortti_if_android")
|
load("//tensorflow:tensorflow.bzl", "tf_opts_nortti_if_android")
|
||||||
|
|
||||||
@ -281,7 +281,6 @@ cc_test(
|
|||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "tflite_with_ruy_enabled",
|
name = "tflite_with_ruy_enabled",
|
||||||
build_for_embedded = True,
|
|
||||||
defines = ["TFLITE_WITH_RUY"],
|
defines = ["TFLITE_WITH_RUY"],
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
)
|
)
|
||||||
@ -297,8 +296,8 @@ cc_library(
|
|||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "tflite_with_ruy_default",
|
name = "tflite_with_ruy_default",
|
||||||
build_for_embedded = True,
|
visibility = ["//visibility:private"],
|
||||||
select_deps = {
|
deps = select({
|
||||||
":chromiumos_arm64": [":tflite_with_ruy_enabled"],
|
":chromiumos_arm64": [":tflite_with_ruy_enabled"],
|
||||||
":cpu_aarch64": [":tflite_with_ruy_enabled"],
|
":cpu_aarch64": [":tflite_with_ruy_enabled"],
|
||||||
":cpu_arm64": [":tflite_with_ruy_enabled"],
|
":cpu_arm64": [":tflite_with_ruy_enabled"],
|
||||||
@ -308,18 +307,16 @@ cc_library(
|
|||||||
":cpu_arm64_v8a": [":tflite_with_ruy_enabled"],
|
":cpu_arm64_v8a": [":tflite_with_ruy_enabled"],
|
||||||
"//tensorflow:android_arm": ["tflite_with_ruy_enabled"],
|
"//tensorflow:android_arm": ["tflite_with_ruy_enabled"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
},
|
}),
|
||||||
visibility = ["//visibility:private"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "tflite_with_ruy",
|
name = "tflite_with_ruy",
|
||||||
build_for_embedded = True,
|
deps = select({
|
||||||
select_deps = {
|
|
||||||
":tflite_with_ruy_explicit_true": [":tflite_with_ruy_enabled"],
|
":tflite_with_ruy_explicit_true": [":tflite_with_ruy_enabled"],
|
||||||
":tflite_with_ruy_explicit_false": [],
|
":tflite_with_ruy_explicit_false": [],
|
||||||
"//conditions:default": [":tflite_with_ruy_default"],
|
"//conditions:default": [":tflite_with_ruy_default"],
|
||||||
},
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
@ -432,7 +429,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"op_macros.h",
|
"op_macros.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts(),
|
copts = tflite_copts(),
|
||||||
deps = ["//tensorflow/lite/micro:debug_log"],
|
deps = ["//tensorflow/lite/micro:debug_log"],
|
||||||
)
|
)
|
||||||
@ -445,7 +441,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"kernel_util.h",
|
"kernel_util.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts() + micro_copts(),
|
copts = tflite_copts() + micro_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
"//tensorflow/lite/c:common",
|
"//tensorflow/lite/c:common",
|
||||||
@ -501,7 +496,6 @@ cc_library(
|
|||||||
name = "padding",
|
name = "padding",
|
||||||
srcs = [],
|
srcs = [],
|
||||||
hdrs = ["padding.h"],
|
hdrs = ["padding.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts(),
|
copts = tflite_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
"//tensorflow/lite/c:common",
|
"//tensorflow/lite/c:common",
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
load("//tensorflow/lite/micro:build_def.bzl", "cc_library")
|
|
||||||
|
|
||||||
package(
|
package(
|
||||||
default_visibility = [
|
default_visibility = [
|
||||||
"//visibility:public",
|
"//visibility:public",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
load("//tensorflow:tensorflow.bzl", "transitive_hdrs")
|
load("//tensorflow:tensorflow.bzl", "transitive_hdrs")
|
||||||
load("//tensorflow/lite:build_def.bzl", "tflite_copts")
|
load("//tensorflow/lite:build_def.bzl", "tflite_copts")
|
||||||
load("//tensorflow/lite/micro:build_def.bzl", "cc_library", "micro_copts")
|
load("//tensorflow/lite/micro:build_def.bzl", "micro_copts")
|
||||||
load("//tensorflow/lite:special_rules.bzl", "tflite_portable_test_suite_combined")
|
load("//tensorflow/lite:special_rules.bzl", "tflite_portable_test_suite_combined")
|
||||||
|
|
||||||
package(
|
package(
|
||||||
@ -46,7 +46,6 @@ NEON_FLAGS_IF_APPLICABLE = select({
|
|||||||
cc_library(
|
cc_library(
|
||||||
name = "compatibility",
|
name = "compatibility",
|
||||||
hdrs = ["compatibility.h"],
|
hdrs = ["compatibility.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts(),
|
copts = tflite_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
"//tensorflow/lite/kernels:op_macros",
|
"//tensorflow/lite/kernels:op_macros",
|
||||||
@ -56,7 +55,6 @@ cc_library(
|
|||||||
cc_library(
|
cc_library(
|
||||||
name = "types",
|
name = "types",
|
||||||
hdrs = ["types.h"],
|
hdrs = ["types.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts(),
|
copts = tflite_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":compatibility",
|
":compatibility",
|
||||||
@ -66,7 +64,6 @@ cc_library(
|
|||||||
cc_library(
|
cc_library(
|
||||||
name = "legacy_types",
|
name = "legacy_types",
|
||||||
hdrs = ["legacy_types.h"],
|
hdrs = ["legacy_types.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts(),
|
copts = tflite_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":types",
|
":types",
|
||||||
@ -221,7 +218,6 @@ cc_library(
|
|||||||
name = "common",
|
name = "common",
|
||||||
srcs = [],
|
srcs = [],
|
||||||
hdrs = ["common.h"],
|
hdrs = ["common.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts(),
|
copts = tflite_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":cppmath",
|
":cppmath",
|
||||||
@ -375,7 +371,6 @@ cc_library(
|
|||||||
"max.h",
|
"max.h",
|
||||||
"min.h",
|
"min.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts(),
|
copts = tflite_copts(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -383,7 +378,6 @@ cc_library(
|
|||||||
name = "quantization_util",
|
name = "quantization_util",
|
||||||
srcs = ["quantization_util.cc"],
|
srcs = ["quantization_util.cc"],
|
||||||
hdrs = ["quantization_util.h"],
|
hdrs = ["quantization_util.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts() + micro_copts(),
|
copts = tflite_copts() + micro_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":compatibility",
|
":compatibility",
|
||||||
@ -411,7 +405,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"transpose_utils.h",
|
"transpose_utils.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts(),
|
copts = tflite_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":types",
|
":types",
|
||||||
@ -433,7 +426,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"strided_slice_logic.h",
|
"strided_slice_logic.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts(),
|
copts = tflite_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":compatibility",
|
":compatibility",
|
||||||
@ -500,20 +492,7 @@ cc_library(
|
|||||||
"reference/sparse_ops/fully_connected.h",
|
"reference/sparse_ops/fully_connected.h",
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts(),
|
copts = tflite_copts(),
|
||||||
select_deps = {
|
|
||||||
":haswell": tflite_deps_intel,
|
|
||||||
":ios_x86_64": tflite_deps_intel,
|
|
||||||
":k8": tflite_deps_intel,
|
|
||||||
":x86": tflite_deps_intel,
|
|
||||||
":x86_64": tflite_deps_intel,
|
|
||||||
":darwin": tflite_deps_intel,
|
|
||||||
":darwin_x86_64": tflite_deps_intel,
|
|
||||||
":freebsd": tflite_deps_intel,
|
|
||||||
":windows": tflite_deps_intel,
|
|
||||||
"//conditions:default": [],
|
|
||||||
},
|
|
||||||
deps = [
|
deps = [
|
||||||
":common",
|
":common",
|
||||||
":compatibility",
|
":compatibility",
|
||||||
@ -524,14 +503,25 @@ cc_library(
|
|||||||
":tensor",
|
":tensor",
|
||||||
":tensor_utils",
|
":tensor_utils",
|
||||||
":types",
|
":types",
|
||||||
|
"//third_party/eigen3",
|
||||||
|
"@gemmlowp//:fixedpoint",
|
||||||
|
"@ruy//ruy/profiler:instrumentation",
|
||||||
"//tensorflow/lite:string_util",
|
"//tensorflow/lite:string_util",
|
||||||
"//tensorflow/lite/c:common",
|
"//tensorflow/lite/c:common",
|
||||||
"//tensorflow/lite/kernels:op_macros",
|
"//tensorflow/lite/kernels:op_macros",
|
||||||
"//tensorflow/lite/tools/optimize/sparsity:format_converter",
|
"//tensorflow/lite/tools/optimize/sparsity:format_converter",
|
||||||
"//third_party/eigen3",
|
] + select({
|
||||||
"@gemmlowp//:fixedpoint",
|
":haswell": tflite_deps_intel,
|
||||||
"@ruy//ruy/profiler:instrumentation",
|
":ios_x86_64": tflite_deps_intel,
|
||||||
],
|
":k8": tflite_deps_intel,
|
||||||
|
":x86": tflite_deps_intel,
|
||||||
|
":x86_64": tflite_deps_intel,
|
||||||
|
":darwin": tflite_deps_intel,
|
||||||
|
":darwin_x86_64": tflite_deps_intel,
|
||||||
|
":freebsd": tflite_deps_intel,
|
||||||
|
":windows": tflite_deps_intel,
|
||||||
|
"//conditions:default": [],
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
@ -610,7 +600,6 @@ cc_library(
|
|||||||
"tensor.h",
|
"tensor.h",
|
||||||
"tensor_ctypes.h",
|
"tensor_ctypes.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts(),
|
copts = tflite_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":types",
|
":types",
|
||||||
@ -704,7 +693,6 @@ cc_library(
|
|||||||
name = "kernel_utils",
|
name = "kernel_utils",
|
||||||
srcs = ["kernel_utils.cc"],
|
srcs = ["kernel_utils.cc"],
|
||||||
hdrs = ["kernel_utils.h"],
|
hdrs = ["kernel_utils.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts() + micro_copts(),
|
copts = tflite_copts() + micro_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":tensor_utils",
|
":tensor_utils",
|
||||||
@ -742,9 +730,12 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"tensor_utils.h",
|
"tensor_utils.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts() + NEON_FLAGS_IF_APPLICABLE,
|
copts = tflite_copts() + NEON_FLAGS_IF_APPLICABLE,
|
||||||
select_deps = {
|
deps = [
|
||||||
|
":cpu_check",
|
||||||
|
"//third_party/eigen3",
|
||||||
|
"//tensorflow/lite/c:common",
|
||||||
|
] + select({
|
||||||
":aarch64": [
|
":aarch64": [
|
||||||
":neon_tensor_utils",
|
":neon_tensor_utils",
|
||||||
],
|
],
|
||||||
@ -808,12 +799,7 @@ cc_library(
|
|||||||
"//conditions:default": [
|
"//conditions:default": [
|
||||||
":portable_tensor_utils",
|
":portable_tensor_utils",
|
||||||
],
|
],
|
||||||
},
|
}),
|
||||||
deps = [
|
|
||||||
":cpu_check",
|
|
||||||
"//tensorflow/lite/c:common",
|
|
||||||
"//third_party/eigen3",
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
@ -1071,9 +1057,8 @@ cc_library(
|
|||||||
"optimized/neon_check.h",
|
"optimized/neon_check.h",
|
||||||
"optimized/sse_check.h",
|
"optimized/sse_check.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts(),
|
copts = tflite_copts(),
|
||||||
select_deps = {
|
deps = select({
|
||||||
":haswell": tflite_deps_intel,
|
":haswell": tflite_deps_intel,
|
||||||
":ios_x86_64": tflite_deps_intel,
|
":ios_x86_64": tflite_deps_intel,
|
||||||
":k8": tflite_deps_intel,
|
":k8": tflite_deps_intel,
|
||||||
@ -1084,7 +1069,7 @@ cc_library(
|
|||||||
":freebsd": tflite_deps_intel,
|
":freebsd": tflite_deps_intel,
|
||||||
":windows": tflite_deps_intel,
|
":windows": tflite_deps_intel,
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
},
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_test(
|
cc_test(
|
||||||
|
@ -4,7 +4,6 @@ load(
|
|||||||
)
|
)
|
||||||
load(
|
load(
|
||||||
"//tensorflow/lite/micro:build_def.bzl",
|
"//tensorflow/lite/micro:build_def.bzl",
|
||||||
"cc_library",
|
|
||||||
"micro_copts",
|
"micro_copts",
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -23,7 +22,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"compatibility.h",
|
"compatibility.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -41,7 +39,6 @@ cc_library(
|
|||||||
"micro_optional_debug_tools.h",
|
"micro_optional_debug_tools.h",
|
||||||
"simple_memory_allocator.h",
|
"simple_memory_allocator.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":memory_helpers",
|
":memory_helpers",
|
||||||
@ -81,7 +78,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"test_helpers.h",
|
"test_helpers.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":micro_utils",
|
":micro_utils",
|
||||||
@ -106,7 +102,6 @@ cc_library(
|
|||||||
"micro_mutable_op_resolver.h",
|
"micro_mutable_op_resolver.h",
|
||||||
"micro_op_resolver.h",
|
"micro_op_resolver.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":micro_compatibility",
|
":micro_compatibility",
|
||||||
@ -127,7 +122,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"debug_log.h",
|
"debug_log.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -139,7 +133,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"micro_error_reporter.h",
|
"micro_error_reporter.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":debug_log",
|
":debug_log",
|
||||||
@ -157,7 +150,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"micro_string.h",
|
"micro_string.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
deps = ["//tensorflow/lite/c:common"],
|
deps = ["//tensorflow/lite/c:common"],
|
||||||
)
|
)
|
||||||
@ -170,7 +162,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"micro_time.h",
|
"micro_time.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
deps = ["//tensorflow/lite/c:common"],
|
deps = ["//tensorflow/lite/c:common"],
|
||||||
)
|
)
|
||||||
@ -183,7 +174,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"micro_profiler.h",
|
"micro_profiler.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":micro_compatibility",
|
":micro_compatibility",
|
||||||
@ -201,7 +191,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"micro_utils.h",
|
"micro_utils.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
"//tensorflow/lite/c:common",
|
"//tensorflow/lite/c:common",
|
||||||
@ -220,7 +209,6 @@ cc_library(
|
|||||||
"recording_micro_interpreter.h",
|
"recording_micro_interpreter.h",
|
||||||
"recording_simple_memory_allocator.h",
|
"recording_simple_memory_allocator.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":micro_compatibility",
|
":micro_compatibility",
|
||||||
|
@ -1,25 +1,2 @@
|
|||||||
load(
|
|
||||||
"@rules_cc//cc:defs.bzl",
|
|
||||||
_cc_library = "cc_library",
|
|
||||||
)
|
|
||||||
load(
|
|
||||||
"@flatbuffers//:build_defs.bzl",
|
|
||||||
_flatbuffer_cc_library = "flatbuffer_cc_library",
|
|
||||||
)
|
|
||||||
|
|
||||||
def micro_copts():
|
def micro_copts():
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def cc_library(**kwargs):
|
|
||||||
kwargs.pop("build_for_embedded", False)
|
|
||||||
if "select_deps" in kwargs.keys():
|
|
||||||
select_deps = kwargs.pop("select_deps", {})
|
|
||||||
if "deps" in kwargs.keys():
|
|
||||||
kwargs["deps"] += select(select_deps)
|
|
||||||
else:
|
|
||||||
kwargs["deps"] = select(select_deps)
|
|
||||||
_cc_library(**kwargs)
|
|
||||||
|
|
||||||
def flatbuffer_cc_library(**kwargs):
|
|
||||||
kwargs.pop("build_for_embedded", False)
|
|
||||||
_flatbuffer_cc_library(**kwargs)
|
|
||||||
|
@ -7,7 +7,6 @@ load(
|
|||||||
)
|
)
|
||||||
load(
|
load(
|
||||||
"//tensorflow/lite/micro:build_def.bzl",
|
"//tensorflow/lite/micro:build_def.bzl",
|
||||||
"cc_library",
|
|
||||||
"micro_copts",
|
"micro_copts",
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -23,7 +22,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"model.h",
|
"model.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ load(
|
|||||||
)
|
)
|
||||||
load(
|
load(
|
||||||
"//tensorflow/lite/micro:build_def.bzl",
|
"//tensorflow/lite/micro:build_def.bzl",
|
||||||
"cc_library",
|
|
||||||
"micro_copts",
|
"micro_copts",
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -93,8 +92,6 @@ cc_library(
|
|||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
hdrs = ["micro_ops.h"],
|
hdrs = ["micro_ops.h"],
|
||||||
# TODO(b/153609488): enable embedded build once we can properly support it.
|
|
||||||
#build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
visibility = [
|
visibility = [
|
||||||
# Needed for micro:op_resolvers but visibility can not be finer-grained
|
# Needed for micro:op_resolvers but visibility can not be finer-grained
|
||||||
@ -460,7 +457,6 @@ tflite_micro_cc_test(
|
|||||||
cc_library(
|
cc_library(
|
||||||
name = "activation_utils",
|
name = "activation_utils",
|
||||||
hdrs = ["activation_utils.h"],
|
hdrs = ["activation_utils.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
deps = [
|
deps = [
|
||||||
"//tensorflow/lite/c:common",
|
"//tensorflow/lite/c:common",
|
||||||
"//tensorflow/lite/kernels/internal:cppmath",
|
"//tensorflow/lite/kernels/internal:cppmath",
|
||||||
@ -503,7 +499,6 @@ cc_library(
|
|||||||
"kernel_runner.cc",
|
"kernel_runner.cc",
|
||||||
],
|
],
|
||||||
hdrs = ["kernel_runner.h"],
|
hdrs = ["kernel_runner.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
deps = [
|
deps = [
|
||||||
"//tensorflow/lite/c:common",
|
"//tensorflow/lite/c:common",
|
||||||
"//tensorflow/lite/kernels/internal:compatibility",
|
"//tensorflow/lite/kernels/internal:compatibility",
|
||||||
@ -517,7 +512,6 @@ cc_library(
|
|||||||
"kernel_util.cc",
|
"kernel_util.cc",
|
||||||
],
|
],
|
||||||
hdrs = ["kernel_util.h"],
|
hdrs = ["kernel_util.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
deps = [
|
deps = [
|
||||||
"//tensorflow/lite/c:common",
|
"//tensorflow/lite/c:common",
|
||||||
"//tensorflow/lite/kernels/internal:types",
|
"//tensorflow/lite/kernels/internal:types",
|
||||||
@ -527,7 +521,6 @@ cc_library(
|
|||||||
cc_library(
|
cc_library(
|
||||||
name = "micro_utils",
|
name = "micro_utils",
|
||||||
hdrs = ["micro_utils.h"],
|
hdrs = ["micro_utils.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
tflite_micro_cc_test(
|
tflite_micro_cc_test(
|
||||||
|
@ -4,7 +4,6 @@ load(
|
|||||||
)
|
)
|
||||||
load(
|
load(
|
||||||
"//tensorflow/lite/micro:build_def.bzl",
|
"//tensorflow/lite/micro:build_def.bzl",
|
||||||
"cc_library",
|
|
||||||
"micro_copts",
|
"micro_copts",
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -18,7 +17,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"memory_planner.h",
|
"memory_planner.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
"//tensorflow/lite/c:common",
|
"//tensorflow/lite/c:common",
|
||||||
@ -50,7 +48,6 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"greedy_memory_planner.h",
|
"greedy_memory_planner.h",
|
||||||
],
|
],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = micro_copts(),
|
copts = micro_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
":memory_planner",
|
":memory_planner",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
load("//tensorflow:tensorflow.bzl", "py_test")
|
load("//tensorflow:tensorflow.bzl", "py_test")
|
||||||
load("//tensorflow/lite:special_rules.bzl", "tflite_portable_test_suite")
|
load("//tensorflow/lite:special_rules.bzl", "tflite_portable_test_suite")
|
||||||
load("//tensorflow/lite/micro:build_def.bzl", "flatbuffer_cc_library")
|
load("@flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
|
||||||
|
|
||||||
package(
|
package(
|
||||||
default_visibility = [
|
default_visibility = [
|
||||||
@ -64,7 +64,6 @@ exports_files([
|
|||||||
flatbuffer_cc_library(
|
flatbuffer_cc_library(
|
||||||
name = "schema_fbs",
|
name = "schema_fbs",
|
||||||
srcs = ["schema.fbs"],
|
srcs = ["schema.fbs"],
|
||||||
build_for_embedded = True,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Generic schema for flatbuffer converter (but with mutable makes bigger).
|
# Generic schema for flatbuffer converter (but with mutable makes bigger).
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
load("//tensorflow/lite:build_def.bzl", "tflite_copts")
|
load("//tensorflow/lite:build_def.bzl", "tflite_copts")
|
||||||
load("//tensorflow/lite/micro:build_def.bzl", "cc_library")
|
|
||||||
|
|
||||||
package(
|
package(
|
||||||
default_visibility = [
|
default_visibility = [
|
||||||
@ -12,7 +11,6 @@ cc_library(
|
|||||||
name = "format_converter",
|
name = "format_converter",
|
||||||
srcs = ["format_converter.cc"],
|
srcs = ["format_converter.cc"],
|
||||||
hdrs = ["format_converter.h"],
|
hdrs = ["format_converter.h"],
|
||||||
build_for_embedded = True,
|
|
||||||
copts = tflite_copts(),
|
copts = tflite_copts(),
|
||||||
deps = [
|
deps = [
|
||||||
"//tensorflow/lite/c:common",
|
"//tensorflow/lite/c:common",
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
load("//tensorflow:tensorflow.bzl", "pybind_extension")
|
load("//tensorflow:tensorflow.bzl", "pybind_extension")
|
||||||
load("//tensorflow:tensorflow.bzl", "if_not_windows")
|
load("//tensorflow:tensorflow.bzl", "if_not_windows")
|
||||||
load("//tensorflow/lite:build_def.bzl", "tflite_copts")
|
load("//tensorflow/lite:build_def.bzl", "tflite_copts")
|
||||||
load("//tensorflow/lite/micro:build_def.bzl", "cc_library")
|
|
||||||
load("//tensorflow/lite:special_rules.bzl", "tflite_portable_test_suite")
|
load("//tensorflow/lite:special_rules.bzl", "tflite_portable_test_suite")
|
||||||
|
|
||||||
package(
|
package(
|
||||||
|
Loading…
Reference in New Issue
Block a user