diff options
author | 2016-04-08 07:54:29 -0800 | |
---|---|---|
committer | 2016-04-08 09:02:49 -0700 | |
commit | 75d7b02b01d35285a15cd5c3ff8cf4be66abdb78 (patch) | |
tree | 36232be484deb8de588a86c48bc40ca60016dbef | |
parent | 91969ae68e30eef368698094a7f574a3bcfdf315 (diff) |
Add BUILD files to opensource tree.
Opensource all_opensource_files.
Fix dependencies of custom op build rule.
Change: 119376509
-rw-r--r-- | tensorflow/BUILD | 62 | ||||
-rw-r--r-- | tensorflow/contrib/ffmpeg/OWNERS | 3 | ||||
-rw-r--r-- | tensorflow/contrib/lookup/OWNERS | 3 | ||||
-rw-r--r-- | tensorflow/core/ops/OWNERS | 1 | ||||
-rw-r--r-- | tensorflow/core/platform/default/build_config/BUILD | 12 | ||||
-rw-r--r-- | tensorflow/g3doc/how_tos/adding_an_op/BUILD | 156 | ||||
-rw-r--r-- | tensorflow/tensorboard/.gitignore | 1 | ||||
-rw-r--r-- | tensorflow/tensorboard/app/BUILD | 19 | ||||
-rw-r--r-- | tensorflow/tensorboard/components/BUILD | 18 | ||||
-rw-r--r-- | tensorflow/tensorboard/lib/BUILD | 22 | ||||
-rw-r--r-- | tensorflow/tensorboard/lib/js/BUILD | 12 | ||||
-rw-r--r-- | tensorflow/tensorflow.bzl | 11 | ||||
-rw-r--r-- | tensorflow/tools/docker/notebooks/BUILD | 17 | ||||
-rw-r--r-- | tensorflow/user_ops/BUILD | 1 |
14 files changed, 324 insertions, 14 deletions
diff --git a/tensorflow/BUILD b/tensorflow/BUILD index d3e222eecb..2978ee342c 100644 --- a/tensorflow/BUILD +++ b/tensorflow/BUILD @@ -11,8 +11,6 @@ exports_files([ "ACKNOWLEDGMENTS", ]) -# open source marker; do not remove - # Config setting for determining if we are building for Android. config_setting( name = "android", @@ -52,6 +50,66 @@ filegroup( visibility = ["//tensorflow:__subpackages__"], ) +filegroup( + name = "all_opensource_files", + data = [ + ":all_files", + "//tensorflow/cc:all_files", + "//tensorflow/contrib:all_files", + "//tensorflow/contrib/ctc:all_files", + "//tensorflow/contrib/distributions:all_files", + "//tensorflow/contrib/framework:all_files", + "//tensorflow/contrib/layers:all_files", + "//tensorflow/contrib/linear_optimizer:all_files", + "//tensorflow/contrib/linear_optimizer/kernels:all_files", + "//tensorflow/contrib/lookup:all_files", + "//tensorflow/contrib/losses:all_files", + "//tensorflow/contrib/metrics:all_files", + "//tensorflow/contrib/skflow:all_files", + "//tensorflow/contrib/tensor_forest:all_files", + "//tensorflow/contrib/testing:all_files", + "//tensorflow/contrib/util:all_files", + "//tensorflow/core:all_files", + "//tensorflow/core/distributed_runtime:all_files", + "//tensorflow/core/distributed_runtime/rpc:all_files", + "//tensorflow/core/kernels:all_files", + "//tensorflow/core/ops/compat:all_files", + "//tensorflow/core/platform/default/build_config:all_files", + "//tensorflow/core/util/ctc:all_files", + "//tensorflow/examples/android:all_files", + "//tensorflow/examples/how_tos/reading_data:all_files", + "//tensorflow/examples/image_retraining:all_files", + "//tensorflow/examples/label_image:all_files", + "//tensorflow/examples/tutorials/mnist:all_files", + "//tensorflow/examples/tutorials/word2vec:all_files", + "//tensorflow/g3doc/how_tos/adding_an_op:all_files", + "//tensorflow/g3doc/tutorials:all_files", + "//tensorflow/models/embedding:all_files", + "//tensorflow/models/image/alexnet:all_files", + "//tensorflow/models/image/cifar10:all_files", + "//tensorflow/models/image/imagenet:all_files", + "//tensorflow/models/image/mnist:all_files", + "//tensorflow/models/rnn:all_files", + "//tensorflow/models/rnn/ptb:all_files", + "//tensorflow/models/rnn/translate:all_files", + "//tensorflow/python:all_files", + "//tensorflow/python/tools:all_files", + "//tensorflow/tensorboard:all_files", + "//tensorflow/tensorboard/app:all_files", + "//tensorflow/tensorboard/backend:all_files", + "//tensorflow/tensorboard/components:all_files", + "//tensorflow/tensorboard/lib:all_files", + "//tensorflow/tensorboard/lib/python:all_files", + "//tensorflow/tensorboard/scripts:all_files", + "//tensorflow/tools/docker:all_files", + "//tensorflow/tools/docker/notebooks:all_files", + "//tensorflow/tools/docs:all_files", + "//tensorflow/tools/test:all_files", + "//tensorflow/user_ops:all_files", + ], + visibility = [":__subpackages__"], +) + # ------------------------------------------- # New rules should be added above this target. # ------------------------------------------- diff --git a/tensorflow/contrib/ffmpeg/OWNERS b/tensorflow/contrib/ffmpeg/OWNERS deleted file mode 100644 index ca39693488..0000000000 --- a/tensorflow/contrib/ffmpeg/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -adarob -deck -fredbertsch diff --git a/tensorflow/contrib/lookup/OWNERS b/tensorflow/contrib/lookup/OWNERS deleted file mode 100644 index d11247df34..0000000000 --- a/tensorflow/contrib/lookup/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -yleon -ptucker -mdb-group:ami
\ No newline at end of file diff --git a/tensorflow/core/ops/OWNERS b/tensorflow/core/ops/OWNERS deleted file mode 100644 index 871b7d306d..0000000000 --- a/tensorflow/core/ops/OWNERS +++ /dev/null @@ -1 +0,0 @@ -per-file ops.pbtxt,compat/ops_history.*=tensorflow-git-owners diff --git a/tensorflow/core/platform/default/build_config/BUILD b/tensorflow/core/platform/default/build_config/BUILD index 69a36490b9..4cd3a6e152 100644 --- a/tensorflow/core/platform/default/build_config/BUILD +++ b/tensorflow/core/platform/default/build_config/BUILD @@ -78,3 +78,15 @@ cc_library( "//third_party/gpus/cuda:cudart", ], ) + +filegroup( + name = "all_files", + srcs = glob( + ["**/*"], + exclude = [ + "**/METADATA", + "**/OWNERS", + ], + ), + visibility = ["//tensorflow:__subpackages__"], +) diff --git a/tensorflow/g3doc/how_tos/adding_an_op/BUILD b/tensorflow/g3doc/how_tos/adding_an_op/BUILD new file mode 100644 index 0000000000..37793fcc63 --- /dev/null +++ b/tensorflow/g3doc/how_tos/adding_an_op/BUILD @@ -0,0 +1,156 @@ +# Description: +# Code examples referenced by adding_an_op + +package( + default_visibility = ["//tensorflow:internal"], + features = [ + "-layering_check", + "-parse_headers", + ], +) + +licenses(["notice"]) # Apache 2.0 + +load("//tensorflow:tensorflow.bzl", "tf_custom_op_library") +load("//tensorflow:tensorflow.bzl", "tf_cuda_tests_tags") + +exports_files(["LICENSE"]) + +tf_custom_op_library( + name = "zero_out_op_kernel_1.so", + srcs = ["zero_out_op_kernel_1.cc"], +) + +py_library( + name = "zero_out_op_1", + srcs = ["zero_out_op_1.py"], + data = [":zero_out_op_kernel_1.so"], + srcs_version = "PY2AND3", +) + +tf_custom_op_library( + name = "zero_out_op_kernel_2.so", + srcs = ["zero_out_op_kernel_2.cc"], +) + +py_library( + name = "zero_out_op_2", + srcs = ["zero_out_op_2.py"], + data = [":zero_out_op_kernel_2.so"], + srcs_version = "PY2AND3", +) + +tf_custom_op_library( + name = "zero_out_op_kernel_3.so", + srcs = ["zero_out_op_kernel_3.cc"], +) + +py_library( + name = "zero_out_op_3", + srcs = ["zero_out_op_3.py"], + data = [":zero_out_op_kernel_3.so"], + srcs_version = "PY2AND3", +) + +py_library( + name = "zero_out_grad_2", + srcs = ["zero_out_grad_2.py"], + srcs_version = "PY2AND3", + deps = [ + ":zero_out_op_2", + "//tensorflow:tensorflow_py", + ], +) + +py_test( + name = "zero_out_1_test", + size = "small", + srcs = ["zero_out_1_test.py"], + srcs_version = "PY2AND3", + tags = ["noasan"], + deps = [ + ":zero_out_op_1", + "//tensorflow:tensorflow_py", + ], +) + +py_test( + name = "zero_out_2_test", + size = "small", + srcs = ["zero_out_2_test.py"], + srcs_version = "PY2AND3", + tags = ["noasan"], + deps = [ + ":zero_out_grad_2", + ":zero_out_op_2", + "//tensorflow:tensorflow_py", + "//tensorflow/python:kernel_tests/gradient_checker", + ], +) + +py_test( + name = "zero_out_3_test", + size = "small", + srcs = ["zero_out_3_test.py"], + srcs_version = "PY2AND3", + tags = ["noasan"], + deps = [ + ":zero_out_op_3", + "//tensorflow:tensorflow_py", + ], +) + +tf_custom_op_library( + name = "cuda_op_kernel.so", + srcs = ["cuda_op_kernel.cc"], + gpu_srcs = ["cuda_op_kernel.cu.cc"], +) + +py_library( + name = "cuda_op", + srcs = ["cuda_op.py"], + data = [":cuda_op_kernel.so"], + srcs_version = "PY2AND3", +) + +py_test( + name = "cuda_op_test", + size = "small", + srcs = ["cuda_op_test.py"], + srcs_version = "PY2AND3", + tags = tf_cuda_tests_tags(), + deps = [ + ":cuda_op", + "//tensorflow:tensorflow_py", + ], +) + +py_test( + name = "fact_test", + size = "small", + srcs = ["fact_test.py"], + srcs_version = "PY2AND3", + deps = [ + "//tensorflow:tensorflow_py", + ], +) + +cc_binary( + name = "attr_examples", + srcs = ["attr_examples.cc"], + deps = [ + "//tensorflow/core", + ], +) + +filegroup( + name = "all_files", + srcs = glob( + ["**/*"], + exclude = [ + "**/METADATA", + "**/OWNERS", + ], + ), + visibility = ["//tensorflow:__subpackages__"], +) diff --git a/tensorflow/tensorboard/.gitignore b/tensorflow/tensorboard/.gitignore index 7616bb9828..7191fc167b 100644 --- a/tensorflow/tensorboard/.gitignore +++ b/tensorflow/tensorboard/.gitignore @@ -11,6 +11,7 @@ components/* # in gulpfile.js !components/tf-* !components/index.html +!components/BUILD # Ignore the sample graph files since they are too large to # be in the repo. components/tf-graph/demo/tf_model_zoo/* diff --git a/tensorflow/tensorboard/app/BUILD b/tensorflow/tensorboard/app/BUILD new file mode 100644 index 0000000000..9afcd23e9e --- /dev/null +++ b/tensorflow/tensorboard/app/BUILD @@ -0,0 +1,19 @@ +# Description: +# Build rules for building the HTML/JS necessary for TensorBoard. +package(default_visibility = ["//tensorflow:internal"]) + +licenses(["notice"]) # Apache 2.0 + +exports_files(["LICENSE"]) + +filegroup( + name = "all_files", + srcs = glob( + ["**/*"], + exclude = [ + "**/METADATA", + "**/OWNERS", + ], + ), + visibility = ["//tensorflow:__subpackages__"], +) diff --git a/tensorflow/tensorboard/components/BUILD b/tensorflow/tensorboard/components/BUILD new file mode 100644 index 0000000000..4595cf68fd --- /dev/null +++ b/tensorflow/tensorboard/components/BUILD @@ -0,0 +1,18 @@ +package(default_visibility = ["//tensorflow:internal"]) + +licenses(["notice"]) # Apache 2.0 + +exports_files(["LICENSE"]) + +filegroup( + name = "all_files", + srcs = glob( + ["tf-*/**/*"], + exclude = [ + "**/tf_model_zoo/*", + "**/METADATA", + "**/OWNERS", + ], + ), + visibility = ["//tensorflow:__subpackages__"], +) diff --git a/tensorflow/tensorboard/lib/BUILD b/tensorflow/tensorboard/lib/BUILD new file mode 100644 index 0000000000..9c497396c6 --- /dev/null +++ b/tensorflow/tensorboard/lib/BUILD @@ -0,0 +1,22 @@ +# Description: +# BUILD rules for the static resources in TensorBoard. + +package(default_visibility = [ + "//tensorflow:internal", +]) + +licenses(["notice"]) # Apache 2.0 + +exports_files([ + "LICENSE", +]) + +filegroup( + name = "all_files", + srcs = glob( + [ + "**/*", + ], + ), + visibility = ["//tensorflow:__subpackages__"], +) diff --git a/tensorflow/tensorboard/lib/js/BUILD b/tensorflow/tensorboard/lib/js/BUILD new file mode 100644 index 0000000000..66b5d60db0 --- /dev/null +++ b/tensorflow/tensorboard/lib/js/BUILD @@ -0,0 +1,12 @@ +# Description: +# BUILD rules for the frontend libraries in TensorBoard. + +package(default_visibility = [ + "//tensorflow:internal", +]) + +licenses(["notice"]) # Apache 2.0 + +exports_files([ + "LICENSE", +]) diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl index f869a03607..0562eecb04 100644 --- a/tensorflow/tensorflow.bzl +++ b/tensorflow/tensorflow.bzl @@ -451,6 +451,12 @@ def cc_header_only_library(name, deps=[], **kwargs): hdrs=[":" + name + "_gather"], **kwargs) +def tf_custom_op_library_additional_deps(): + return [ + "//google/protobuf", + "//third_party/eigen3", + "//tensorflow/core:framework_headers_lib", + ] # Helper to build a dynamic library (.so) from the sources containing # implementations of custom ops and kernels. @@ -459,10 +465,7 @@ def tf_custom_op_library(name, srcs=[], gpu_srcs=[], deps=[]): "//tensorflow/core:stream_executor_headers_lib", "//third_party/gpus/cuda:cudart_static", ] - deps = deps + [ - "//third_party/eigen3", - "//tensorflow/core:framework_headers_lib", - ] + deps = deps + tf_custom_op_library_additional_deps() if gpu_srcs: basename = name.split(".")[0] cuda_copts = ["-x", "cuda", "-DGOOGLE_CUDA=1", diff --git a/tensorflow/tools/docker/notebooks/BUILD b/tensorflow/tools/docker/notebooks/BUILD new file mode 100644 index 0000000000..89f473df4b --- /dev/null +++ b/tensorflow/tools/docker/notebooks/BUILD @@ -0,0 +1,17 @@ +package(default_visibility = ["//visibility:private"]) + +licenses(["notice"]) # Apache 2.0 + +exports_files(["LICENSE"]) + +filegroup( + name = "all_files", + srcs = glob( + ["**/*"], + exclude = [ + "**/METADATA", + "**/OWNERS", + ], + ), + visibility = ["//tensorflow:__subpackages__"], +) diff --git a/tensorflow/user_ops/BUILD b/tensorflow/user_ops/BUILD index 7b6c4276b0..e2e8b00781 100644 --- a/tensorflow/user_ops/BUILD +++ b/tensorflow/user_ops/BUILD @@ -23,7 +23,6 @@ load("//tensorflow:tensorflow.bzl", "tf_custom_op_library") tf_custom_op_library( name = "ackermann_op.so", srcs = ["ackermann_op.cc"], - deps = ["//google/protobuf"], ) py_tests( |