Skip to content

Commit dcdbc86

Browse files
committed
Prune remote eager Android stubs
1 parent 63eca8b commit dcdbc86

1 file changed

Lines changed: 90 additions & 0 deletions

File tree

scripts/patch_tfjava.py

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,95 @@ def patch_workspace(path: Path) -> None:
717717
"""
718718

719719

720+
DISTRIBUTED_EAGER_ANDROID_PATCH = """--- a/tensorflow/core/distributed_runtime/eager/BUILD
721+
+++ b/tensorflow/core/distributed_runtime/eager/BUILD
722+
@@ -23,9 +23,12 @@ cc_library(
723+
724+
cc_library(
725+
name = "cluster_function_library_runtime",
726+
- srcs = [
727+
- "cluster_function_library_runtime.cc",
728+
- ],
729+
+ srcs = select({
730+
+ "//tensorflow:android": [],
731+
+ "//conditions:default": [
732+
+ "cluster_function_library_runtime.cc",
733+
+ ],
734+
+ }),
735+
hdrs = [
736+
"cluster_function_library_runtime.h",
737+
],
738+
@@ -71,7 +74,10 @@ cc_library(
739+
740+
cc_library(
741+
name = "remote_execute_node",
742+
- srcs = ["remote_execute_node.cc"],
743+
+ srcs = select({
744+
+ "//tensorflow:android": [],
745+
+ "//conditions:default": ["remote_execute_node.cc"],
746+
+ }),
747+
hdrs = ["remote_execute_node.h"],
748+
deps = [
749+
":eager_client",
750+
@@ -90,7 +96,10 @@ cc_library(
751+
752+
cc_library(
753+
name = "eager_service_impl",
754+
- srcs = ["eager_service_impl.cc"],
755+
+ srcs = select({
756+
+ "//tensorflow:android": [],
757+
+ "//conditions:default": ["eager_service_impl.cc"],
758+
+ }),
759+
hdrs = [
760+
"eager_service_impl.h",
761+
],
762+
@@ -154,9 +163,12 @@ tf_cc_test(
763+
764+
cc_library(
765+
name = "remote_mgr",
766+
- srcs = [
767+
- "remote_mgr.cc",
768+
- ],
769+
+ srcs = select({
770+
+ "//tensorflow:android": [],
771+
+ "//conditions:default": [
772+
+ "remote_mgr.cc",
773+
+ ],
774+
+ }),
775+
hdrs = [
776+
"remote_mgr.h",
777+
],
778+
@@ -185,7 +197,10 @@ tf_cc_test(
779+
780+
cc_library(
781+
name = "remote_tensor_handle_data",
782+
- srcs = ["remote_tensor_handle_data.cc"],
783+
+ srcs = select({
784+
+ "//tensorflow:android": [],
785+
+ "//conditions:default": ["remote_tensor_handle_data.cc"],
786+
+ }),
787+
hdrs = ["remote_tensor_handle_data.h"],
788+
deps = [
789+
":destroy_tensor_handle_node",
790+
@@ -199,9 +214,12 @@ cc_library(
791+
792+
cc_library(
793+
name = "remote_copy_node",
794+
- srcs = [
795+
- "remote_copy_node.cc",
796+
- ],
797+
+ srcs = select({
798+
+ "//tensorflow:android": [],
799+
+ "//conditions:default": [
800+
+ "remote_copy_node.cc",
801+
+ ],
802+
+ }),
803+
hdrs = [
804+
"remote_copy_node.h",
805+
],
806+
"""
807+
808+
720809
SAVED_MODEL_ANDROID_LOADER_PATCH = """--- a/tensorflow/cc/saved_model/BUILD
721810
+++ b/tensorflow/cc/saved_model/BUILD
722811
@@ -92,7 +92,7 @@
@@ -781,6 +870,7 @@ def write_tensorflow_android_absl_patch(path: Path) -> None:
781870
text += TF_C_BUILD_ANDROID_FULL_DEPS_PATCH
782871
text += TF_C_API_EXPERIMENTAL_BUILD_PATCH
783872
text += TF_C_API_EXPERIMENTAL_CC_PATCH
873+
text += DISTRIBUTED_EAGER_ANDROID_PATCH
784874
text += SAVED_MODEL_ANDROID_LOADER_PATCH
785875
text += TENSORFLOW_FRAMEWORK_ANDROID_PATCH
786876
if not text.endswith("\n"):

0 commit comments

Comments
 (0)