aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow')
-rw-r--r--tensorflow/contrib/data/python/kernel_tests/BUILD34
-rw-r--r--tensorflow/contrib/learn/BUILD13
-rw-r--r--tensorflow/contrib/lookup/BUILD12
-rw-r--r--tensorflow/contrib/opt/BUILD17
-rw-r--r--tensorflow/core/platform/default/build_config_root.bzl3
-rw-r--r--tensorflow/python/BUILD133
-rw-r--r--tensorflow/python/data/kernel_tests/BUILD3
-rw-r--r--tensorflow/python/debug/BUILD1
-rw-r--r--tensorflow/python/kernel_tests/BUILD2
-rw-r--r--tensorflow/tensorflow.bzl30
10 files changed, 133 insertions, 115 deletions
diff --git a/tensorflow/contrib/data/python/kernel_tests/BUILD b/tensorflow/contrib/data/python/kernel_tests/BUILD
index 2cb6b7e76c..9b6ad93294 100644
--- a/tensorflow/contrib/data/python/kernel_tests/BUILD
+++ b/tensorflow/contrib/data/python/kernel_tests/BUILD
@@ -4,7 +4,7 @@ licenses(["notice"]) # Apache 2.0
exports_files(["LICENSE"])
-load("//tensorflow:tensorflow.bzl", "py_test")
+load("//tensorflow:tensorflow.bzl", "py_test", "tf_py_test")
py_test(
name = "batch_dataset_op_test",
@@ -157,14 +157,13 @@ py_test(
],
)
-py_test(
+tf_py_test(
name = "flat_map_dataset_op_test",
size = "small",
srcs = ["flat_map_dataset_op_test.py"],
- srcs_version = "PY2AND3",
- tags = ["no_pip"],
- deps = [
+ additional_deps = [
":dataset_serialization_test",
+ "//third_party/py/numpy",
"//tensorflow/contrib/data/python/ops:dataset_ops",
"//tensorflow/python:array_ops",
"//tensorflow/python:client_testlib",
@@ -177,8 +176,9 @@ py_test(
"//tensorflow/python:session",
"//tensorflow/python:training",
"//tensorflow/python:variable_scope",
- "//third_party/py/numpy",
],
+ grpc_enabled = True,
+ tags = ["no_pip"],
)
py_test(
@@ -207,16 +207,11 @@ py_test(
],
)
-py_test(
+tf_py_test(
name = "iterator_ops_cluster_test",
size = "small",
srcs = ["iterator_ops_cluster_test.py"],
- srcs_version = "PY2AND3",
- tags = [
- "no_windows",
- "oss_serial",
- ],
- deps = [
+ additional_deps = [
"//tensorflow/contrib/data/python/ops:dataset_ops",
"//tensorflow/core:protos_all_py",
"//tensorflow/python:array_ops",
@@ -230,14 +225,19 @@ py_test(
"//tensorflow/python:session",
"//tensorflow/python/data/ops:iterator_ops",
],
+ grpc_enabled = True,
+ tags = [
+ "no_windows",
+ "oss_serial",
+ ],
)
-py_test(
+tf_py_test(
name = "iterator_ops_test",
size = "small",
srcs = ["iterator_ops_test.py"],
- srcs_version = "PY2AND3",
- deps = [
+ additional_deps = [
+ "//third_party/py/numpy",
"//tensorflow/contrib/data/python/ops:dataset_ops",
"//tensorflow/contrib/data/python/ops:readers",
"//tensorflow/core:protos_all_py",
@@ -259,8 +259,8 @@ py_test(
"//tensorflow/python:session",
"//tensorflow/python:training",
"//tensorflow/python/data/ops:iterator_ops",
- "//third_party/py/numpy",
],
+ grpc_enabled = True,
)
py_test(
diff --git a/tensorflow/contrib/learn/BUILD b/tensorflow/contrib/learn/BUILD
index 26bbcab307..33f509ec12 100644
--- a/tensorflow/contrib/learn/BUILD
+++ b/tensorflow/contrib/learn/BUILD
@@ -10,7 +10,7 @@ package(default_visibility = [
"//tensorflow:internal",
])
-load("//tensorflow:tensorflow.bzl", "py_test")
+load("//tensorflow:tensorflow.bzl", "py_test", "tf_py_test")
py_library(
name = "learn",
@@ -154,12 +154,11 @@ py_test(
],
)
-py_test(
+tf_py_test(
name = "experiment_test",
size = "medium",
srcs = ["python/learn/experiment_test.py"],
- srcs_version = "PY2AND3",
- deps = [
+ additional_deps = [
":learn",
"//tensorflow/contrib/layers:layers_py",
"//tensorflow/core:protos_all_py",
@@ -716,12 +715,11 @@ py_test(
],
)
-py_test(
+tf_py_test(
name = "graph_io_test",
size = "small",
srcs = ["python/learn/learn_io/graph_io_test.py"],
- srcs_version = "PY2AND3",
- deps = [
+ additional_deps = [
":learn",
"//tensorflow/python:client",
"//tensorflow/python:client_testlib",
@@ -737,6 +735,7 @@ py_test(
"//tensorflow/python:training",
"//tensorflow/python:variables",
],
+ grpc_enabled = True,
)
py_test(
diff --git a/tensorflow/contrib/lookup/BUILD b/tensorflow/contrib/lookup/BUILD
index b7b5418fe9..8ca03f4193 100644
--- a/tensorflow/contrib/lookup/BUILD
+++ b/tensorflow/contrib/lookup/BUILD
@@ -7,7 +7,7 @@ exports_files(["LICENSE"])
package(default_visibility = ["//tensorflow:internal"])
-load("//tensorflow:tensorflow.bzl", "py_test")
+load("//tensorflow:tensorflow.bzl", "tf_py_test")
# TODO(yleon): Refactor after one we switching to the V2 kernels.
py_library(
@@ -26,13 +26,14 @@ py_library(
],
)
-py_test(
+tf_py_test(
name = "lookup_ops_test",
size = "small",
srcs = ["lookup_ops_test.py"],
- srcs_version = "PY2AND3",
- deps = [
+ additional_deps = [
":lookup_py",
+ "//third_party/py/numpy",
+ "@six_archive//:six",
"//tensorflow/python:array_ops",
"//tensorflow/python:client_testlib",
"//tensorflow/python:errors",
@@ -43,9 +44,8 @@ py_test(
"//tensorflow/python:sparse_tensor",
"//tensorflow/python:training",
"//tensorflow/python:variables",
- "//third_party/py/numpy",
- "@six_archive//:six",
],
+ grpc_enabled = True,
)
filegroup(
diff --git a/tensorflow/contrib/opt/BUILD b/tensorflow/contrib/opt/BUILD
index a9a63cbce0..d2811f21af 100644
--- a/tensorflow/contrib/opt/BUILD
+++ b/tensorflow/contrib/opt/BUILD
@@ -80,22 +80,22 @@ py_test(
],
)
-py_test(
+tf_py_test(
name = "variable_clipping_optimizer_test",
srcs = ["python/training/variable_clipping_optimizer_test.py"],
- srcs_version = "PY2AND3",
- tags = [
- "manual", # Flaky: b/29892493
- "notap", # data race due to b/62910646
- ],
- deps = [
+ additional_deps = [
":opt_py",
+ "//third_party/py/numpy",
"//tensorflow/python:client_testlib",
"//tensorflow/python:framework_for_generated_wrappers",
"//tensorflow/python:session",
"//tensorflow/python:training",
"//tensorflow/python:variables",
- "//third_party/py/numpy",
+ ],
+ grpc_enabled = True,
+ tags = [
+ "manual", # Flaky: b/29892493
+ "notap", # data race due to b/62910646
],
)
@@ -168,6 +168,7 @@ tf_py_test(
"//tensorflow/python:training",
"//tensorflow/python:variables",
],
+ grpc_enabled = True,
tags = [
"no_oss", # Flaky due to port collisions
],
diff --git a/tensorflow/core/platform/default/build_config_root.bzl b/tensorflow/core/platform/default/build_config_root.bzl
index 6e98f12114..09029a4b25 100644
--- a/tensorflow/core/platform/default/build_config_root.bzl
+++ b/tensorflow/core/platform/default/build_config_root.bzl
@@ -19,6 +19,9 @@ def tf_additional_plugin_deps():
def tf_additional_xla_deps_py():
return []
+def tf_additional_grpc_deps_py():
+ return []
+
def tf_additional_license_deps():
return select({
str(Label("//tensorflow:with_xla_support")): ["@llvm//:LICENSE.TXT"],
diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD
index e5c4347833..3566a36ddd 100644
--- a/tensorflow/python/BUILD
+++ b/tensorflow/python/BUILD
@@ -3147,130 +3147,124 @@ py_library(
],
)
-py_test(
+tf_py_test(
name = "server_lib_test",
size = "small",
srcs = ["training/server_lib_test.py"],
- srcs_version = "PY2AND3",
- deps = [
+ additional_deps = [
":array_ops",
":client",
":client_testlib",
":data_flow_ops",
":errors",
- ":extra_py_tests_deps",
":framework_for_generated_wrappers",
":math_ops",
":training",
":variables",
- "//tensorflow/core:protos_all_py",
"//third_party/py/numpy",
+ "//tensorflow/core:protos_all_py",
],
+ grpc_enabled = True,
)
-py_test(
+tf_py_test(
name = "server_lib_multiple_containers_test",
size = "small",
srcs = ["training/server_lib_multiple_containers_test.py"],
- srcs_version = "PY2AND3",
- deps = [
+ additional_deps = [
":array_ops",
":client",
":client_testlib",
":data_flow_ops",
":errors",
- ":extra_py_tests_deps",
":framework_for_generated_wrappers",
":math_ops",
":training",
":variables",
- "//tensorflow/core:protos_all_py",
"//third_party/py/numpy",
+ "//tensorflow/core:protos_all_py",
],
+ grpc_enabled = True,
)
-py_test(
+tf_py_test(
name = "server_lib_same_variables_clear_container_test",
size = "small",
srcs = ["training/server_lib_same_variables_clear_container_test.py"],
- srcs_version = "PY2AND3",
- deps = [
+ additional_deps = [
":array_ops",
":client",
":client_testlib",
":data_flow_ops",
":errors",
- ":extra_py_tests_deps",
":framework_for_generated_wrappers",
":math_ops",
":training",
":variables",
- "//tensorflow/core:protos_all_py",
"//third_party/py/numpy",
+ "//tensorflow/core:protos_all_py",
],
+ grpc_enabled = True,
)
-py_test(
+tf_py_test(
name = "server_lib_same_variables_clear_test",
size = "small",
srcs = ["training/server_lib_same_variables_clear_test.py"],
- srcs_version = "PY2AND3",
- deps = [
+ additional_deps = [
":array_ops",
":client",
":client_testlib",
":data_flow_ops",
":errors",
- ":extra_py_tests_deps",
":framework_for_generated_wrappers",
":math_ops",
":training",
":variables",
- "//tensorflow/core:protos_all_py",
"//third_party/py/numpy",
+ "//tensorflow/core:protos_all_py",
],
+ grpc_enabled = True,
)
-py_test(
+tf_py_test(
name = "server_lib_same_variables_no_clear_test",
size = "small",
srcs = ["training/server_lib_same_variables_no_clear_test.py"],
- srcs_version = "PY2AND3",
- deps = [
+ additional_deps = [
":array_ops",
":client",
":client_testlib",
":data_flow_ops",
":errors",
- ":extra_py_tests_deps",
":framework_for_generated_wrappers",
":math_ops",
":training",
":variables",
- "//tensorflow/core:protos_all_py",
"//third_party/py/numpy",
+ "//tensorflow/core:protos_all_py",
],
+ grpc_enabled = True,
)
-py_test(
+tf_py_test(
name = "server_lib_sparse_job_test",
size = "small",
srcs = ["training/server_lib_sparse_job_test.py"],
- srcs_version = "PY2AND3",
- deps = [
+ additional_deps = [
":array_ops",
":client",
":client_testlib",
":data_flow_ops",
":errors",
- ":extra_py_tests_deps",
":framework_for_generated_wrappers",
":math_ops",
":training",
":variables",
- "//tensorflow/core:protos_all_py",
"//third_party/py/numpy",
+ "//tensorflow/core:protos_all_py",
],
+ grpc_enabled = True,
)
cuda_py_test(
@@ -3290,6 +3284,7 @@ cuda_py_test(
":variables",
"//third_party/py/numpy",
],
+ grpc_enabled = True,
tags = [
"no_oss", # Test flaky due to port collisions.
"oss_serial",
@@ -3308,6 +3303,7 @@ tf_py_test(
":training",
":variables",
],
+ grpc_enabled = True,
tags = [
"no_oss", # Test flaky due to port collisions.
"notsan", # data race due to b/62910646
@@ -3338,17 +3334,11 @@ tf_cuda_library(
alwayslink = 1,
)
-py_test(
+tf_py_test(
name = "session_test",
size = "small",
srcs = ["client/session_test.py"],
- srcs_version = "PY2AND3",
- tags = [
- "no_gpu",
- "no_pip_gpu", # testInteractivePlacePrunedGraph fails on invalid assumption about GPU ops.
- "no_windows",
- ],
- deps = [
+ additional_deps = [
":array_ops",
":client",
":control_flow_ops",
@@ -3366,21 +3356,19 @@ py_test(
"//third_party/py/numpy",
"@six_archive//:six",
],
+ grpc_enabled = True,
+ tags = [
+ "no_gpu",
+ "no_pip_gpu", # testInteractivePlacePrunedGraph fails on invalid assumption about GPU ops.
+ "no_windows",
+ ],
)
-py_test(
+tf_py_test(
name = "session_clusterspec_prop_test",
size = "small",
srcs = ["client/session_clusterspec_prop_test.py"],
- srcs_version = "PY2AND3",
- tags = [
- "no_gpu",
- "no_oss",
- "no_pip",
- "no_pip_gpu",
- "notap",
- ],
- deps = [
+ additional_deps = [
":array_ops",
":client",
":client_testlib",
@@ -3395,37 +3383,40 @@ py_test(
":variables",
"//third_party/py/numpy",
],
+ grpc_enabled = True,
+ tags = [
+ "no_gpu",
+ "no_oss",
+ "no_pip",
+ "no_pip_gpu",
+ "notap",
+ ],
)
-py_test(
+tf_py_test(
name = "session_list_devices_test",
size = "small",
srcs = ["client/session_list_devices_test.py"],
- srcs_version = "PY2AND3",
- tags = [
- "no_gpu",
- "no_pip_gpu",
- "notsan", # data race due to b/62910646
- ],
- deps = [
+ additional_deps = [
":client",
":framework",
":framework_test_lib",
":platform_test",
":training",
],
+ grpc_enabled = True,
+ tags = [
+ "no_gpu",
+ "no_pip_gpu",
+ "notsan", # data race due to b/62910646
+ ],
)
-py_test(
+tf_py_test(
name = "session_partial_run_test",
size = "small",
srcs = ["client/session_partial_run_test.py"],
- srcs_version = "PY2AND3",
- tags = [
- "no_gpu",
- "no_windows",
- ],
- deps = [
+ additional_deps = [
":array_ops",
":client",
":errors",
@@ -3438,6 +3429,11 @@ py_test(
":util",
"@six_archive//:six",
],
+ grpc_enabled = True,
+ tags = [
+ "no_gpu",
+ "no_windows",
+ ],
)
cuda_py_test(
@@ -3694,20 +3690,18 @@ cuda_py_test(
":training",
":variables",
],
+ grpc_enabled = True,
main = "training/session_manager_test.py",
)
-py_test(
+tf_py_test(
name = "supervisor_test",
size = "small",
srcs = ["training/supervisor_test.py"],
- srcs_version = "PY2AND3",
- tags = ["no_windows"],
- deps = [
+ additional_deps = [
":array_ops",
":client_testlib",
":errors",
- ":extra_py_tests_deps",
":framework",
":framework_for_generated_wrappers",
":io_ops",
@@ -3718,6 +3712,8 @@ py_test(
":variables",
"//tensorflow/core:protos_all_py",
],
+ grpc_enabled = True,
+ tags = ["no_windows"],
)
py_test(
@@ -4331,6 +4327,7 @@ cuda_py_test(
":variables",
"//third_party/py/numpy",
],
+ grpc_enabled = True,
main = "client/session_benchmark.py",
)
diff --git a/tensorflow/python/data/kernel_tests/BUILD b/tensorflow/python/data/kernel_tests/BUILD
index 4fd7c99ac6..5fb389cf92 100644
--- a/tensorflow/python/data/kernel_tests/BUILD
+++ b/tensorflow/python/data/kernel_tests/BUILD
@@ -103,6 +103,7 @@ tf_py_test(
"//tensorflow/python:training",
"//tensorflow/python/data/ops:dataset_ops",
],
+ grpc_enabled = True,
)
tf_py_test(
@@ -336,6 +337,7 @@ tf_py_test(
"//tensorflow/python:tensor_shape",
"//tensorflow/python:training",
],
+ grpc_enabled = True,
)
tf_py_test(
@@ -356,6 +358,7 @@ tf_py_test(
"//tensorflow/python/data/ops:dataset_ops",
"//tensorflow/python/data/ops:iterator_ops",
],
+ grpc_enabled = True,
tags = [
"no_oss", # Test flaky due to port collisions.
"no_windows",
diff --git a/tensorflow/python/debug/BUILD b/tensorflow/python/debug/BUILD
index c52bf49b98..2315ad4653 100644
--- a/tensorflow/python/debug/BUILD
+++ b/tensorflow/python/debug/BUILD
@@ -962,6 +962,7 @@ cuda_py_test(
"//tensorflow/python:variables",
],
data = ["//tensorflow/tools/dist_test/server:grpc_tensorflow_server"],
+ grpc_enabled = True,
tags = [
"no_oss", # Incompatible with bazel_pip.
"no_windows",
diff --git a/tensorflow/python/kernel_tests/BUILD b/tensorflow/python/kernel_tests/BUILD
index 2c73ecd8be..1d8ca99c07 100644
--- a/tensorflow/python/kernel_tests/BUILD
+++ b/tensorflow/python/kernel_tests/BUILD
@@ -483,6 +483,7 @@ tf_py_test(
"//tensorflow/python:sparse_tensor",
"//tensorflow/python:training",
],
+ grpc_enabled = True,
)
tf_py_test(
@@ -1443,6 +1444,7 @@ cuda_py_test(
"//tensorflow/python:variable_scope",
"//tensorflow/python:variables",
],
+ grpc_enabled = True,
tags = ["no_windows"],
)
diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl
index 0db915f1b9..425997e41f 100644
--- a/tensorflow/tensorflow.bzl
+++ b/tensorflow/tensorflow.bzl
@@ -6,6 +6,7 @@ load(
"//tensorflow/core:platform/default/build_config_root.bzl",
"tf_cuda_tests_tags",
"tf_sycl_tests_tags",
+ "tf_additional_grpc_deps_py",
"tf_additional_xla_deps_py",
"if_static",
)
@@ -1340,9 +1341,12 @@ def tf_py_test(name,
shard_count=1,
additional_deps=[],
flaky=0,
- xla_enabled=False):
+ xla_enabled=False,
+ grpc_enabled=False):
if xla_enabled:
additional_deps = additional_deps + tf_additional_xla_deps_py()
+ if grpc_enabled:
+ additional_deps = additional_deps + tf_additional_grpc_deps_py()
native.py_test(
name=name,
size=size,
@@ -1378,7 +1382,8 @@ def cuda_py_test(name,
additional_deps=[],
tags=[],
flaky=0,
- xla_enabled=False):
+ xla_enabled=False,
+ grpc_enabled=False):
test_tags = tags + tf_cuda_tests_tags()
tf_py_test(
name=name,
@@ -1391,7 +1396,8 @@ def cuda_py_test(name,
shard_count=shard_count,
additional_deps=additional_deps,
flaky=flaky,
- xla_enabled=xla_enabled)
+ xla_enabled=xla_enabled,
+ grpc_enabled=grpc_enabled)
register_extension_info(
extension_name = "cuda_py_test",
@@ -1408,7 +1414,8 @@ def sycl_py_test(name,
additional_deps=[],
tags=[],
flaky=0,
- xla_enabled=False):
+ xla_enabled=False,
+ grpc_enabled=False):
test_tags = tags + tf_sycl_tests_tags()
tf_py_test(
name=name,
@@ -1421,7 +1428,8 @@ def sycl_py_test(name,
shard_count=shard_count,
additional_deps=additional_deps,
flaky=flaky,
- xla_enabled=xla_enabled)
+ xla_enabled=xla_enabled,
+ grpc_enabled=grpc_enabled)
register_extension_info(
extension_name = "sycl_py_test",
@@ -1436,7 +1444,8 @@ def py_tests(name,
tags=[],
shard_count=1,
prefix="",
- xla_enabled=False):
+ xla_enabled=False,
+ grpc_enabled=False):
for src in srcs:
test_name = src.split("/")[-1].split(".")[0]
if prefix:
@@ -1450,7 +1459,8 @@ def py_tests(name,
shard_count=shard_count,
data=data,
additional_deps=additional_deps,
- xla_enabled=xla_enabled)
+ xla_enabled=xla_enabled,
+ grpc_enabled=grpc_enabled)
def cuda_py_tests(name,
srcs,
@@ -1460,7 +1470,8 @@ def cuda_py_tests(name,
shard_count=1,
tags=[],
prefix="",
- xla_enabled=False):
+ xla_enabled=False,
+ grpc_enabled=False):
test_tags = tags + tf_cuda_tests_tags()
py_tests(
name=name,
@@ -1471,7 +1482,8 @@ def cuda_py_tests(name,
tags=test_tags,
shard_count=shard_count,
prefix=prefix,
- xla_enabled=xla_enabled)
+ xla_enabled=xla_enabled,
+ grpc_enabled=grpc_enabled)
# Creates a genrule named <name> for running tools/proto_text's generator to
# make the proto_text functions, for the protos passed in <srcs>.