aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/BUILD
diff options
context:
space:
mode:
authorGravatar Gunhan Gulsoy <gunan@google.com>2018-09-25 17:25:56 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-25 17:29:49 -0700
commitf97610daf89572e52912ddc5bf87576cc9e82f66 (patch)
tree87a2478419f85b19bf84c096c2aaf6e192f59d0d /tensorflow/core/BUILD
parent05d103bf25110157c34b9ea6420061a23aa6d4ec (diff)
Fix dynamic kernels dependencies for python build and test rules.
Bazel does not allow python rules to directly depend on c++ rules. So I have to separately manage static dependencies, unfortunately avoiding "kernels" option for now. PiperOrigin-RevId: 214532631
Diffstat (limited to 'tensorflow/core/BUILD')
-rw-r--r--tensorflow/core/BUILD14
1 files changed, 12 insertions, 2 deletions
diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD
index 59b7dd04e9..bc0bfb793c 100644
--- a/tensorflow/core/BUILD
+++ b/tensorflow/core/BUILD
@@ -144,6 +144,7 @@ load(
)
load(
"//tensorflow/core:platform/default/build_config_root.bzl",
+ "if_dynamic_kernels",
"if_static",
"tf_cuda_tests_tags",
)
@@ -1292,8 +1293,8 @@ cc_library(
# This includes implementations of all kernels built into TensorFlow.
cc_library(
- name = "all_kernels",
- visibility = ["//visibility:public"],
+ name = "all_kernels_statically_linked",
+ visibility = ["//visibility:private"],
deps = [
"//tensorflow/core/kernels:array",
"//tensorflow/core/kernels:audio",
@@ -1372,6 +1373,15 @@ cc_library(
]),
)
+cc_library(
+ name = "all_kernels",
+ visibility = ["//visibility:public"],
+ deps = if_dynamic_kernels(
+ [],
+ otherwise = [":all_kernels_statically_linked"],
+ ),
+)
+
tf_cuda_library(
name = "tensorflow_opensource",
copts = tf_copts(),