Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 718457933
  • Loading branch information
tensorflower-gardener committed Jan 22, 2025
1 parent 2a0df43 commit 927a968
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
15 changes: 9 additions & 6 deletions tensorflow/lite/delegates/flex/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
load(
"//tensorflow:tensorflow.bzl",
"if_android",
"if_mobile",
"if_not_mobile",
"tf_cc_test",
Expand Down Expand Up @@ -39,7 +40,7 @@ cc_library(
hdrs = ["buffer_map.h"],
compatible_with = get_compatible_with_portable(),
copts = tf_opts_nortti_if_lite_protos(),
features = tf_features_nolayering_check_if_ios(),
features = tf_features_nolayering_check_if_ios() + if_android(["-layering_check"]),
deps = [
":buffer_map_util",
":util",
Expand All @@ -60,7 +61,7 @@ cc_library(
hdrs = ["buffer_map_util.h"],
compatible_with = get_compatible_with_portable(),
copts = tf_opts_nortti_if_lite_protos(),
features = tf_features_nolayering_check_if_ios(),
features = tf_features_nolayering_check_if_ios() + if_android(["-layering_check"]),
deps = [
":util",
"//tensorflow/lite:string_util",
Expand Down Expand Up @@ -158,7 +159,7 @@ cc_library(
],
compatible_with = get_compatible_with_portable(),
copts = tflite_copts() + tf_opts_nortti_if_mobile(),
features = tf_features_nolayering_check_if_ios(),
features = tf_features_nolayering_check_if_ios() + if_android(["-layering_check"]),
visibility = ["//visibility:public"],
deps = [
":buffer_map",
Expand Down Expand Up @@ -211,7 +212,7 @@ cc_library(
hdrs = ["delegate_data.h"],
compatible_with = get_compatible_with_portable(),
copts = tf_opts_nortti_if_mobile(),
features = tf_features_nolayering_check_if_ios(),
features = tf_features_nolayering_check_if_ios() + if_android(["-layering_check"]),
visibility = ["//visibility:public"],
deps = [
":buffer_map",
Expand Down Expand Up @@ -264,6 +265,8 @@ cc_library(
compatible_with = get_compatible_with_portable(),
features = tf_features_nolayering_check_if_ios(),
deps = [
"//tensorflow/core/platform:mutex",
"//tensorflow/core/platform:thread_annotations",
"//tensorflow/lite:cc_api_experimental",
"//tensorflow/lite/core/c:common",
] + if_mobile([
Expand Down Expand Up @@ -315,7 +318,7 @@ cc_library(
srcs = ["util.cc"],
hdrs = ["util.h"],
compatible_with = get_compatible_with_portable(),
features = tf_features_nolayering_check_if_ios(),
features = tf_features_nolayering_check_if_ios() + if_android(["-layering_check"]),
#TODO(b/206038955): Consider restrict the visibility to '//third_party/fcp/client:__subpackages__'.
visibility = ["//visibility:public"],
deps = [
Expand Down Expand Up @@ -399,7 +402,7 @@ cc_library(
srcs = ["tflite_subgraph_execute.cc"],
compatible_with = get_compatible_with_portable(),
copts = tf_opts_nortti_if_mobile(),
features = tf_features_nolayering_check_if_ios(),
features = tf_features_nolayering_check_if_ios() + if_android(["-layering_check"]),
deps = [
":buffer_map_util",
":subgraph_resource",
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/lite/delegates/flex/build_def.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def tflite_flex_cc_library(
full = [],
lite = ["TENSORFLOW_LITE_PROTOS"],
) + tf_defines_nortti_if_lite_protos(),
features = tf_features_nomodules_if_mobile() + tf_features_nolayering_check_if_ios(),
features = tf_features_nomodules_if_mobile() + tf_features_nolayering_check_if_ios() + if_android(["-layering_check"]),
linkopts = if_android(["-lz"]) + if_ios(["-lz"]),
includes = [
CUSTOM_KERNEL_HEADER.include_path,
Expand Down Expand Up @@ -168,7 +168,7 @@ def tflite_flex_cc_library(
hdrs = [
clean_dep("//tensorflow/lite/delegates/flex:delegate.h"),
],
features = tf_features_nolayering_check_if_ios(),
features = tf_features_nolayering_check_if_ios() + if_android(["-layering_check"]),
compatible_with = compatible_with,
visibility = visibility,
deps = [
Expand Down
4 changes: 3 additions & 1 deletion tensorflow/lite/kernels/shim/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This package is a shim layer over TF and TFLite op kernels.

load("//tensorflow:tensorflow.bzl", "if_mobile", "if_not_mobile", "tf_cc_test", "tf_copts")
load("//tensorflow:tensorflow.bzl", "if_android", "if_mobile", "if_not_mobile", "tf_cc_test", "tf_copts")
load("//tensorflow:tensorflow.default.bzl", "get_compatible_with_portable")

package(
Expand Down Expand Up @@ -74,6 +74,7 @@ cc_library(
srcs = ["tf_tensor_view.cc"],
hdrs = ["tf_tensor_view.h"],
copts = tf_copts(),
features = if_android(["-layering_check"]),
deps = [
":tensor_view",
"@com_google_absl//absl/status",
Expand Down Expand Up @@ -153,6 +154,7 @@ cc_library(
srcs = ["tf_op_shim.cc"],
hdrs = ["tf_op_shim.h"],
copts = tf_copts(),
features = if_android(["-layering_check"]),
visibility = ["//visibility:public"],
deps = [
":op_kernel",
Expand Down

0 comments on commit 927a968

Please sign in to comment.