Skip to content

Commit

Permalink
Depend on protobuf's header only library when building custom ops
Browse files Browse the repository at this point in the history
Change: 149501122
  • Loading branch information
Manjunath Kudlur authored and tensorflower-gardener committed Mar 8, 2017
1 parent 6f00d6a commit e83a041
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 42 deletions.
28 changes: 0 additions & 28 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,28 +0,0 @@
# Description:
# TensorFlow is an open source software library for numerical computation using
# data flow graphs.

package(
default_visibility = [
"//tensorflow:internal",
"//tensorflow_models:__subpackages__",
],
)

licenses(["notice"]) # Apache 2.0

exports_files(["LICENSE"])

load(
"//tensorflow:tensorflow.bzl",
"cc_header_only_library",
)

cc_header_only_library(
name = "protobuf_headers",
includes = ["external/protobuf/src"],
visibility = ["//visibility:public"],
deps = [
"@protobuf//:protobuf",
],
)
8 changes: 4 additions & 4 deletions tensorflow/contrib/factorization/kernels/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ cc_library(
":clustering_ops",
":masked_matmul_ops",
":wals_solver_ops",
"//:protobuf_headers",
"@protobuf//:protobuf_headers",
],
)

cc_library(
name = "wals_solver_ops",
srcs = ["wals_solver_ops.cc"],
deps = [
"//:protobuf_headers",
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
"@protobuf//:protobuf_headers",
],
alwayslink = 1,
)
Expand All @@ -33,9 +33,9 @@ cc_library(
name = "clustering_ops",
srcs = ["clustering_ops.cc"],
deps = [
"//:protobuf_headers",
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
"@protobuf//:protobuf_headers",
],
alwayslink = 1,
)
Expand All @@ -44,9 +44,9 @@ cc_library(
name = "masked_matmul_ops",
srcs = ["masked_matmul_ops.cc"],
deps = [
"//:protobuf_headers",
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
"@protobuf//:protobuf_headers",
],
alwayslink = 1,
)
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/contrib/ffmpeg/default/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ cc_library(
"//tensorflow/contrib/ffmpeg:ffmpeg_lib.h",
],
deps = [
"//:protobuf_headers",
"//tensorflow/core:framework_headers_lib",
"@protobuf//:protobuf_headers",
],
)

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/contrib/input_pipeline/kernels/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ cc_library(
name = "input_pipeline_kernels",
srcs = ["input_pipeline_kernels.cc"],
deps = [
"//:protobuf_headers",
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
"@protobuf//:protobuf_headers",
],
alwayslink = 1,
)
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/contrib/layers/kernels/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ cc_library(
name = "bucketization_kernel",
srcs = ["bucketization_kernel.cc"],
deps = [
"//:protobuf_headers",
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
"@protobuf//:protobuf_headers",
],
alwayslink = 1,
)
Expand All @@ -22,10 +22,10 @@ cc_library(
name = "sparse_feature_cross_kernel",
srcs = ["sparse_feature_cross_kernel.cc"],
deps = [
"//:protobuf_headers",
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
"@farmhash_archive//:farmhash",
"@protobuf//:protobuf_headers",
],
alwayslink = 1,
)
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/contrib/tensor_forest/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ cc_library(
srcs = [":custom_op_sources"],
hdrs = [":custom_op_headers"],
deps = [
"//:protobuf_headers",
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
"@protobuf//:protobuf_headers",
],
alwayslink = 1,
)
Expand Down Expand Up @@ -191,9 +191,9 @@ cc_library(
"kernels/tree_utils.h",
],
deps = [
"//:protobuf_headers",
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
"@protobuf//:protobuf_headers",
],
)

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/contrib/tensor_forest/hybrid/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ cc_library(
"core/ops/utils.h",
],
deps = [
"//:protobuf_headers",
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
"@protobuf//:protobuf_headers",
],
)

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ cc_binary(
}),
linkshared = 1,
deps = [
"//:protobuf_headers",
"//tensorflow/core:framework_headers_lib",
"@protobuf//:protobuf_headers",
],
)

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/tensorflow.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ def cc_header_only_library(name, deps=[], **kwargs):

def tf_custom_op_library_additional_deps():
return [
"//:protobuf_headers",
"@protobuf//:protobuf_headers",
"//third_party/eigen3",
"//tensorflow/core:framework_headers_lib",
]
Expand Down
1 change: 0 additions & 1 deletion tensorflow/tools/pip_package/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ py_binary(
filegroup(
name = "licenses",
data = [
"//:LICENSE",
"//third_party/eigen3:LICENSE",
"//third_party/hadoop:LICENSE.txt",
"@boringssl//:LICENSE",
Expand Down

0 comments on commit e83a041

Please sign in to comment.