diff options
author | Benjamin Kramer <kramerb@google.com> | 2018-08-06 08:06:09 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-06 08:08:51 -0700 |
commit | 7304afd4f2b782da407166797ee1364cbcfdb8b4 (patch) | |
tree | cf4fa0ee17fd2400a065feb698282df40152aa8d | |
parent | 2b8df9f4064d5cf21786ebc9da4d800233d1afa6 (diff) |
[TF:XLA] Ensure that deadness_analysis.cc is only linked once
Escaping the transitive dependency on :compilation_passes is impossible:
//tensorflow/compiler/jit:deadness_analysis_test
-> //tensorflow/compiler/jit/kernels:xla_launch_op
-> //tensorflow/compiler/jit:xla_device
-> //tensorflow/compiler/jit:jit_compilation_passes
-> //tensorflow/compiler/jit:compilation_passes
Linking both :compilation_passes and :deadness_analysis_internal into one test
leads to ODR conflicts. Asan complains about them. Just remove the internal
target and add the internal header to the test.
PiperOrigin-RevId: 207546071
-rw-r--r-- | tensorflow/compiler/jit/BUILD | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/tensorflow/compiler/jit/BUILD b/tensorflow/compiler/jit/BUILD index 377cd11f44..d3238c6a5e 100644 --- a/tensorflow/compiler/jit/BUILD +++ b/tensorflow/compiler/jit/BUILD @@ -302,22 +302,6 @@ tf_cc_test( ) cc_library( - name = "deadness_analysis_internal", - testonly = True, - srcs = [ - "deadness_analysis.cc", - ], - hdrs = [ - "deadness_analysis.h", - "deadness_analysis_internal.h", - ], - deps = [ - "//tensorflow/core:graph", - "//tensorflow/core:lib", - ], -) - -cc_library( name = "compilation_passes", srcs = [ "build_xla_launch_ops_pass.cc", @@ -398,11 +382,12 @@ tf_cc_test( name = "deadness_analysis_test", size = "small", srcs = [ + "deadness_analysis_internal.h", "deadness_analysis_test.cc", ], deps = [ ":common", - ":deadness_analysis_internal", + ":compilation_passes", "//tensorflow/cc:cc_ops", "//tensorflow/cc:cc_ops_internal", "//tensorflow/cc:function_ops", @@ -414,6 +399,7 @@ tf_cc_test( "//tensorflow/core:core_cpu", "//tensorflow/core:framework", "//tensorflow/core:framework_internal", + "//tensorflow/core:graph", "//tensorflow/core:lib", "//tensorflow/core:test", "//tensorflow/core:test_main", |