From ea7c98c040b11e85160d50c18714c0878fc4b0cc Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Wed, 24 Jun 2020 11:52:39 -0700 Subject: [PATCH] Tighten some core dependencies, so that code that is only interested in (de)serializing Tensors doesn't require all of XLA and all TF kernels. PiperOrigin-RevId: 318109428 Change-Id: Ibc6129213267432e1c9425a93106fe7188ba452a --- tensorflow/c/BUILD | 1 + tensorflow/c/eager/BUILD | 1 - tensorflow/c/eager/abstract_function.h | 1 - tensorflow/python/BUILD | 11 ++++++----- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tensorflow/c/BUILD b/tensorflow/c/BUILD index 12021a294e8..92cda95e8e4 100644 --- a/tensorflow/c/BUILD +++ b/tensorflow/c/BUILD @@ -173,6 +173,7 @@ tf_cuda_library( copts = tf_copts(), visibility = [ "//tensorflow/c:__subpackages__", + "//tensorflow/python:__subpackages__", "//third_party/llvm/llvm-project:__subpackages__", ], deps = [ diff --git a/tensorflow/c/eager/BUILD b/tensorflow/c/eager/BUILD index 5f7ab4a1f59..da7ddc3ec06 100644 --- a/tensorflow/c/eager/BUILD +++ b/tensorflow/c/eager/BUILD @@ -244,7 +244,6 @@ cc_library( "//tensorflow:internal", ], deps = [ - "//tensorflow/c:c_api", "//tensorflow/core:protos_all_cc", "//tensorflow/core/platform:status", ], diff --git a/tensorflow/c/eager/abstract_function.h b/tensorflow/c/eager/abstract_function.h index e322b31f2b4..303dd435c05 100644 --- a/tensorflow/c/eager/abstract_function.h +++ b/tensorflow/c/eager/abstract_function.h @@ -15,7 +15,6 @@ limitations under the License. #ifndef TENSORFLOW_C_EAGER_ABSTRACT_FUNCTION_H_ #define TENSORFLOW_C_EAGER_ABSTRACT_FUNCTION_H_ -#include "tensorflow/c/c_api.h" #include "tensorflow/core/framework/function.pb.h" #include "tensorflow/core/platform/status.h" diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD index 5f9e2dfb1ff..d42d218734e 100644 --- a/tensorflow/python/BUILD +++ b/tensorflow/python/BUILD @@ -558,7 +558,7 @@ cc_library( deps = [ ":bfloat16_lib", ":numpy_lib", - "//tensorflow/c:c_api", + "//tensorflow/c:c_api_no_xla", "//tensorflow/core:lib", "//tensorflow/core:protos_all_cc", ], @@ -997,11 +997,13 @@ tf_python_pybind_extension( cc_library( name = "safe_ptr", - srcs = ["lib/core/safe_ptr.cc"], + srcs = [ + "lib/core/safe_ptr.cc", + "//tensorflow/c/eager:headers", + ], hdrs = ["lib/core/safe_ptr.h"], deps = [ - "//tensorflow/c:c_api", - "//tensorflow/c/eager:c_api", + "//tensorflow/c:c_api_no_xla", "//third_party/python_runtime:headers", ], ) @@ -1046,7 +1048,6 @@ cc_library( ":ndarray_tensor_bridge", ":numpy_lib", ":safe_ptr", - "//tensorflow/c:c_api", "//tensorflow/c:c_api_internal", "//tensorflow/c:tf_status_helper", "//tensorflow/c:tf_tensor_internal",