Add BUILD files to opensource tree.
Opensource all_opensource_files. Fix dependencies of custom op build rule. Change: 119376509
This commit is contained in:
parent
91969ae68e
commit
75d7b02b01
@ -11,8 +11,6 @@ exports_files([
|
|||||||
"ACKNOWLEDGMENTS",
|
"ACKNOWLEDGMENTS",
|
||||||
])
|
])
|
||||||
|
|
||||||
# open source marker; do not remove
|
|
||||||
|
|
||||||
# Config setting for determining if we are building for Android.
|
# Config setting for determining if we are building for Android.
|
||||||
config_setting(
|
config_setting(
|
||||||
name = "android",
|
name = "android",
|
||||||
@ -52,6 +50,66 @@ filegroup(
|
|||||||
visibility = ["//tensorflow:__subpackages__"],
|
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.
|
# New rules should be added above this target.
|
||||||
# -------------------------------------------
|
# -------------------------------------------
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
adarob
|
|
||||||
deck
|
|
||||||
fredbertsch
|
|
@ -1,3 +0,0 @@
|
|||||||
yleon
|
|
||||||
ptucker
|
|
||||||
mdb-group:ami
|
|
@ -1 +0,0 @@
|
|||||||
per-file ops.pbtxt,compat/ops_history.*=tensorflow-git-owners
|
|
@ -78,3 +78,15 @@ cc_library(
|
|||||||
"//third_party/gpus/cuda:cudart",
|
"//third_party/gpus/cuda:cudart",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all_files",
|
||||||
|
srcs = glob(
|
||||||
|
["**/*"],
|
||||||
|
exclude = [
|
||||||
|
"**/METADATA",
|
||||||
|
"**/OWNERS",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
visibility = ["//tensorflow:__subpackages__"],
|
||||||
|
)
|
||||||
|
156
tensorflow/g3doc/how_tos/adding_an_op/BUILD
Normal file
156
tensorflow/g3doc/how_tos/adding_an_op/BUILD
Normal file
@ -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__"],
|
||||||
|
)
|
1
tensorflow/tensorboard/.gitignore
vendored
1
tensorflow/tensorboard/.gitignore
vendored
@ -11,6 +11,7 @@ components/*
|
|||||||
# in gulpfile.js
|
# in gulpfile.js
|
||||||
!components/tf-*
|
!components/tf-*
|
||||||
!components/index.html
|
!components/index.html
|
||||||
|
!components/BUILD
|
||||||
# Ignore the sample graph files since they are too large to
|
# Ignore the sample graph files since they are too large to
|
||||||
# be in the repo.
|
# be in the repo.
|
||||||
components/tf-graph/demo/tf_model_zoo/*
|
components/tf-graph/demo/tf_model_zoo/*
|
||||||
|
19
tensorflow/tensorboard/app/BUILD
Normal file
19
tensorflow/tensorboard/app/BUILD
Normal file
@ -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__"],
|
||||||
|
)
|
18
tensorflow/tensorboard/components/BUILD
Normal file
18
tensorflow/tensorboard/components/BUILD
Normal file
@ -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__"],
|
||||||
|
)
|
22
tensorflow/tensorboard/lib/BUILD
Normal file
22
tensorflow/tensorboard/lib/BUILD
Normal file
@ -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__"],
|
||||||
|
)
|
12
tensorflow/tensorboard/lib/js/BUILD
Normal file
12
tensorflow/tensorboard/lib/js/BUILD
Normal file
@ -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",
|
||||||
|
])
|
@ -451,6 +451,12 @@ def cc_header_only_library(name, deps=[], **kwargs):
|
|||||||
hdrs=[":" + name + "_gather"],
|
hdrs=[":" + name + "_gather"],
|
||||||
**kwargs)
|
**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
|
# Helper to build a dynamic library (.so) from the sources containing
|
||||||
# implementations of custom ops and kernels.
|
# 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",
|
"//tensorflow/core:stream_executor_headers_lib",
|
||||||
"//third_party/gpus/cuda:cudart_static",
|
"//third_party/gpus/cuda:cudart_static",
|
||||||
]
|
]
|
||||||
deps = deps + [
|
deps = deps + tf_custom_op_library_additional_deps()
|
||||||
"//third_party/eigen3",
|
|
||||||
"//tensorflow/core:framework_headers_lib",
|
|
||||||
]
|
|
||||||
if gpu_srcs:
|
if gpu_srcs:
|
||||||
basename = name.split(".")[0]
|
basename = name.split(".")[0]
|
||||||
cuda_copts = ["-x", "cuda", "-DGOOGLE_CUDA=1",
|
cuda_copts = ["-x", "cuda", "-DGOOGLE_CUDA=1",
|
||||||
|
17
tensorflow/tools/docker/notebooks/BUILD
Normal file
17
tensorflow/tools/docker/notebooks/BUILD
Normal file
@ -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__"],
|
||||||
|
)
|
@ -23,7 +23,6 @@ load("//tensorflow:tensorflow.bzl", "tf_custom_op_library")
|
|||||||
tf_custom_op_library(
|
tf_custom_op_library(
|
||||||
name = "ackermann_op.so",
|
name = "ackermann_op.so",
|
||||||
srcs = ["ackermann_op.cc"],
|
srcs = ["ackermann_op.cc"],
|
||||||
deps = ["//google/protobuf"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
py_tests(
|
py_tests(
|
||||||
|
Loading…
Reference in New Issue
Block a user