From 2fcfa6085bb2440b0a9619c8037a65a44ee92bdb Mon Sep 17 00:00:00 2001 From: Brian Atkinson Date: Thu, 12 Dec 2019 15:24:41 -0800 Subject: [PATCH] Move additional_deps to deps for cuda_py_test. PiperOrigin-RevId: 285283853 Change-Id: I2534d9fb51955cc9a86d1900ec60fc265f451ddc --- tensorflow/compiler/tests/BUILD | 22 +- .../saved_model/integration_tests/BUILD | 14 +- tensorflow/python/BUILD | 442 ++++---- tensorflow/python/compiler/tensorrt/BUILD | 44 +- tensorflow/python/compiler/xla/BUILD | 38 +- .../data/experimental/kernel_tests/BUILD | 26 +- tensorflow/python/data/kernel_tests/BUILD | 76 +- tensorflow/python/debug/BUILD | 178 +-- tensorflow/python/distribute/BUILD | 164 +-- tensorflow/python/keras/BUILD | 142 +-- tensorflow/python/keras/distribute/BUILD | 88 +- .../keras/mixed_precision/experimental/BUILD | 22 +- tensorflow/python/keras/optimizer_v2/BUILD | 94 +- tensorflow/python/kernel_tests/BUILD | 1010 ++++++++--------- .../python/kernel_tests/distributions/BUILD | 136 +-- tensorflow/python/kernel_tests/linalg/BUILD | 254 ++--- .../python/kernel_tests/linalg/sparse/BUILD | 38 +- tensorflow/python/kernel_tests/random/BUILD | 38 +- tensorflow/python/ops/parallel_for/BUILD | 40 +- tensorflow/python/profiler/BUILD | 50 +- tensorflow/python/profiler/internal/BUILD | 18 +- tensorflow/python/saved_model/BUILD | 32 +- tensorflow/python/training/saving/BUILD | 2 +- 23 files changed, 1484 insertions(+), 1484 deletions(-) diff --git a/tensorflow/compiler/tests/BUILD b/tensorflow/compiler/tests/BUILD index 0316bb234c9..01a0f0a86f2 100644 --- a/tensorflow/compiler/tests/BUILD +++ b/tensorflow/compiler/tests/BUILD @@ -1271,7 +1271,8 @@ cuda_py_test( name = "xla_device_gpu_test", size = "small", srcs = ["xla_device_gpu_test.py"], - additional_deps = [ + xla_enable_strict_auto_jit = False, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client", "//tensorflow/python:client_testlib", @@ -1279,16 +1280,16 @@ cuda_py_test( "//tensorflow/python:framework", "//tensorflow/python:math_ops", ], - xla_enable_strict_auto_jit = False, ) cuda_py_test( name = "jit_test", size = "medium", srcs = ["jit_test.py"], - additional_deps = [ + shard_count = 5, + xla_enable_strict_auto_jit = False, + deps = [ ":test_utils", - "//tensorflow/python/compiler/xla:compiler_py", "//tensorflow/core:protos_all_py", "//tensorflow/python:array_ops", "//tensorflow/python:client", @@ -1298,25 +1299,24 @@ cuda_py_test( "//tensorflow/python:gradients", "//tensorflow/python:math_ops", "//tensorflow/python:nn_ops", + "//tensorflow/python/compiler/xla:compiler_py", ], - shard_count = 5, - xla_enable_strict_auto_jit = False, ) cuda_py_test( name = "dense_layer_test", size = "medium", srcs = ["dense_layer_test.py"], - additional_deps = [ + xla_enable_strict_auto_jit = False, + deps = [ ":test_utils", - "//tensorflow/python/compiler/xla:compiler_py", "//tensorflow/core:protos_all_py", "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:layers", "//tensorflow/python:variables", + "//tensorflow/python/compiler/xla:compiler_py", ], - xla_enable_strict_auto_jit = False, ) cc_library( @@ -1391,7 +1391,8 @@ py_library( cuda_py_test( name = "lstm_test", srcs = ["lstm_test.py"], - additional_deps = [ + xla_enable_strict_auto_jit = False, + deps = [ ":lstm", ":xla_test", "//tensorflow/python:array_ops", @@ -1403,7 +1404,6 @@ cuda_py_test( "//tensorflow/python:platform", "//tensorflow/python:variables", ], - xla_enable_strict_auto_jit = False, ) # An example of ahead-of-time compilation using tfcompile. The diff --git a/tensorflow/examples/saved_model/integration_tests/BUILD b/tensorflow/examples/saved_model/integration_tests/BUILD index c967f49d540..0e55a0af437 100644 --- a/tensorflow/examples/saved_model/integration_tests/BUILD +++ b/tensorflow/examples/saved_model/integration_tests/BUILD @@ -53,13 +53,6 @@ cuda_py_test( srcs = [ "saved_model_test.py", ], - additional_deps = [ - ":distribution_strategy_utils", - ":integration_scripts", - "@absl_py//absl/testing:parameterized", - "//tensorflow:tensorflow_py", - "//tensorflow/python/distribute:combinations", - ], shard_count = 4, tags = [ "no_pip", # b/131697937 and b/132196869 @@ -67,6 +60,13 @@ cuda_py_test( "nomsan", # forge input size exceeded "notsan", # forge input size exceeded ], + deps = [ + ":distribution_strategy_utils", + ":integration_scripts", + "//tensorflow:tensorflow_py", + "//tensorflow/python/distribute:combinations", + "@absl_py//absl/testing:parameterized", + ], ) # b/132234211: Target added to support internal test target that runs the test diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD index 88a5ab990f7..a980657640d 100644 --- a/tensorflow/python/BUILD +++ b/tensorflow/python/BUILD @@ -1405,19 +1405,19 @@ py_library( cuda_py_test( name = "op_callbacks_test", srcs = ["framework/op_callbacks_test.py"], - additional_deps = [ + python_version = "PY3", + deps = [ ":client_testlib", ":control_flow_ops", ":framework_test_lib", ":script_ops", ":sparse_ops", ":sparse_tensor", - "//third_party/py/numpy", "//tensorflow/python/eager:execute", "//tensorflow/python/eager:test", "//tensorflow/python/keras", + "//third_party/py/numpy", ], - python_version = "PY3", ) py_library( @@ -1525,16 +1525,16 @@ cuda_py_test( name = "config_test", size = "small", srcs = ["framework/config_test.py"], - additional_deps = [ + python_version = "PY3", + tags = ["no_pip"], # test_ops are not available in pip. + deps = [ + ":client_testlib", ":config", ":constant_op", - ":client_testlib", ":platform", ":test_ops", ":util", ], - python_version = "PY3", - tags = ["no_pip"], # test_ops are not available in pip. ) py_library( @@ -1985,7 +1985,13 @@ cuda_py_test( name = "function_test", size = "medium", srcs = ["framework/function_test.py"], - additional_deps = [ + python_version = "PY3", + shard_count = 10, + tags = [ + "noasan", + "optonly", + ], + deps = [ ":array_ops", ":client", ":client_testlib", @@ -2004,14 +2010,8 @@ cuda_py_test( ":random_ops", ":variable_scope", ":variables", - "//third_party/py/numpy", "//tensorflow/core:protos_all_py", - ], - python_version = "PY3", - shard_count = 10, - tags = [ - "noasan", - "optonly", + "//third_party/py/numpy", ], ) @@ -2972,18 +2972,18 @@ cuda_py_test( name = "collective_ops_gpu_test", size = "small", srcs = ["ops/collective_ops_gpu_test.py"], - additional_deps = [ - ":client_testlib", - ":collective_ops", - ":framework_for_generated_wrappers", - "//third_party/py/numpy", - ], python_version = "PY3", tags = [ "no_cuda_on_cpu_tap", "no_rocm", "no_windows", ], + deps = [ + ":client_testlib", + ":collective_ops", + ":framework_for_generated_wrappers", + "//third_party/py/numpy", + ], ) py_library( @@ -3648,15 +3648,15 @@ cuda_py_test( name = "mixed_precision_test", size = "small", srcs = ["training/experimental/mixed_precision_test.py"], - additional_deps = [ - ":mixed_precision", - "@absl_py//absl/testing:parameterized", - "//tensorflow/python:client_testlib", - ], python_version = "PY3", tags = [ "no_rocm", ], + deps = [ + ":mixed_precision", + "//tensorflow/python:client_testlib", + "@absl_py//absl/testing:parameterized", + ], ) py_library( @@ -3677,17 +3677,17 @@ cuda_py_test( name = "loss_scaling_gradient_tape_test", size = "medium", srcs = ["training/experimental/loss_scaling_gradient_tape_test.py"], - additional_deps = [ + deps = [ ":client_testlib", ":constant_op", ":framework_test_combinations_lib", ":loss_scale", ":loss_scaling_gradient_tape", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", "//tensorflow/python/compat:v2_compat", "//tensorflow/python/distribute:mirrored_strategy", "//tensorflow/python/eager:def_function", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], ) @@ -3954,18 +3954,18 @@ cuda_py_test( name = "stateful_random_ops_test", size = "medium", srcs = ["ops/stateful_random_ops_test.py"], - additional_deps = [ - ":stateful_random_ops", + python_version = "PY3", + tags = ["no_rocm"], + xla_enable_strict_auto_jit = False, + deps = [ ":client_testlib", ":config", ":logging_ops", ":random_ops_gen", - "//tensorflow/python/kernel_tests/random:util", + ":stateful_random_ops", "//tensorflow/python/distribute:mirrored_strategy", + "//tensorflow/python/kernel_tests/random:util", ], - python_version = "PY3", - tags = ["no_rocm"], - xla_enable_strict_auto_jit = False, ) py_library( @@ -4487,21 +4487,23 @@ cuda_py_test( name = "bitwise_ops_test", size = "small", srcs = ["ops/bitwise_ops_test.py"], - additional_deps = [ + python_version = "PY3", + tags = ["no_windows"], + deps = [ ":bitwise_ops", ":constant_op", ":dtypes", ":framework_test_lib", ], - python_version = "PY3", - tags = ["no_windows"], ) cuda_py_test( name = "control_flow_ops_test", size = "small", srcs = ["ops/control_flow_ops_test.py"], - additional_deps = [ + python_version = "PY3", + shard_count = 2, + deps = [ ":array_ops", ":cond_v2", ":control_flow_ops", @@ -4523,15 +4525,14 @@ cuda_py_test( ":while_v2", "//tensorflow/python/eager:def_function", ], - python_version = "PY3", - shard_count = 2, ) cuda_py_test( name = "gradient_checker_test", size = "medium", srcs = ["ops/gradient_checker_test.py"], - additional_deps = [ + python_version = "PY3", + deps = [ ":array_ops", ":client_testlib", ":framework_for_generated_wrappers", @@ -4541,7 +4542,6 @@ cuda_py_test( ":platform", "//third_party/py/numpy", ], - python_version = "PY3", ) py_test( @@ -4562,7 +4562,8 @@ cuda_py_test( name = "gradient_checker_v2_test", size = "medium", srcs = ["ops/gradient_checker_v2_test.py"], - additional_deps = [ + python_version = "PY3", + deps = [ ":array_ops", ":client_testlib", ":framework_for_generated_wrappers", @@ -4572,14 +4573,15 @@ cuda_py_test( ":platform", "//third_party/py/numpy", ], - python_version = "PY3", ) cuda_py_test( name = "gradients_test", size = "medium", srcs = ["ops/gradients_test.py"], - additional_deps = [ + python_version = "PY3", + tags = ["no_oss"], # b/118709825 + deps = [ ":array_grad", ":array_ops", ":control_flow_grad", @@ -4604,19 +4606,18 @@ cuda_py_test( ":test_ops", ":unconnected_gradients", ":variable_scope", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", "//tensorflow/python/keras:engine", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], - python_version = "PY3", - tags = ["no_oss"], # b/118709825 ) cuda_py_test( name = "histogram_ops_test", size = "small", srcs = ["ops/histogram_ops_test.py"], - additional_deps = [ + python_version = "PY3", + deps = [ ":array_ops", ":client_testlib", ":framework_for_generated_wrappers", @@ -4625,28 +4626,30 @@ cuda_py_test( ":variables", "//third_party/py/numpy", ], - python_version = "PY3", ) cuda_py_test( name = "image_grad_test", size = "medium", srcs = ["ops/image_grad_test.py"], - additional_deps = [ + python_version = "PY3", + deps = [ ":client_testlib", ":framework_for_generated_wrappers", ":gradients", ":image_ops", "//third_party/py/numpy", ], - python_version = "PY3", ) cuda_py_test( name = "image_ops_test", size = "medium", srcs = ["ops/image_ops_test.py"], - additional_deps = [ + data = ["//tensorflow/core:image_testdata"], + python_version = "PY3", + shard_count = 5, + deps = [ ":array_ops", ":client", ":client_testlib", @@ -4660,50 +4663,49 @@ cuda_py_test( ":platform_test", ":random_ops", ":variables", - "//third_party/py/numpy", "//tensorflow/core:protos_all_py", + "//third_party/py/numpy", ], - data = ["//tensorflow/core:image_testdata"], - python_version = "PY3", - shard_count = 5, ) cuda_py_test( name = "init_ops_test", size = "small", srcs = ["ops/init_ops_test.py"], - additional_deps = [ - ":client_testlib", - ":init_ops", - ":framework_ops", - ":resource_variable_ops", - "//third_party/py/numpy", - "//tensorflow/python/eager:context", - ], python_version = "PY3", + deps = [ + ":client_testlib", + ":framework_ops", + ":init_ops", + ":resource_variable_ops", + "//tensorflow/python/eager:context", + "//third_party/py/numpy", + ], ) cuda_py_test( name = "init_ops_v2_test", size = "medium", srcs = ["ops/init_ops_v2_test.py"], - additional_deps = [ + python_version = "PY3", + deps = [ ":array_ops", ":client_testlib", + ":framework_ops", ":init_ops_v2", ":random_ops", - ":framework_ops", - "//third_party/py/numpy", "//tensorflow/python/eager:context", + "//third_party/py/numpy", ], - python_version = "PY3", ) cuda_py_test( name = "math_grad_test", size = "small", srcs = ["ops/math_grad_test.py"], - additional_deps = [ + python_version = "PY3", + tags = ["no_windows_gpu"], + deps = [ ":array_ops", ":client_testlib", ":framework_for_generated_wrappers", @@ -4713,15 +4715,15 @@ cuda_py_test( "//tensorflow/python/eager:context", "//third_party/py/numpy", ], - python_version = "PY3", - tags = ["no_windows_gpu"], ) cuda_py_test( name = "math_ops_test", size = "small", srcs = ["ops/math_ops_test.py"], - additional_deps = [ + python_version = "PY3", + tags = ["no_windows_gpu"], + deps = [ ":array_ops", ":errors", ":framework_for_generated_wrappers", @@ -4732,15 +4734,16 @@ cuda_py_test( ":variables", "//third_party/py/numpy", ], - python_version = "PY3", - tags = ["no_windows_gpu"], ) cuda_py_test( name = "nn_batchnorm_test", size = "medium", srcs = ["ops/nn_batchnorm_test.py"], - additional_deps = [ + python_version = "PY3", + shard_count = 4, + tags = ["no_windows"], + deps = [ ":array_ops", ":client_testlib", ":framework_for_generated_wrappers", @@ -4751,16 +4754,16 @@ cuda_py_test( ":nn_ops_gen", "//third_party/py/numpy", ], - python_version = "PY3", - shard_count = 4, - tags = ["no_windows"], ) cuda_py_test( name = "nn_fused_batchnorm_test", size = "large", srcs = ["ops/nn_fused_batchnorm_test.py"], - additional_deps = [ + python_version = "PY3", + shard_count = 16, + tags = ["no_rocm"], + deps = [ ":array_ops", ":client_testlib", ":framework_for_generated_wrappers", @@ -4769,16 +4772,17 @@ cuda_py_test( ":nn_grad", "//third_party/py/numpy", ], - python_version = "PY3", - shard_count = 16, - tags = ["no_rocm"], ) cuda_py_test( name = "nn_test", size = "medium", srcs = ["ops/nn_test.py"], - additional_deps = [ + python_version = "PY3", + tags = ["no_windows"], + # TODO(b/130689556): Numerical differences due to fast math on CPU. + xla_enable_strict_auto_jit = False, + deps = [ ":array_ops", ":client_testlib", ":framework_for_generated_wrappers", @@ -4788,13 +4792,9 @@ cuda_py_test( ":partitioned_variables", ":variable_scope", ":variables", - "@absl_py//absl/testing:parameterized", "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], - python_version = "PY3", - tags = ["no_windows"], - # TODO(b/130689556): Numerical differences due to fast math on CPU. - xla_enable_strict_auto_jit = False, ) py_test( @@ -4814,7 +4814,8 @@ cuda_py_test( name = "nn_xent_test", size = "medium", srcs = ["ops/nn_xent_test.py"], - additional_deps = [ + python_version = "PY3", + deps = [ ":client_testlib", ":framework_for_generated_wrappers", ":gradients", @@ -4822,7 +4823,6 @@ cuda_py_test( ":nn_grad", "//third_party/py/numpy", ], - python_version = "PY3", ) py_test( @@ -4841,7 +4841,10 @@ cuda_py_test( name = "special_math_ops_test", size = "medium", srcs = ["ops/special_math_ops_test.py"], - additional_deps = [ + python_version = "PY3", + shard_count = 10, + tags = ["no_windows_gpu"], + deps = [ ":array_ops", ":client", ":client_testlib", @@ -4850,9 +4853,6 @@ cuda_py_test( ":special_math_ops", "//third_party/py/numpy", ], - python_version = "PY3", - shard_count = 10, - tags = ["no_windows_gpu"], ) tf_py_test( @@ -5841,7 +5841,13 @@ cuda_py_test( srcs = [ "training/localhost_cluster_performance_test.py", ], - additional_deps = [ + grpc_enabled = True, + python_version = "PY3", + tags = [ + "no_oss", # Test flaky due to port collisions. + "oss_serial", + ], + deps = [ ":client", ":client_testlib", ":distributed_framework_test_lib", @@ -5852,12 +5858,6 @@ cuda_py_test( ":variables", "//third_party/py/numpy", ], - grpc_enabled = True, - python_version = "PY3", - tags = [ - "no_oss", # Test flaky due to port collisions. - "oss_serial", - ], ) tf_py_test( @@ -6015,33 +6015,33 @@ cuda_py_test( name = "timeline_test", size = "small", srcs = ["client/timeline_test.py"], - additional_deps = [ + python_version = "PY3", + xla_enable_strict_auto_jit = False, # Graph structure is different with autojit + deps = [ ":client", ":client_testlib", ":framework_for_generated_wrappers", ":math_ops", "//tensorflow/core:protos_all_py", ], - python_version = "PY3", - xla_enable_strict_auto_jit = False, # Graph structure is different with autojit ) cuda_py_test( name = "virtual_gpu_test", size = "small", srcs = ["client/virtual_gpu_test.py"], - additional_deps = [ + python_version = "PY3", + tags = [ + "no_gpu", # b/127386241 + "no_windows_gpu", + ], + deps = [ ":client", ":client_testlib", ":framework_for_generated_wrappers", ":math_ops", "//tensorflow/core:protos_all_py", ], - python_version = "PY3", - tags = [ - "no_gpu", # b/127386241 - "no_windows_gpu", - ], ) tf_py_test( @@ -6149,17 +6149,17 @@ cuda_py_test( name = "adam_test", size = "small", srcs = ["training/adam_test.py"], - additional_deps = [ + python_version = "PY3", + deps = [ ":array_ops", + ":client_testlib", ":framework", ":math_ops", ":platform", - ":training", ":platform_test", - ":client_testlib", + ":training", "//third_party/py/numpy", ], - python_version = "PY3", ) cuda_py_test( @@ -6168,7 +6168,12 @@ cuda_py_test( srcs = [ "training/moving_averages_test.py", ], - additional_deps = [ + python_version = "PY3", + tags = [ + "no_windows", # b/139083295: bfloat16 tests fail on Windows + "notsan", + ], + deps = [ ":array_ops", ":client_testlib", ":constant_op", @@ -6179,11 +6184,6 @@ cuda_py_test( ":variable_scope", ":variables", ], - python_version = "PY3", - tags = [ - "no_windows", # b/139083295: bfloat16 tests fail on Windows - "notsan", - ], ) cuda_py_tests( @@ -6265,7 +6265,9 @@ cuda_py_test( srcs = [ "training/saver_test.py", ], - additional_deps = [ + python_version = "PY3", + tags = ["multi_gpu"], + deps = [ ":array_ops", ":client_testlib", ":control_flow_ops", @@ -6275,26 +6277,24 @@ cuda_py_test( ":math_ops", ":nn_grad", ":nn_ops", - ":saver_test_utils", ":partitioned_variables", ":platform", ":platform_test", ":py_checkpoint_reader", ":random_ops", ":resource_variable_ops", + ":saver_test_utils", ":sparse_ops", ":summary", ":training", ":util", ":variable_scope", ":variables", - "//third_party/py/numpy", - "@six_archive//:six", "//tensorflow/core:protos_all_py", "//tensorflow/python/data/ops:dataset_ops", + "//third_party/py/numpy", + "@six_archive//:six", ], - python_version = "PY3", - tags = ["multi_gpu"], ) cuda_py_test( @@ -6303,7 +6303,8 @@ cuda_py_test( srcs = [ "training/checkpoint_management_test.py", ], - additional_deps = [ + python_version = "PY3", + deps = [ ":array_ops", ":client_testlib", ":control_flow_ops", @@ -6313,25 +6314,24 @@ cuda_py_test( ":math_ops", ":nn_grad", ":nn_ops", - ":saver_test_utils", ":partitioned_variables", ":platform", ":platform_test", ":pywrap_tensorflow", ":random_ops", ":resource_variable_ops", + ":saver_test_utils", ":sparse_ops", ":summary", ":training", ":util", ":variable_scope", ":variables", - "//third_party/py/numpy", - "@six_archive//:six", "//tensorflow/core:protos_all_py", "//tensorflow/python/data/ops:dataset_ops", + "//third_party/py/numpy", + "@six_archive//:six", ], - python_version = "PY3", ) tf_py_test( @@ -6378,20 +6378,20 @@ cuda_py_test( name = "session_manager_test", size = "medium", # TODO(irving): Can this be made small? srcs = ["training/session_manager_test.py"], - additional_deps = [ + grpc_enabled = True, + main = "training/session_manager_test.py", + python_version = "PY3", + deps = [ ":array_ops", - ":control_flow_ops", ":client", ":client_testlib", + ":control_flow_ops", ":errors", ":framework_for_generated_wrappers", ":platform", ":training", ":variables", ], - grpc_enabled = True, - main = "training/session_manager_test.py", - python_version = "PY3", ) tf_py_test( @@ -6839,7 +6839,10 @@ cuda_py_test( name = "layers_normalization_test", size = "medium", srcs = ["layers/normalization_test.py"], - additional_deps = [ + main = "layers/normalization_test.py", + python_version = "PY3", + shard_count = 10, + deps = [ ":array_ops", ":client_testlib", ":framework_for_generated_wrappers", @@ -6850,9 +6853,6 @@ cuda_py_test( ":variables", "//third_party/py/numpy", ], - main = "layers/normalization_test.py", - python_version = "PY3", - shard_count = 10, ) # ----------------------------------------------------------------------------- @@ -6922,7 +6922,10 @@ cuda_py_test( name = "accumulate_n_benchmark", size = "medium", srcs = ["ops/accumulate_n_benchmark.py"], - additional_deps = [ + main = "ops/accumulate_n_benchmark.py", + python_version = "PY3", + shard_count = 6, + deps = [ ":array_ops", ":client", ":client_testlib", @@ -6934,15 +6937,14 @@ cuda_py_test( ":state_ops", ":state_ops_gen", ], - main = "ops/accumulate_n_benchmark.py", - python_version = "PY3", - shard_count = 6, ) cuda_py_test( name = "batch_norm_benchmark", srcs = ["ops/batch_norm_benchmark.py"], - additional_deps = [ + main = "ops/batch_norm_benchmark.py", + python_version = "PY3", + deps = [ ":array_ops", ":client", ":client_testlib", @@ -6956,14 +6958,14 @@ cuda_py_test( ":random_ops", ":variables", ], - main = "ops/batch_norm_benchmark.py", - python_version = "PY3", ) cuda_py_test( name = "collective_ops_benchmark", srcs = ["ops/collective_ops_benchmark.py"], - additional_deps = [ + main = "ops/collective_ops_benchmark.py", + python_version = "PY3", + deps = [ ":array_ops", ":client", ":client_testlib", @@ -6973,14 +6975,14 @@ cuda_py_test( ":variables", "//tensorflow/core:protos_all_py", ], - main = "ops/collective_ops_benchmark.py", - python_version = "PY3", ) cuda_py_test( name = "concat_benchmark", srcs = ["ops/concat_benchmark.py"], - additional_deps = [ + main = "ops/concat_benchmark.py", + python_version = "PY3", + deps = [ ":array_ops", ":client", ":client_testlib", @@ -6991,29 +6993,29 @@ cuda_py_test( ":variables", "//tensorflow/core:protos_all_py", ], - main = "ops/concat_benchmark.py", - python_version = "PY3", ) cuda_py_test( name = "control_flow_ops_benchmark", srcs = ["ops/control_flow_ops_benchmark.py"], - additional_deps = [ + main = "ops/control_flow_ops_benchmark.py", + python_version = "PY3", + deps = [ ":client_testlib", ":constant_op", ":control_flow_ops", ":framework_ops", "//tensorflow/python/eager:function", ], - main = "ops/control_flow_ops_benchmark.py", - python_version = "PY3", ) cuda_py_test( name = "conv2d_benchmark", size = "large", srcs = ["ops/conv2d_benchmark.py"], - additional_deps = [ + main = "ops/conv2d_benchmark.py", + python_version = "PY3", + deps = [ ":client", ":client_testlib", ":control_flow_ops", @@ -7023,17 +7025,17 @@ cuda_py_test( ":platform_benchmark", ":random_ops", ":variables", - "//third_party/py/numpy", "//tensorflow/core:protos_all_py", + "//third_party/py/numpy", ], - main = "ops/conv2d_benchmark.py", - python_version = "PY3", ) cuda_py_test( name = "split_benchmark", srcs = ["ops/split_benchmark.py"], - additional_deps = [ + main = "ops/split_benchmark.py", + python_version = "PY3", + deps = [ ":array_ops", ":client", ":client_testlib", @@ -7042,18 +7044,18 @@ cuda_py_test( ":platform", ":platform_benchmark", ":variables", - "//third_party/py/numpy", "//tensorflow/core:protos_all_py", + "//third_party/py/numpy", ], - main = "ops/split_benchmark.py", - python_version = "PY3", ) cuda_py_test( name = "transpose_benchmark", size = "medium", srcs = ["ops/transpose_benchmark.py"], - additional_deps = [ + main = "ops/transpose_benchmark.py", + python_version = "PY3", + deps = [ ":array_ops", ":client", ":client_testlib", @@ -7062,20 +7064,18 @@ cuda_py_test( ":platform", ":platform_benchmark", ":variables", - "//third_party/py/numpy", "//tensorflow/core:protos_all_py", + "//third_party/py/numpy", ], - main = "ops/transpose_benchmark.py", - python_version = "PY3", ) cuda_py_test( name = "matmul_benchmark", size = "medium", srcs = ["ops/matmul_benchmark.py"], - additional_deps = [":matmul_benchmark_main_lib"], main = "ops/matmul_benchmark.py", python_version = "PY3", + deps = [":matmul_benchmark_main_lib"], ) py_library( @@ -7101,7 +7101,10 @@ py_library( cuda_py_test( name = "session_benchmark", srcs = ["client/session_benchmark.py"], - additional_deps = [ + grpc_enabled = True, + main = "client/session_benchmark.py", + python_version = "PY3", + deps = [ ":array_ops", ":client", ":client_testlib", @@ -7111,23 +7114,20 @@ cuda_py_test( ":variables", "//third_party/py/numpy", ], - grpc_enabled = True, - main = "client/session_benchmark.py", - python_version = "PY3", ) cuda_py_test( name = "nn_grad_test", size = "small", srcs = ["ops/nn_grad_test.py"], - additional_deps = [ + python_version = "PY3", + deps = [ ":client_testlib", ":framework_for_generated_wrappers", ":nn_grad", ":nn_ops", "//third_party/py/numpy", ], - python_version = "PY3", ) py_library( @@ -7204,13 +7204,6 @@ cuda_py_test( srcs = [ "grappler/cluster_test.py", ], - additional_deps = [ - ":client_testlib", - ":framework_for_generated_wrappers", - ":tf_cluster", - ":tf_item", - "//tensorflow/core:protos_all_py", - ], python_version = "PY3", shard_count = 10, tags = [ @@ -7220,6 +7213,13 @@ cuda_py_test( ], # This test will not run on XLA because it primarily tests the TF Classic flow. xla_enable_strict_auto_jit = False, + deps = [ + ":client_testlib", + ":framework_for_generated_wrappers", + ":tf_cluster", + ":tf_item", + "//tensorflow/core:protos_all_py", + ], ) py_library( @@ -7318,22 +7318,22 @@ cuda_py_test( srcs = [ "grappler/constant_folding_test.py", ], - additional_deps = [ - ":client_testlib", - ":framework_for_generated_wrappers", - ":array_ops", - ":control_flow_ops", - ":dtypes", - ":functional_ops", - ":math_ops", - ":ops", - "//third_party/py/numpy", - "//tensorflow/core:protos_all_py", - ], python_version = "PY3", tags = [ "grappler", ], + deps = [ + ":array_ops", + ":client_testlib", + ":control_flow_ops", + ":dtypes", + ":framework_for_generated_wrappers", + ":functional_ops", + ":math_ops", + ":ops", + "//tensorflow/core:protos_all_py", + "//third_party/py/numpy", + ], ) # TODO(b/131764887) Remove once LayoutOptimizer is swapped out with GenericLayoutOptimizer. @@ -7461,21 +7461,6 @@ cuda_py_test( srcs = [ "grappler/auto_mixed_precision_test.py", ], - additional_deps = [ - ":client_testlib", - ":framework_for_generated_wrappers", - ":array_ops", - ":constant_op", - ":dtypes", - ":math_ops", - ":nn", - ":ops", - ":random_ops", - ":control_flow_ops", - ":training", - "//third_party/py/numpy", - "//tensorflow/core:protos_all_py", - ], python_version = "PY3", tags = [ "grappler", @@ -7483,6 +7468,21 @@ cuda_py_test( ], # This test analyzes the graph, but XLA changes the names of nodes. xla_enable_strict_auto_jit = False, + deps = [ + ":array_ops", + ":client_testlib", + ":constant_op", + ":control_flow_ops", + ":dtypes", + ":framework_for_generated_wrappers", + ":math_ops", + ":nn", + ":ops", + ":random_ops", + ":training", + "//tensorflow/core:protos_all_py", + "//third_party/py/numpy", + ], ) tf_gen_op_wrapper_private_py( @@ -7513,13 +7513,6 @@ cuda_py_test( name = "nccl_ops_test", size = "small", srcs = ["ops/nccl_ops_test.py"], - additional_deps = [ - ":nccl_ops", - ":array_ops", - ":client_testlib", - ":framework_test_lib", - ":platform_test", - ], python_version = "PY3", # Disabled on jenkins until errors finding nvmlShutdown are found. tags = [ @@ -7529,6 +7522,13 @@ cuda_py_test( "noguitar", "notap", ], + deps = [ + ":array_ops", + ":client_testlib", + ":framework_test_lib", + ":nccl_ops", + ":platform_test", + ], ) tf_gen_op_wrapper_private_py( @@ -7606,8 +7606,8 @@ py_test( cuda_py_test( name = "raw_ops_test", srcs = ["ops/raw_ops_test.py"], - additional_deps = [ + python_version = "PY3", + deps = [ "//tensorflow/python:client_testlib", ], - python_version = "PY3", ) diff --git a/tensorflow/python/compiler/tensorrt/BUILD b/tensorflow/python/compiler/tensorrt/BUILD index a9727726ef9..791efafd216 100644 --- a/tensorflow/python/compiler/tensorrt/BUILD +++ b/tensorflow/python/compiler/tensorrt/BUILD @@ -79,21 +79,6 @@ py_library( cuda_py_test( name = "trt_convert_test", srcs = ["trt_convert_test.py"], - additional_deps = [ - ":trt_convert_py", - "@absl_py//absl/testing:parameterized", - "//tensorflow/python:client_testlib", - "//tensorflow/python:framework_test_lib", - "//tensorflow/python:graph_util", - "//tensorflow/python/saved_model:builder", - "//tensorflow/python/saved_model:loader", - "//tensorflow/python/saved_model:signature_constants", - "//tensorflow/python/saved_model:signature_def_utils", - "//tensorflow/python/saved_model:tag_constants", - "//tensorflow/python/saved_model:utils", - "//tensorflow/python/tools:freeze_graph_lib", - "//tensorflow/python/tools:saved_model_utils", - ], data = [ "test/testdata/tftrt_2.0_saved_model/saved_model.pb", "test/testdata/tftrt_2.0_saved_model/variables/variables.data-00000-of-00002", @@ -108,6 +93,21 @@ cuda_py_test( "no_windows", "nomac", ], + deps = [ + ":trt_convert_py", + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework_test_lib", + "//tensorflow/python:graph_util", + "//tensorflow/python/saved_model:builder", + "//tensorflow/python/saved_model:loader", + "//tensorflow/python/saved_model:signature_constants", + "//tensorflow/python/saved_model:signature_def_utils", + "//tensorflow/python/saved_model:tag_constants", + "//tensorflow/python/saved_model:utils", + "//tensorflow/python/tools:freeze_graph_lib", + "//tensorflow/python/tools:saved_model_utils", + "@absl_py//absl/testing:parameterized", + ], ) cuda_py_tests( @@ -171,13 +171,6 @@ cuda_py_tests( cuda_py_test( name = "quantization_mnist_test", srcs = ["test/quantization_mnist_test.py"], - additional_deps = [ - ":tf_trt_integration_test_base", - "//tensorflow/python:client_testlib", - "//tensorflow/python:framework_test_lib", - "//tensorflow/python/keras:keras", - "//tensorflow/python/estimator:estimator", - ], data = [ "test/testdata/mnist/checkpoint", "test/testdata/mnist/model.ckpt-46900.data-00000-of-00001", @@ -193,4 +186,11 @@ cuda_py_test( "no_windows", "nomac", ], + deps = [ + ":tf_trt_integration_test_base", + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework_test_lib", + "//tensorflow/python/estimator", + "//tensorflow/python/keras", + ], ) diff --git a/tensorflow/python/compiler/xla/BUILD b/tensorflow/python/compiler/xla/BUILD index 381635c416d..2061f0cca2f 100644 --- a/tensorflow/python/compiler/xla/BUILD +++ b/tensorflow/python/compiler/xla/BUILD @@ -24,9 +24,9 @@ cuda_py_test( name = "jit_test", size = "small", srcs = ["jit_test.py"], - additional_deps = [ + xla_enabled = True, + deps = [ ":compiler_py", - "//third_party/py/numpy", "//tensorflow/python:array_ops", "//tensorflow/python:client", "//tensorflow/python:client_testlib", @@ -40,8 +40,8 @@ cuda_py_test( "//tensorflow/python:random_ops", "//tensorflow/python:variable_scope", "//tensorflow/python:variables", + "//third_party/py/numpy", ], - xla_enabled = True, ) py_library( @@ -68,26 +68,26 @@ py_library( cuda_py_test( name = "xla_test", srcs = ["xla_test.py"], - additional_deps = [ - ":xla", - "@absl_py//absl/testing:parameterized", - "//tensorflow/compiler/tests:xla_test", - "//tensorflow/python/tpu:tpu_lib", - "//tensorflow/python:client_testlib", - "//tensorflow/python:constant_op", - "//tensorflow/python:control_flow_ops", - "//tensorflow/python:control_flow_util", - "//tensorflow/python:math_ops", - "//tensorflow/python/estimator:estimator_py", - "//tensorflow/python:platform", - "//tensorflow/python:state_ops", - "//tensorflow/python:summary", - "//tensorflow/python:variable_scope", - ], tags = [ "no_mac", "no_rocm", # XLA support is not enabled on the ROCm platform "no_windows", ], xla_enabled = True, + deps = [ + ":xla", + "//tensorflow/compiler/tests:xla_test", + "//tensorflow/python:client_testlib", + "//tensorflow/python:constant_op", + "//tensorflow/python:control_flow_ops", + "//tensorflow/python:control_flow_util", + "//tensorflow/python:math_ops", + "//tensorflow/python:platform", + "//tensorflow/python:state_ops", + "//tensorflow/python:summary", + "//tensorflow/python:variable_scope", + "//tensorflow/python/estimator:estimator_py", + "//tensorflow/python/tpu:tpu_lib", + "@absl_py//absl/testing:parameterized", + ], ) diff --git a/tensorflow/python/data/experimental/kernel_tests/BUILD b/tensorflow/python/data/experimental/kernel_tests/BUILD index 7e9b52e43de..d21241d900c 100644 --- a/tensorflow/python/data/experimental/kernel_tests/BUILD +++ b/tensorflow/python/data/experimental/kernel_tests/BUILD @@ -80,20 +80,20 @@ cuda_py_test( name = "copy_to_device_test", size = "small", srcs = ["copy_to_device_test.py"], - additional_deps = [ - "//tensorflow/python/data/experimental/ops:prefetching_ops", + tags = ["no_windows_gpu"], + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:client_testlib", - "//tensorflow/python/data/kernel_tests:test_base", "//tensorflow/python:dtypes", "//tensorflow/python:framework_ops", "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", - "//tensorflow/python/compat:compat", + "//tensorflow/python/compat", + "//tensorflow/python/data/experimental/ops:prefetching_ops", + "//tensorflow/python/data/kernel_tests:test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:iterator_ops", ], - tags = ["no_windows_gpu"], ) tf_py_test( @@ -497,17 +497,17 @@ cuda_py_test( name = "prefetch_to_device_test", size = "small", srcs = ["prefetch_to_device_test.py"], - additional_deps = [ - "//tensorflow/python/data/experimental/ops:prefetching_ops", + tags = ["no_windows_gpu"], + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:client_testlib", - "//tensorflow/python/data/kernel_tests:test_base", "//tensorflow/python:dtypes", "//tensorflow/python:framework_ops", "//tensorflow/python:framework_test_lib", + "//tensorflow/python/data/experimental/ops:prefetching_ops", + "//tensorflow/python/data/kernel_tests:test_base", "//tensorflow/python/data/ops:dataset_ops", ], - tags = ["no_windows_gpu"], ) tf_py_test( @@ -624,8 +624,8 @@ cuda_py_test( name = "scan_test", size = "small", srcs = ["scan_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = ["no_pip"], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:constant_op", @@ -641,8 +641,8 @@ cuda_py_test( "//tensorflow/python/data/kernel_tests:test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/eager:context", + "//third_party/py/numpy", ], - tags = ["no_pip"], ) tf_py_test( @@ -829,7 +829,7 @@ cuda_py_test( name = "wrap_unwrap_test", size = "small", srcs = ["wrap_unwrap_test.py"], - additional_deps = [ + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python/data/kernel_tests:test_base", "//tensorflow/python/data/ops:dataset_ops", diff --git a/tensorflow/python/data/kernel_tests/BUILD b/tensorflow/python/data/kernel_tests/BUILD index db749da77f8..65f8f9a80f7 100644 --- a/tensorflow/python/data/kernel_tests/BUILD +++ b/tensorflow/python/data/kernel_tests/BUILD @@ -316,17 +316,10 @@ cuda_py_test( name = "iterator_test", size = "medium", srcs = ["iterator_test.py"], - additional_deps = [ + grpc_enabled = True, + deps = [ ":test_base", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", - "//tensorflow/python/data/ops:readers", "//tensorflow/core:protos_all_py", - "//tensorflow/python/data/ops:dataset_ops", - "//tensorflow/python/data/ops:iterator_ops", - "//tensorflow/python/data/util:structure", - "//tensorflow/python/eager:context", - "//tensorflow/python/training/tracking:util", "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:constant_op", @@ -347,11 +340,18 @@ cuda_py_test( "//tensorflow/python:sparse_tensor", "//tensorflow/python:tensor_shape", "//tensorflow/python:training", - "//tensorflow/python/compat:compat", "//tensorflow/python:util", "//tensorflow/python:variables", + "//tensorflow/python/compat", + "//tensorflow/python/data/ops:dataset_ops", + "//tensorflow/python/data/ops:iterator_ops", + "//tensorflow/python/data/ops:readers", + "//tensorflow/python/data/util:structure", + "//tensorflow/python/eager:context", + "//tensorflow/python/training/tracking:util", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], - grpc_enabled = True, ) tf_py_test( @@ -408,25 +408,25 @@ cuda_py_test( name = "multi_device_iterator_test", size = "medium", srcs = ["multi_device_iterator_test.py"], - additional_deps = [ + tags = [ + "no_gpu", #TODO(b/141255188): Enable test after bug is resolved. + "no_oss", + "no_windows_gpu", + ], + deps = [ ":test_base", - "@absl_py//absl/testing:parameterized", "//tensorflow/core:protos_all_py", - "//tensorflow/python/data/ops:dataset_ops", - "//tensorflow/python/data/ops:multi_device_iterator_ops", - "//tensorflow/python/data/ops:iterator_ops", - "//tensorflow/python/data/experimental/ops:testing", - "//tensorflow/python/data/experimental/ops:optimization_options", "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:dtypes", "//tensorflow/python:errors", "//tensorflow/python:framework_test_lib", - ], - tags = [ - "no_gpu", #TODO(b/141255188): Enable test after bug is resolved. - "no_oss", - "no_windows_gpu", + "//tensorflow/python/data/experimental/ops:optimization_options", + "//tensorflow/python/data/experimental/ops:testing", + "//tensorflow/python/data/ops:dataset_ops", + "//tensorflow/python/data/ops:iterator_ops", + "//tensorflow/python/data/ops:multi_device_iterator_ops", + "@absl_py//absl/testing:parameterized", ], ) @@ -434,16 +434,16 @@ cuda_py_test( name = "memory_cleanup_test", size = "medium", srcs = ["memory_cleanup_test.py"], - additional_deps = [ + tags = ["notsan"], # b/144706539 + deps = [ ":test_base", - "@absl_py//absl/testing:parameterized", "//tensorflow/core:protos_all_py", - "//tensorflow/python/data/ops:dataset_ops", - "//tensorflow/python/data/ops:multi_device_iterator_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_test_lib", + "//tensorflow/python/data/ops:dataset_ops", + "//tensorflow/python/data/ops:multi_device_iterator_ops", + "@absl_py//absl/testing:parameterized", ], - tags = ["notsan"], # b/144706539 ) tf_py_test( @@ -467,20 +467,20 @@ cuda_py_test( name = "optional_test", size = "small", srcs = ["optional_test.py"], - additional_deps = [ + deps = [ ":test_base", - "@absl_py//absl/testing:parameterized", - "//tensorflow/python/data/ops:dataset_ops", - "//tensorflow/python/data/ops:iterator_ops", - "//tensorflow/python/data/ops:optional_ops", - "//tensorflow/python:client_testlib", "//tensorflow/python:array_ops", + "//tensorflow/python:client_testlib", "//tensorflow/python:constant_op", "//tensorflow/python:dtypes", "//tensorflow/python:errors", "//tensorflow/python:framework_ops", "//tensorflow/python:framework_test_lib", "//tensorflow/python:tensor_shape", + "//tensorflow/python/data/ops:dataset_ops", + "//tensorflow/python/data/ops:iterator_ops", + "//tensorflow/python/data/ops:optional_ops", + "@absl_py//absl/testing:parameterized", ], ) @@ -550,17 +550,17 @@ cuda_py_test( name = "reduce_test", size = "small", srcs = ["reduce_test.py"], - additional_deps = [ + deps = [ ":test_base", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:dtypes", "//tensorflow/python:math_ops", - "//tensorflow/python/data/experimental/ops:testing", "//tensorflow/python:sparse_tensor", + "//tensorflow/python/data/experimental/ops:testing", "//tensorflow/python/data/ops:dataset_ops", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], ) diff --git a/tensorflow/python/debug/BUILD b/tensorflow/python/debug/BUILD index 43592e63fa8..c3b49e7564a 100644 --- a/tensorflow/python/debug/BUILD +++ b/tensorflow/python/debug/BUILD @@ -695,36 +695,21 @@ cuda_py_test( name = "check_numerics_callback_test", size = "medium", srcs = ["lib/check_numerics_callback_test.py"], - additional_deps = [ + python_version = "PY3", + deps = [ ":check_numerics_callback", - "//third_party/py/numpy", "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", "//tensorflow/python:variables", + "//third_party/py/numpy", ], - python_version = "PY3", ) cuda_py_test( name = "distributed_callbacks_test", size = "medium", srcs = ["lib/distributed_callbacks_test.py"], - additional_deps = [ - ":check_numerics_callback", - ":debug_events_writer", - ":dumping_callback", - ":dumping_callback_test_lib", - "//third_party/py/numpy", - "//tensorflow/python:framework_test_lib", - "//tensorflow/python:math_ops", - "//tensorflow/python:platform_test", - "//tensorflow/python:variables", - "//tensorflow/python/distribute:combinations", - "//tensorflow/python/distribute:mirrored_strategy", - "//tensorflow/python/distribute:strategy_combinations", - "//tensorflow/python/keras", - ], python_version = "PY3", shard_count = 4, tags = [ @@ -735,41 +720,59 @@ cuda_py_test( "no_windows_gpu", # TODO(b/130551176) ], xla_enable_strict_auto_jit = False, # Node names are different with autojit + deps = [ + ":check_numerics_callback", + ":debug_events_writer", + ":dumping_callback", + ":dumping_callback_test_lib", + "//tensorflow/python:framework_test_lib", + "//tensorflow/python:math_ops", + "//tensorflow/python:platform_test", + "//tensorflow/python:variables", + "//tensorflow/python/distribute:combinations", + "//tensorflow/python/distribute:mirrored_strategy", + "//tensorflow/python/distribute:strategy_combinations", + "//tensorflow/python/keras", + "//third_party/py/numpy", + ], ) cuda_py_test( name = "dumping_callback_test", size = "medium", srcs = ["lib/dumping_callback_test.py"], - additional_deps = [ - ":debug_events_reader", - ":debug_events_writer", - ":dumping_callback", - ":dumping_callback_test_lib", - "//third_party/py/numpy", - "//tensorflow/python:framework_test_lib", - "//tensorflow/python:math_ops", - "//tensorflow/python:platform_test", - "//tensorflow/python:variables", - "//tensorflow/python/keras", - ], python_version = "PY3", shard_count = 8, tags = [ "no_windows", # TODO(b/142475891): Enable this test on Windows. ], xla_enable_strict_auto_jit = False, # Node names are different with autojit + deps = [ + ":debug_events_reader", + ":debug_events_writer", + ":dumping_callback", + ":dumping_callback_test_lib", + "//tensorflow/python:framework_test_lib", + "//tensorflow/python:math_ops", + "//tensorflow/python:platform_test", + "//tensorflow/python:variables", + "//tensorflow/python/keras", + "//third_party/py/numpy", + ], ) cuda_py_test( name = "debug_v2_ops_test", size = "medium", srcs = ["lib/debug_v2_ops_test.py"], - additional_deps = [ + python_version = "PY3", + tags = [ + "no_windows", # b/142475891 + ], + deps = [ ":debug_events_reader", ":debug_events_writer", ":dumping_callback_test_lib", - "//third_party/py/numpy", "//tensorflow/python:debug_ops_gen", "//tensorflow/python:framework_test_lib", "//tensorflow/python:gradients", @@ -779,10 +782,7 @@ cuda_py_test( "//tensorflow/python:variables", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/keras", - ], - python_version = "PY3", - tags = [ - "no_windows", # b/142475891 + "//third_party/py/numpy", ], ) @@ -790,7 +790,9 @@ cuda_py_test( name = "debug_gradients_test", size = "small", srcs = ["lib/debug_gradients_test.py"], - additional_deps = [ + python_version = "PY3", + xla_enable_strict_auto_jit = False, # Node names are different with autojit + deps = [ ":debug_data", ":debug_gradients", ":debug_utils", @@ -802,8 +804,6 @@ cuda_py_test( "//tensorflow/python:training", "//tensorflow/python:variables", ], - python_version = "PY3", - xla_enable_strict_auto_jit = False, # Node names are different with autojit ) py_test( @@ -1030,7 +1030,9 @@ cuda_py_test( name = "debug_grappler_test", size = "small", srcs = ["lib/debug_grappler_test.py"], - additional_deps = [ + python_version = "PY3", + xla_enable_strict_auto_jit = False, # Tests TF:Classic implementation. + deps = [ ":debug_data", ":debug_utils", "//tensorflow/python:client", @@ -1039,15 +1041,16 @@ cuda_py_test( "//tensorflow/python:platform_test", "//tensorflow/python:variables", ], - python_version = "PY3", - xla_enable_strict_auto_jit = False, # Tests TF:Classic implementation. ) cuda_py_test( name = "session_debug_file_test", size = "small", srcs = ["lib/session_debug_file_test.py"], - additional_deps = [ + python_version = "PY3", + tags = ["notsan"], + xla_enable_strict_auto_jit = False, # Node names are different with autojit + deps = [ ":debug_data", ":debug_utils", ":session_debug_testlib", @@ -1057,16 +1060,15 @@ cuda_py_test( "//tensorflow/python:platform_test", "//tensorflow/python:variables", ], - python_version = "PY3", - tags = ["notsan"], - xla_enable_strict_auto_jit = False, # Node names are different with autojit ) cuda_py_test( name = "debug_graph_reconstruction_test", size = "small", srcs = ["lib/debug_graph_reconstruction_test.py"], - additional_deps = [ + python_version = "PY3", + xla_enable_strict_auto_jit = False, # Node names are different with autojit + deps = [ ":debug_data", ":debug_utils", "//tensorflow/python:client", @@ -1077,15 +1079,16 @@ cuda_py_test( "//tensorflow/python:training", "//tensorflow/python:variables", ], - python_version = "PY3", - xla_enable_strict_auto_jit = False, # Node names are different with autojit ) cuda_py_test( name = "session_debug_multi_gpu_test", size = "small", srcs = ["lib/session_debug_multi_gpu_test.py"], - additional_deps = [ + python_version = "PY3", + tags = ["no_windows_gpu"], + xla_enable_strict_auto_jit = False, # Node names are different with autojit + deps = [ ":debug_data", ":debug_utils", "//tensorflow/python:client", @@ -1095,9 +1098,6 @@ cuda_py_test( "//tensorflow/python:platform_test", "//tensorflow/python:variables", ], - python_version = "PY3", - tags = ["no_windows_gpu"], - xla_enable_strict_auto_jit = False, # Node names are different with autojit ) py_test( @@ -1205,7 +1205,10 @@ cuda_py_test( name = "analyzer_cli_test", size = "small", srcs = ["cli/analyzer_cli_test.py"], - additional_deps = [ + python_version = "PY3", + tags = ["no_windows"], # TODO: needs investigation on Windows + xla_enable_strict_auto_jit = False, # Node names are different with autojit + deps = [ ":analyzer_cli", ":cli_config", ":cli_test_utils", @@ -1214,8 +1217,6 @@ cuda_py_test( ":debug_utils", ":debugger_cli_common", ":source_utils", - "//third_party/py/numpy", - "@six_archive//:six", "//tensorflow:tensorflow_py", "//tensorflow/python:array_ops", "//tensorflow/python:client", @@ -1227,10 +1228,9 @@ cuda_py_test( "//tensorflow/python:platform_test", "//tensorflow/python:util", "//tensorflow/python:variables", + "//third_party/py/numpy", + "@six_archive//:six", ], - python_version = "PY3", - tags = ["no_windows"], # TODO: needs investigation on Windows - xla_enable_strict_auto_jit = False, # Node names are different with autojit ) py_test( @@ -1258,7 +1258,15 @@ cuda_py_test( name = "session_debug_grpc_test", size = "medium", srcs = ["lib/session_debug_grpc_test.py"], - additional_deps = [ + python_version = "PY3", + tags = [ + "no_oss", # Test flaky due to port collisions. + "no_windows", + "notsan", + "oss_serial", + ], + xla_enable_strict_auto_jit = False, # Node names are different with autojit + deps = [ ":debug_data", ":debug_utils", ":dumping_wrapper", @@ -1273,32 +1281,12 @@ cuda_py_test( "//tensorflow/python:platform_test", "//tensorflow/python:variables", ], - python_version = "PY3", - tags = [ - "no_oss", # Test flaky due to port collisions. - "no_windows", - "notsan", - "oss_serial", - ], - xla_enable_strict_auto_jit = False, # Node names are different with autojit ) cuda_py_test( name = "grpc_large_data_test", size = "medium", srcs = ["lib/grpc_large_data_test.py"], - additional_deps = [ - ":dumping_wrapper", - ":grpc_debug_test_server", - ":grpc_wrapper", - ":session_debug_testlib", - "//third_party/py/numpy", - "//tensorflow/python:client", - "//tensorflow/python:client_testlib", - "//tensorflow/python:framework_for_generated_wrappers", - "//tensorflow/python:platform_test", - "//tensorflow/python:variables", - ], python_version = "PY3", tags = [ "no_oss", # Test flaky due to port collisions. @@ -1308,6 +1296,18 @@ cuda_py_test( "oss_serial", ], xla_enable_strict_auto_jit = False, # Node names are different with autojit + deps = [ + ":dumping_wrapper", + ":grpc_debug_test_server", + ":grpc_wrapper", + ":session_debug_testlib", + "//tensorflow/python:client", + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework_for_generated_wrappers", + "//tensorflow/python:platform_test", + "//tensorflow/python:variables", + "//third_party/py/numpy", + ], ) # TODO(cais): Run the test in OSS, perhaps through a sh_test. @@ -1315,7 +1315,15 @@ cuda_py_test( name = "dist_session_debug_grpc_test", size = "medium", srcs = ["lib/dist_session_debug_grpc_test.py"], - additional_deps = [ + grpc_enabled = True, + python_version = "PY3", + tags = [ + "no_oss", # Incompatible with bazel_pip. + "no_windows", + "notsan", + ], + xla_enable_strict_auto_jit = False, # Node names are different with autojit + deps = [ ":debug_data", ":debug_utils", ":dumping_wrapper", @@ -1329,14 +1337,6 @@ cuda_py_test( "//tensorflow/python:platform_test", "//tensorflow/python:variables", ], - grpc_enabled = True, - python_version = "PY3", - tags = [ - "no_oss", # Incompatible with bazel_pip. - "no_windows", - "notsan", - ], - xla_enable_strict_auto_jit = False, # Node names are different with autojit ) py_test( diff --git a/tensorflow/python/distribute/BUILD b/tensorflow/python/distribute/BUILD index 758aced99f4..be35886114d 100644 --- a/tensorflow/python/distribute/BUILD +++ b/tensorflow/python/distribute/BUILD @@ -113,7 +113,7 @@ py_library( cuda_py_test( name = "device_util_test", srcs = ["device_util_test.py"], - additional_deps = [ + deps = [ ":device_util", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_ops", @@ -410,14 +410,13 @@ cuda_py_test( srcs = [ "multi_worker_continuous_run_test.py", ], - additional_deps = [ + deps = [ ":collective_all_reduce_strategy", ":multi_process_runner", ":reduce_util", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", "//tensorflow/python:array_ops", "//tensorflow/python:errors", + "//tensorflow/python:framework_ops", "//tensorflow/python:math_ops", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/distribute:combinations", @@ -425,7 +424,8 @@ cuda_py_test( "//tensorflow/python/distribute:strategy_combinations", "//tensorflow/python/eager:context", "//tensorflow/python/eager:test", - "//tensorflow/python:framework_ops", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], ) @@ -487,17 +487,17 @@ py_library( cuda_py_test( name = "input_ops_test", srcs = ["input_ops_test.py"], - additional_deps = [ + deps = [ ":input_ops", - "//tensorflow/python/data/ops:dataset_ops", - "//tensorflow/python/data/ops:readers", - "//tensorflow/python/data/util:structure", - "//tensorflow/python:errors", "//tensorflow/python:client_testlib", + "//tensorflow/python:errors", "//tensorflow/python:framework_ops", "//tensorflow/python:framework_test_lib", "//tensorflow/python:io_ops", "//tensorflow/python:util", + "//tensorflow/python/data/ops:dataset_ops", + "//tensorflow/python/data/ops:readers", + "//tensorflow/python/data/util:structure", ], ) @@ -704,17 +704,17 @@ cuda_py_test( name = "checkpoint_utils_test", size = "medium", srcs = ["checkpoint_utils_test.py"], - additional_deps = [ - "//tensorflow/python/distribute:combinations", - "//tensorflow/python/distribute:strategy_combinations", + tags = [ + "multi_and_single_gpu", + ], + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_ops", "//tensorflow/python:training", "//tensorflow/python:variable_scope", "//tensorflow/python:variables", - ], - tags = [ - "multi_and_single_gpu", + "//tensorflow/python/distribute:combinations", + "//tensorflow/python/distribute:strategy_combinations", ], ) @@ -764,54 +764,54 @@ distribute_py_test( cuda_py_test( name = "cross_device_utils_test", srcs = ["cross_device_utils_test.py"], - additional_deps = [ - "//tensorflow/python/distribute:combinations", - "//tensorflow/python/distribute:strategy_combinations", - "@absl_py//absl/testing:parameterized", + deps = [ "//tensorflow/python:constant_op", "//tensorflow/python:framework_ops", "//tensorflow/python:math_ops", + "//tensorflow/python/distribute:combinations", "//tensorflow/python/distribute:cross_device_utils", + "//tensorflow/python/distribute:strategy_combinations", "//tensorflow/python/eager:context", "//tensorflow/python/eager:test", + "@absl_py//absl/testing:parameterized", ], ) cuda_py_test( name = "cross_device_ops_test", srcs = ["cross_device_ops_test.py"], - additional_deps = [ + tags = [ + # TODO(b/138143527): Re-enable after fixing Guitar failure. + # "multi_and_single_gpu", + ], + deps = [ ":collective_all_reduce_strategy", - "//tensorflow/python/distribute:combinations", - "//tensorflow/python/distribute:strategy_combinations", - "//tensorflow/python/distribute:multi_worker_test_base", ":mirrored_strategy", - "@absl_py//absl/testing:parameterized", "//tensorflow/python:array_ops", "//tensorflow/python:constant_op", "//tensorflow/python:framework_ops", "//tensorflow/python:math_ops", + "//tensorflow/python/distribute:combinations", "//tensorflow/python/distribute:cross_device_ops", + "//tensorflow/python/distribute:multi_worker_test_base", + "//tensorflow/python/distribute:strategy_combinations", "//tensorflow/python/distribute:values", "//tensorflow/python/eager:context", "//tensorflow/python/eager:test", - ], - tags = [ - # TODO(b/138143527): Re-enable after fixing Guitar failure. - # "multi_and_single_gpu", + "@absl_py//absl/testing:parameterized", ], ) cuda_py_test( name = "one_device_strategy_test", srcs = ["one_device_strategy_test.py"], - additional_deps = [ + grpc_enabled = True, + deps = [ ":strategy_test_lib", "//tensorflow/python/distribute:combinations", "//tensorflow/python/distribute:strategy_combinations", "//tensorflow/python/eager:test", ], - grpc_enabled = True, ) py_library( @@ -1014,24 +1014,24 @@ cuda_py_test( name = "warm_starting_util_test", size = "medium", srcs = ["warm_starting_util_test.py"], - additional_deps = [ - "//tensorflow/python/distribute:combinations", - "//tensorflow/python/distribute:strategy_combinations", + tags = [ + "multi_and_single_gpu", + ], + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_ops", "//tensorflow/python:training", "//tensorflow/python:variable_scope", "//tensorflow/python:variables", - ], - tags = [ - "multi_and_single_gpu", + "//tensorflow/python/distribute:combinations", + "//tensorflow/python/distribute:strategy_combinations", ], ) cuda_py_test( name = "remote_mirrored_strategy_eager_test", srcs = ["remote_mirrored_strategy_eager_test.py"], - additional_deps = [ + deps = [ ":combinations", ":mirrored_strategy", ":multi_worker_test_base", @@ -1054,27 +1054,6 @@ cuda_py_test( cuda_py_test( name = "mirrored_strategy_test", srcs = ["mirrored_strategy_test.py"], - additional_deps = [ - ":combinations", - ":strategy_combinations", - ":mirrored_strategy", - ":multi_worker_test_base", - ":strategy_test_lib", - "//tensorflow/core:protos_all_py", - "//tensorflow/python:array_ops", - "//tensorflow/python/autograph/core:test_lib", - "//tensorflow/python:constant_op", - "//tensorflow/python:framework_test_lib", - "//tensorflow/python:layers", - "//tensorflow/python:state_ops", - "//tensorflow/python:tensor_shape", - "//tensorflow/python:tensor_util", - "//tensorflow/python:variable_scope", - "//tensorflow/python/distribute:distribute_lib", - "//tensorflow/python/distribute:values", - "//tensorflow/python/eager:context", - "//tensorflow/python/eager:test", - ], shard_count = 5, tags = [ "guitar", @@ -1082,12 +1061,37 @@ cuda_py_test( "no_rocm", "no_windows_gpu", # TODO(b/130551176) ], + deps = [ + ":combinations", + ":mirrored_strategy", + ":multi_worker_test_base", + ":strategy_combinations", + ":strategy_test_lib", + "//tensorflow/core:protos_all_py", + "//tensorflow/python:array_ops", + "//tensorflow/python:constant_op", + "//tensorflow/python:framework_test_lib", + "//tensorflow/python:layers", + "//tensorflow/python:state_ops", + "//tensorflow/python:tensor_shape", + "//tensorflow/python:tensor_util", + "//tensorflow/python:variable_scope", + "//tensorflow/python/autograph/core:test_lib", + "//tensorflow/python/distribute:distribute_lib", + "//tensorflow/python/distribute:values", + "//tensorflow/python/eager:context", + "//tensorflow/python/eager:test", + ], ) cuda_py_test( name = "mirrored_variable_test", srcs = ["mirrored_variable_test.py"], - additional_deps = [ + tags = [ + "guitar", + "multi_and_single_gpu", + ], + deps = [ ":collective_all_reduce_strategy", ":combinations", ":strategy_combinations", @@ -1103,10 +1107,6 @@ cuda_py_test( "//tensorflow/python/eager:context", "//tensorflow/python/eager:test", ], - tags = [ - "guitar", - "multi_and_single_gpu", - ], ) distribute_py_test( @@ -1255,14 +1255,16 @@ distribute_py_test( cuda_py_test( name = "collective_all_reduce_strategy_test", srcs = ["collective_all_reduce_strategy_test.py"], - additional_deps = [ + tags = [ + "multi_and_single_gpu", + ], + xla_enable_strict_auto_jit = False, + deps = [ ":collective_all_reduce_strategy", ":combinations", - ":strategy_combinations", ":multi_worker_test_base", + ":strategy_combinations", ":strategy_test_lib", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", "//tensorflow/core:protos_all_py", "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", @@ -1278,24 +1280,27 @@ cuda_py_test( "//tensorflow/python/eager:context", "//tensorflow/python/estimator:estimator_py", "//tensorflow/python/keras/mixed_precision/experimental:test_util", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], - tags = [ - "multi_and_single_gpu", - ], - xla_enable_strict_auto_jit = False, ) cuda_py_test( name = "parameter_server_strategy_test", srcs = ["parameter_server_strategy_test.py"], - additional_deps = [ - ":parameter_server_strategy", + tags = [ + "multi_and_single_gpu", + "no_oss", # TODO(b/133330625) + ], + # b/141096229: Non-atomic AssignAdd + xla_enable_strict_auto_jit = False, + deps = [ ":central_storage_strategy", ":combinations", - ":strategy_combinations", ":multi_worker_test_base", + ":parameter_server_strategy", + ":strategy_combinations", ":strategy_test_lib", - "@absl_py//absl/testing:parameterized", "//tensorflow/core:protos_all_py", "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", @@ -1313,13 +1318,8 @@ cuda_py_test( "//tensorflow/python/distribute:values", "//tensorflow/python/eager:context", "//tensorflow/python/estimator:estimator_py", + "@absl_py//absl/testing:parameterized", ], - tags = [ - "multi_and_single_gpu", - "no_oss", # TODO(b/133330625) - ], - # b/141096229: Non-atomic AssignAdd - xla_enable_strict_auto_jit = False, ) py_library( diff --git a/tensorflow/python/keras/BUILD b/tensorflow/python/keras/BUILD index 37600909f4b..0202c1a16bc 100755 --- a/tensorflow/python/keras/BUILD +++ b/tensorflow/python/keras/BUILD @@ -770,59 +770,59 @@ cuda_py_test( name = "convolutional_test", size = "medium", srcs = ["layers/convolutional_test.py"], - additional_deps = [ - ":keras", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", - "//tensorflow/python:client_testlib", - ], python_version = "PY3", shard_count = 8, + deps = [ + ":keras", + "//tensorflow/python:client_testlib", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", + ], ) cuda_py_test( name = "image_preprocessing_test", size = "medium", srcs = ["layers/preprocessing/image_preprocessing_test.py"], - additional_deps = [ - ":keras", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", - "//tensorflow/python:client_testlib", - ], python_version = "PY3", shard_count = 4, + deps = [ + ":keras", + "//tensorflow/python:client_testlib", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", + ], ) cuda_py_test( name = "convolutional_transpose_test", size = "medium", srcs = ["layers/convolutional_transpose_test.py"], - additional_deps = [ - ":keras", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", - "//tensorflow/python:client_testlib", - ], python_version = "PY3", + deps = [ + ":keras", + "//tensorflow/python:client_testlib", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", + ], ) cuda_py_test( name = "cudnn_recurrent_test", size = "medium", srcs = ["layers/cudnn_recurrent_test.py"], - additional_deps = [ - ":keras", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", - "//tensorflow/python:client_testlib", - ], python_version = "PY3", shard_count = 4, tags = [ "no_rocm", "no_windows_gpu", ], + deps = [ + ":keras", + "//tensorflow/python:client_testlib", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", + ], ) tf_py_test( @@ -902,12 +902,12 @@ cuda_py_test( name = "embeddings_test", size = "medium", srcs = ["layers/embeddings_test.py"], - additional_deps = [ - ":keras", - "@absl_py//absl/testing:parameterized", - "//tensorflow/python:client_testlib", - ], python_version = "PY3", + deps = [ + ":keras", + "//tensorflow/python:client_testlib", + "@absl_py//absl/testing:parameterized", + ], ) tf_py_test( @@ -954,18 +954,18 @@ cuda_py_test( name = "normalization_test", size = "medium", srcs = ["layers/normalization_test.py"], - additional_deps = [ - ":keras", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", - "//tensorflow/python:client_testlib", - ], python_version = "PY3", shard_count = 4, tags = [ "no_rocm", "notsan", ], + deps = [ + ":keras", + "//tensorflow/python:client_testlib", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", + ], ) tf_py_test( @@ -1064,57 +1064,57 @@ cuda_py_test( name = "recurrent_v2_test", size = "medium", srcs = ["layers/recurrent_v2_test.py"], - additional_deps = [ - ":keras", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", - "//tensorflow/python:client_testlib", - ], python_version = "PY3", shard_count = 2, + deps = [ + ":keras", + "//tensorflow/python:client_testlib", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", + ], ) cuda_py_test( name = "separable_convolutional_test", size = "medium", srcs = ["layers/separable_convolutional_test.py"], - additional_deps = [ - ":keras", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", - "//tensorflow/python:client_testlib", - ], python_version = "PY3", + deps = [ + ":keras", + "//tensorflow/python:client_testlib", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", + ], ) cuda_py_test( name = "lstm_v2_test", size = "medium", srcs = ["layers/lstm_v2_test.py"], - additional_deps = [ - ":keras", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", - "//tensorflow/python:client_testlib", - ], python_version = "PY3", shard_count = 12, tags = ["no_rocm"], + deps = [ + ":keras", + "//tensorflow/python:client_testlib", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", + ], ) cuda_py_test( name = "gru_v2_test", size = "medium", srcs = ["layers/gru_v2_test.py"], - additional_deps = [ - ":keras", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", - "//tensorflow/python:client_testlib", - ], python_version = "PY3", shard_count = 12, tags = ["no_rocm"], + deps = [ + ":keras", + "//tensorflow/python:client_testlib", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", + ], ) tf_py_test( @@ -1347,34 +1347,34 @@ tf_py_test( cuda_py_test( name = "multi_gpu_utils_test", srcs = ["utils/multi_gpu_utils_test.py"], - additional_deps = [ - ":keras", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", - "//tensorflow/python:client_testlib", - ], python_version = "PY3", tags = [ "guitar", "multi_gpu", ], xla_enable_strict_auto_jit = False, # b/142744009 + deps = [ + ":keras", + "//tensorflow/python:client_testlib", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", + ], ) cuda_py_test( name = "training_gpu_test", size = "small", srcs = ["engine/training_gpu_test.py"], - additional_deps = [ - ":keras", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", - "//tensorflow/python:client_testlib", - ], python_version = "PY3", tags = [ "nomac", # TODO(mihaimaruseac): b/127695564 ], + deps = [ + ":keras", + "//tensorflow/python:client_testlib", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", + ], ) tf_py_test( diff --git a/tensorflow/python/keras/distribute/BUILD b/tensorflow/python/keras/distribute/BUILD index 486704ff4e4..e22b2cbfd4a 100644 --- a/tensorflow/python/keras/distribute/BUILD +++ b/tensorflow/python/keras/distribute/BUILD @@ -63,7 +63,8 @@ py_library( cuda_py_test( name = "multi_worker_training_state_test", srcs = ["multi_worker_training_state_test.py"], - additional_deps = [ + shard_count = 4, + deps = [ ":multi_worker_testing_utils", ":multi_worker_training_state", "//tensorflow/python:platform", @@ -71,7 +72,6 @@ cuda_py_test( "//tensorflow/python/distribute:multi_worker_test_base", "//tensorflow/python/keras", ], - shard_count = 4, ) py_library( @@ -305,23 +305,27 @@ py_library( cuda_py_test( name = "keras_optimizer_v2_test", srcs = ["keras_optimizer_v2_test.py"], - additional_deps = [ - ":keras_test_lib", - ], shard_count = 4, tags = [ "multi_and_single_gpu", "no_oss", # http://b/119349471 "tf_integration_test", ], + deps = [ + ":keras_test_lib", + ], ) cuda_py_test( name = "multi_worker_test", srcs = ["multi_worker_test.py"], - additional_deps = [ + shard_count = 32, + tags = [ + "no_oss", # TODO(b/130369494): Investigate why it times out on OSS. + # TODO(b/123307453): Add "multi_and_single_gpu", + ], + deps = [ ":multi_worker_testing_utils", - "@absl_py//absl/testing:parameterized", "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:dtypes", @@ -343,28 +347,13 @@ cuda_py_test( "//tensorflow/python/keras:engine", "//tensorflow/python/keras:optimizers", "//tensorflow/python/keras/optimizer_v2", - ], - shard_count = 32, - tags = [ - "no_oss", # TODO(b/130369494): Investigate why it times out on OSS. - # TODO(b/123307453): Add "multi_and_single_gpu", + "@absl_py//absl/testing:parameterized", ], ) cuda_py_test( name = "multi_worker_callback_tf1_test", srcs = ["multi_worker_callback_tf1_test.py"], - additional_deps = [ - ":distribute", - "//tensorflow/python:platform", - "//tensorflow/python/distribute:collective_all_reduce_strategy", - "//tensorflow/python/distribute:combinations", - "//tensorflow/python/distribute:multi_worker_test_base", - "//tensorflow/python/distribute:distribute_config", - "//tensorflow/python/distribute:distribute_coordinator", - ":multi_worker_testing_utils", - "//tensorflow/python/keras", - ], # TODO(b/132384649): Enable for guitar and oss tests. shard_count = 24, tags = [ @@ -373,12 +362,23 @@ cuda_py_test( "noguitar", "notap", ], + deps = [ + ":distribute", + ":multi_worker_testing_utils", + "//tensorflow/python:platform", + "//tensorflow/python/distribute:collective_all_reduce_strategy", + "//tensorflow/python/distribute:combinations", + "//tensorflow/python/distribute:distribute_config", + "//tensorflow/python/distribute:distribute_coordinator", + "//tensorflow/python/distribute:multi_worker_test_base", + "//tensorflow/python/keras", + ], ) cuda_py_test( name = "multi_worker_callback_tf2_test", srcs = ["multi_worker_callback_tf2_test.py"], - additional_deps = [ + deps = [ "//tensorflow/python/distribute:collective_all_reduce_strategy", "//tensorflow/python/distribute:combinations", "//tensorflow/python/distribute:multi_process_runner", @@ -390,42 +390,42 @@ cuda_py_test( cuda_py_test( name = "multi_worker_fault_tolerance_test", srcs = ["multi_worker_fault_tolerance_test.py"], - additional_deps = [ - ":distribute", - "//tensorflow/python:platform", - "//tensorflow/python/distribute:collective_all_reduce_strategy", - "//tensorflow/python/distribute:combinations", - "//tensorflow/python/distribute:multi_worker_test_base", - "//tensorflow/python/distribute:distribute_config", - "//tensorflow/python/distribute:distribute_coordinator", - ":multi_worker_testing_utils", - "//tensorflow/python/keras", - ], shard_count = 14, # TODO(b/132384649): Enable once fixed. tags = [ "no_oss", ], + deps = [ + ":distribute", + ":multi_worker_testing_utils", + "//tensorflow/python:platform", + "//tensorflow/python/distribute:collective_all_reduce_strategy", + "//tensorflow/python/distribute:combinations", + "//tensorflow/python/distribute:distribute_config", + "//tensorflow/python/distribute:distribute_coordinator", + "//tensorflow/python/distribute:multi_worker_test_base", + "//tensorflow/python/keras", + ], ) cuda_py_test( name = "multi_worker_optimizer_comparison_test", srcs = ["multi_worker_optimizer_comparison_test.py"], - additional_deps = [ - "//tensorflow/python/distribute:collective_all_reduce_strategy", - "//tensorflow/python/distribute:combinations", - "//tensorflow/python/keras/distribute:multi_worker_test", - "//tensorflow/python/distribute:multi_worker_test_base", - "//tensorflow/python:platform", - "//tensorflow/python/distribute:distribute_coordinator", - "//tensorflow/python/keras", - ], tags = [ "manual", # b/139844866 "multi_and_single_gpu", "no_oss", "notap", ], + deps = [ + "//tensorflow/python:platform", + "//tensorflow/python/distribute:collective_all_reduce_strategy", + "//tensorflow/python/distribute:combinations", + "//tensorflow/python/distribute:distribute_coordinator", + "//tensorflow/python/distribute:multi_worker_test_base", + "//tensorflow/python/keras", + "//tensorflow/python/keras/distribute:multi_worker_test", + ], ) py_library( diff --git a/tensorflow/python/keras/mixed_precision/experimental/BUILD b/tensorflow/python/keras/mixed_precision/experimental/BUILD index 8130689f8e9..ff595cd5089 100644 --- a/tensorflow/python/keras/mixed_precision/experimental/BUILD +++ b/tensorflow/python/keras/mixed_precision/experimental/BUILD @@ -124,7 +124,8 @@ cuda_py_test( name = "loss_scale_optimizer_test", size = "small", srcs = ["loss_scale_optimizer_test.py"], - additional_deps = [ + python_version = "PY3", + deps = [ ":loss_scale_optimizer", ":test_util", "//tensorflow/python:client_testlib", @@ -133,7 +134,6 @@ cuda_py_test( "//tensorflow/python/distribute:one_device_strategy", "//tensorflow/python/keras", ], - python_version = "PY3", ) py_library( @@ -150,30 +150,30 @@ cuda_py_test( name = "keras_test", size = "medium", srcs = ["keras_test.py"], - additional_deps = [ + python_version = "PY3", + shard_count = 4, + tags = ["no_windows"], # b/139083295: bfloat16 tests fail on Windows + deps = [ ":test_util", - "@absl_py//absl/testing:parameterized", "//tensorflow/python:client_testlib", "//tensorflow/python/distribute:mirrored_strategy", "//tensorflow/python/distribute:one_device_strategy", "//tensorflow/python/keras", + "@absl_py//absl/testing:parameterized", ], - python_version = "PY3", - shard_count = 4, - tags = ["no_windows"], # b/139083295: bfloat16 tests fail on Windows ) cuda_py_test( name = "layer_correctness_test", size = "medium", srcs = ["layer_correctness_test.py"], - additional_deps = [ - "@absl_py//absl/testing:parameterized", + python_version = "PY3", + tags = ["no_rocm"], + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python/distribute:mirrored_strategy", "//tensorflow/python/distribute:one_device_strategy", "//tensorflow/python/keras", + "@absl_py//absl/testing:parameterized", ], - python_version = "PY3", - tags = ["no_rocm"], ) diff --git a/tensorflow/python/keras/optimizer_v2/BUILD b/tensorflow/python/keras/optimizer_v2/BUILD index 009f1c17320..bb20d4bb788 100644 --- a/tensorflow/python/keras/optimizer_v2/BUILD +++ b/tensorflow/python/keras/optimizer_v2/BUILD @@ -63,155 +63,140 @@ cuda_py_test( name = "adagrad_test", size = "medium", srcs = ["adagrad_test.py"], - additional_deps = [ + shard_count = 4, + deps = [ ":optimizer_v2", "//tensorflow/python:client_testlib", "//tensorflow/python:embedding_ops", - "//tensorflow/python:platform_test", "//tensorflow/python:framework", "//tensorflow/python:math_ops", + "//tensorflow/python:platform_test", "//tensorflow/python:resource_variable_ops", "//tensorflow/python:resources", "//tensorflow/python:variables", "//tensorflow/python/eager:context", ], - shard_count = 4, ) cuda_py_test( name = "adam_test", size = "medium", srcs = ["adam_test.py"], - additional_deps = [ + shard_count = 4, + deps = [ ":optimizer_v2", "//tensorflow/python:client_testlib", "//tensorflow/python:embedding_ops", - "//tensorflow/python:platform_test", "//tensorflow/python:framework", "//tensorflow/python:math_ops", + "//tensorflow/python:platform_test", "//tensorflow/python:resource_variable_ops", "//tensorflow/python:resources", "//tensorflow/python:variables", "//tensorflow/python/eager:context", ], - shard_count = 4, ) cuda_py_test( name = "adamax_test", size = "medium", srcs = ["adamax_test.py"], - additional_deps = [ + shard_count = 4, + tags = ["no_rocm"], + deps = [ ":optimizer_v2", "//tensorflow/python:client_testlib", "//tensorflow/python:embedding_ops", - "//tensorflow/python:platform_test", "//tensorflow/python:framework", "//tensorflow/python:math_ops", + "//tensorflow/python:platform_test", "//tensorflow/python:resource_variable_ops", "//tensorflow/python:resources", "//tensorflow/python:variables", "//tensorflow/python/eager:context", ], - shard_count = 4, - tags = ["no_rocm"], ) cuda_py_test( name = "adadelta_test", size = "medium", srcs = ["adadelta_test.py"], - additional_deps = [ + shard_count = 4, + deps = [ ":optimizer_v2", "//tensorflow/python:client_testlib", "//tensorflow/python:embedding_ops", - "//tensorflow/python:platform_test", "//tensorflow/python:framework", "//tensorflow/python:math_ops", + "//tensorflow/python:platform_test", "//tensorflow/python:resource_variable_ops", "//tensorflow/python:resources", "//tensorflow/python:variables", "//tensorflow/python/eager:context", ], - shard_count = 4, ) cuda_py_test( name = "ftrl_test", size = "medium", srcs = ["ftrl_test.py"], - additional_deps = [ + shard_count = 4, + deps = [ ":optimizer_v2", "//tensorflow/python:client_testlib", "//tensorflow/python:embedding_ops", - "//tensorflow/python:platform_test", "//tensorflow/python:framework", "//tensorflow/python:math_ops", + "//tensorflow/python:platform_test", "//tensorflow/python:resource_variable_ops", "//tensorflow/python:resources", "//tensorflow/python:variables", "//tensorflow/python/eager:context", ], - shard_count = 4, ) cuda_py_test( name = "gradient_descent_test", size = "medium", srcs = ["gradient_descent_test.py"], - additional_deps = [ + shard_count = 4, + deps = [ ":optimizer_v2", "//tensorflow/python:client_testlib", "//tensorflow/python:embedding_ops", - "//tensorflow/python:platform_test", "//tensorflow/python:framework", "//tensorflow/python:math_ops", + "//tensorflow/python:platform_test", "//tensorflow/python:resource_variable_ops", "//tensorflow/python:resources", "//tensorflow/python:variables", "//tensorflow/python/eager:context", ], - shard_count = 4, ) cuda_py_test( name = "nadam_test", size = "medium", srcs = ["nadam_test.py"], - additional_deps = [ + shard_count = 4, + deps = [ ":optimizer_v2", "//tensorflow/python:client_testlib", "//tensorflow/python:embedding_ops", - "//tensorflow/python:platform_test", "//tensorflow/python:framework", "//tensorflow/python:math_ops", + "//tensorflow/python:platform_test", "//tensorflow/python:resource_variable_ops", "//tensorflow/python:resources", "//tensorflow/python:variables", "//tensorflow/python/eager:context", ], - shard_count = 4, ) cuda_py_test( name = "optimizer_v2_test", size = "medium", srcs = ["optimizer_v2_test.py"], - additional_deps = [ - ":optimizer_v2", - "@absl_py//absl/testing:parameterized", - "//tensorflow/python:array_ops", - "//tensorflow/python:client_testlib", - "//tensorflow/python:clip_ops", - "//tensorflow/python:framework", - "//tensorflow/python:framework_test_lib", - "//tensorflow/python:gradients", - "//tensorflow/python:resource_variable_ops", - "//tensorflow/python:state_ops", - "//tensorflow/python:variables", - "//tensorflow/python/eager:def_function", - "//tensorflow/python/keras", - ], shard_count = 8, tags = [ "manual", @@ -220,39 +205,54 @@ cuda_py_test( "no_windows", "notap", ], + deps = [ + ":optimizer_v2", + "//tensorflow/python:array_ops", + "//tensorflow/python:client_testlib", + "//tensorflow/python:clip_ops", + "//tensorflow/python:framework", + "//tensorflow/python:framework_test_lib", + "//tensorflow/python:gradients", + "//tensorflow/python:resource_variable_ops", + "//tensorflow/python:state_ops", + "//tensorflow/python:variables", + "//tensorflow/python/eager:def_function", + "//tensorflow/python/keras", + "@absl_py//absl/testing:parameterized", + ], ) cuda_py_test( name = "learning_rate_schedule_test", size = "medium", srcs = ["learning_rate_schedule_test.py"], - additional_deps = [ + shard_count = 4, + deps = [ ":optimizer_v2", - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", "//tensorflow/python:client_testlib", "//tensorflow/python/keras", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], - shard_count = 4, ) cuda_py_test( name = "rmsprop_test", size = "medium", srcs = ["rmsprop_test.py"], - additional_deps = [ + shard_count = 2, + deps = [ ":optimizer_v2", - "@absl_py//absl/testing:parameterized", - "//tensorflow/python/eager:def_function", + "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", + "//tensorflow/python:clip_ops", "//tensorflow/python:framework", "//tensorflow/python:framework_test_lib", - "//tensorflow/python:array_ops", - "//tensorflow/python:clip_ops", "//tensorflow/python:gradients", "//tensorflow/python:resource_variable_ops", "//tensorflow/python:state_ops", "//tensorflow/python:variables", + "//tensorflow/python/eager:def_function", + "@absl_py//absl/testing:parameterized", ], - shard_count = 2, ) diff --git a/tensorflow/python/kernel_tests/BUILD b/tensorflow/python/kernel_tests/BUILD index 6341f1c393d..402de69d0a8 100644 --- a/tensorflow/python/kernel_tests/BUILD +++ b/tensorflow/python/kernel_tests/BUILD @@ -119,51 +119,51 @@ cuda_py_test( name = "list_ops_test", size = "small", srcs = ["list_ops_test.py"], - additional_deps = [ - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", + grpc_enabled = True, + tags = ["no_rocm"], + deps = [ "//tensorflow/python:array_ops", + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework_for_generated_wrappers", + "//tensorflow/python:framework_test_lib", "//tensorflow/python:gradients_impl", "//tensorflow/python:list_ops", "//tensorflow/python:math_ops", "//tensorflow/python:tensor_shape", "//tensorflow/python/eager:context", "//tensorflow/python/eager:def_function", - "//tensorflow/python:framework_for_generated_wrappers", - "//tensorflow/python:framework_test_lib", - "//tensorflow/python:client_testlib", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], - grpc_enabled = True, - tags = ["no_rocm"], ) cuda_py_test( name = "benchmark_test", size = "small", srcs = ["benchmark_test.py"], - additional_deps = [ + tags = ["no_windows"], + deps = [ "//tensorflow/python:client", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:platform", "//tensorflow/python:platform_benchmark", ], - tags = ["no_windows"], ) cuda_py_test( name = "reduce_benchmark_test", srcs = ["reduce_benchmark_test.py"], - additional_deps = [ - "//tensorflow/python/eager:backprop", - "//tensorflow/python:client_testlib", - "//tensorflow/python/eager:context", - "//tensorflow/python:framework", + deps = [ "//tensorflow/python:array_ops", + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework", "//tensorflow/python:gradients", "//tensorflow/python:math_ops", "//tensorflow/python:platform", "//tensorflow/python:platform_benchmark", + "//tensorflow/python/eager:backprop", + "//tensorflow/python/eager:context", ], ) @@ -171,12 +171,12 @@ cuda_py_test( name = "bincount_op_test", size = "small", srcs = ["bincount_op_test.py"], - additional_deps = [ - "//tensorflow/python:client_testlib", - "//tensorflow/python:math_ops", - "//tensorflow/python:framework_for_generated_wrappers", - ], tags = ["no_windows_gpu"], + deps = [ + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework_for_generated_wrappers", + "//tensorflow/python:math_ops", + ], ) tf_py_test( @@ -219,8 +219,12 @@ cuda_py_test( name = "cholesky_op_test", size = "medium", srcs = ["cholesky_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 5, + tags = [ + "no_rocm", # TODO(rocm): feature not supported on ROCm platform + "nomsan", # TODO(b/131773093): Re-enable. + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", @@ -228,11 +232,7 @@ cuda_py_test( "//tensorflow/python:math_ops", "//tensorflow/python:platform", "//tensorflow/python/ops/linalg", - ], - shard_count = 5, - tags = [ - "no_rocm", # TODO(rocm): feature not supported on ROCm platform - "nomsan", # TODO(b/131773093): Re-enable. + "//third_party/py/numpy", ], ) @@ -285,13 +285,13 @@ cuda_py_test( name = "ctc_loss_op_test", size = "medium", srcs = ["ctc_loss_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:ctc_ops", "//tensorflow/python:framework", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", + "//third_party/py/numpy", ], ) @@ -311,17 +311,17 @@ cuda_py_test( name = "cudnn_deterministic_ops_test", size = "small", srcs = ["cudnn_deterministic_ops_test.py"], - additional_deps = [ + xla_enable_strict_auto_jit = True, + deps = [ ":cudnn_deterministic_base", ], - xla_enable_strict_auto_jit = True, ) cuda_py_test( name = "cudnn_deterministic_test", size = "small", srcs = ["cudnn_deterministic_test.py"], - additional_deps = [ + deps = [ ":cudnn_deterministic_base", ], ) @@ -330,14 +330,14 @@ cuda_py_test( name = "cumulative_logsumexp_test", size = "medium", srcs = ["cumulative_logsumexp_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ + "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:errors", "//tensorflow/python:framework_for_generated_wrappers", - "//tensorflow/python:math_ops", "//tensorflow/python:map_fn", - "//tensorflow/python:array_ops", + "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], ) @@ -438,11 +438,11 @@ cuda_py_test( name = "determinant_op_test", size = "small", srcs = ["determinant_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:linalg_ops", + "//third_party/py/numpy", ], ) @@ -563,11 +563,11 @@ cuda_py_test( name = "in_topk_op_test", size = "small", srcs = ["in_topk_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:errors", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], ) @@ -626,7 +626,7 @@ cuda_py_test( name = "logging_ops_test", size = "small", srcs = ["logging_ops_test.py"], - additional_deps = [ + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:control_flow_ops", "//tensorflow/python:framework_for_generated_wrappers", @@ -704,27 +704,27 @@ cuda_py_test( name = "matrix_inverse_op_test", size = "small", srcs = ["matrix_inverse_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = ["optonly"], + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:linalg_ops", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], - tags = ["optonly"], ) cuda_py_test( name = "matrix_solve_ls_op_test", size = "medium", srcs = ["matrix_solve_ls_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:linalg_ops", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], ) @@ -732,11 +732,11 @@ cuda_py_test( name = "matrix_square_root_op_test", size = "medium", srcs = ["matrix_square_root_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:linalg_ops", + "//third_party/py/numpy", ], ) @@ -744,12 +744,12 @@ cuda_py_test( name = "matrix_solve_op_test", size = "medium", srcs = ["matrix_solve_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:linalg_ops", + "//third_party/py/numpy", ], ) @@ -757,10 +757,10 @@ cuda_py_test( name = "matrix_triangular_solve_op_test", size = "small", srcs = ["matrix_triangular_solve_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:linalg_ops", + "//third_party/py/numpy", ], ) @@ -768,9 +768,7 @@ cuda_py_test( name = "parameterized_truncated_normal_op_test", size = "medium", srcs = ["parameterized_truncated_normal_op_test.py"], - additional_deps = [ - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:client", "//tensorflow/python:client_testlib", @@ -779,6 +777,8 @@ cuda_py_test( "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:platform", "//tensorflow/python:random_ops", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], ) @@ -852,19 +852,19 @@ cuda_py_test( name = "resource_variable_ops_test", size = "medium", srcs = ["resource_variable_ops_test.py"], - additional_deps = [ - "@absl_py//absl/testing:parameterized", + # TODO(b/128347673): Re-enable. + tags = ["no_windows"], + deps = [ "//tensorflow/python:array_ops", - "//tensorflow/python:constant_op", "//tensorflow/python:client_testlib", + "//tensorflow/python:constant_op", "//tensorflow/python:errors", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:resource_variable_ops", "//tensorflow/python:variables", + "@absl_py//absl/testing:parameterized", ], - # TODO(b/128347673): Re-enable. - tags = ["no_windows"], ) tf_py_test( @@ -911,18 +911,18 @@ cuda_py_test( name = "scatter_nd_ops_test", size = "medium", srcs = ["scatter_nd_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = ["noasan"], # http://b/32635055 + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", + "//tensorflow/python:resource_variable_ops", "//tensorflow/python:state_ops", "//tensorflow/python:variables", - "//tensorflow/python:resource_variable_ops", + "//third_party/py/numpy", ], - tags = ["noasan"], # http://b/32635055 ) tf_py_test( @@ -1195,7 +1195,7 @@ cuda_py_test( name = "summary_ops_test", size = "small", srcs = ["summary_ops_test.py"], - additional_deps = [ + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:client_testlib", "//tensorflow/python:constant_op", @@ -1207,14 +1207,14 @@ cuda_py_test( "//tensorflow/python:math_ops", "//tensorflow/python:platform", "//tensorflow/python:summary_ops_v2", - "@six_archive//:six", "//tensorflow/python:tensor_spec", "//tensorflow/python:tensor_util", "//tensorflow/python:variables", - "//tensorflow/python/eager:function", "//tensorflow/python/eager:context", + "//tensorflow/python/eager:function", "//tensorflow/python/keras:engine", "//tensorflow/python/keras:layers", + "@six_archive//:six", ], ) @@ -1269,14 +1269,14 @@ cuda_py_test( name = "template_mirrored_strategy_test", size = "small", srcs = ["template_mirrored_strategy_test.py"], - additional_deps = [ - "//tensorflow/python/distribute:distribute_lib", - "//tensorflow/python/distribute:mirrored_strategy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:init_ops", "//tensorflow/python:template", "//tensorflow/python:variable_scope", "//tensorflow/python:variables", + "//tensorflow/python/distribute:distribute_lib", + "//tensorflow/python/distribute:mirrored_strategy", ], ) @@ -1284,17 +1284,17 @@ cuda_py_test( name = "tridiagonal_solve_op_test", size = "medium", srcs = ["tridiagonal_solve_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", - "//tensorflow/python:client_testlib", - "//tensorflow/python:framework_for_generated_wrappers", - "//tensorflow/python:linalg_ops", - ], shard_count = 10, tags = [ "no_oss", # TODO(b/142818120): Re-enable. "no_rocm", ], + deps = [ + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework_for_generated_wrappers", + "//tensorflow/python:linalg_ops", + "//third_party/py/numpy", + ], ) tf_py_test( @@ -1313,14 +1313,14 @@ cuda_py_test( name = "topk_op_test", size = "medium", srcs = ["topk_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], ) @@ -1328,14 +1328,14 @@ cuda_py_test( name = "nth_element_op_test", size = "small", srcs = ["nth_element_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], ) @@ -1453,11 +1453,11 @@ cuda_py_test( name = "where_op_test", size = "medium", srcs = ["where_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], ) @@ -1465,15 +1465,6 @@ cuda_py_test( name = "cast_op_test", size = "small", srcs = ["cast_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", - "//tensorflow/python:array_ops", - "//tensorflow/python:client_testlib", - "//tensorflow/python:framework", - "//tensorflow/python:framework_for_generated_wrappers", - "//tensorflow/python:math_ops", - "//tensorflow/python:variables", - ], tags = [ "no_windows", "noasan", @@ -1481,39 +1472,48 @@ cuda_py_test( "notap", "optonly", ], + deps = [ + "//tensorflow/python:array_ops", + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework", + "//tensorflow/python:framework_for_generated_wrappers", + "//tensorflow/python:math_ops", + "//tensorflow/python:variables", + "//third_party/py/numpy", + ], ) cuda_py_test( name = "dense_update_ops_no_tsan_test", size = "small", srcs = ["dense_update_ops_no_tsan_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = ["notsan"], + # TODO (b/140294007): the test fails with XLA. + xla_enable_strict_auto_jit = False, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:math_ops", "//tensorflow/python:state_ops", "//tensorflow/python:variables", + "//third_party/py/numpy", ], - tags = ["notsan"], - # TODO (b/140294007): the test fails with XLA. - xla_enable_strict_auto_jit = False, ) cuda_py_test( name = "diag_op_test", size = "medium", srcs = ["diag_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 2, + tags = ["no_windows_gpu"], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", "//tensorflow/python:platform", + "//third_party/py/numpy", ], - shard_count = 2, - tags = ["no_windows_gpu"], ) tf_py_test( @@ -1539,12 +1539,12 @@ cuda_py_test( name = "aggregate_ops_test", size = "small", srcs = ["aggregate_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], ) @@ -1552,10 +1552,10 @@ cuda_py_test( name = "argmax_op_test", size = "small", srcs = ["argmax_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], ) @@ -1563,8 +1563,12 @@ cuda_py_test( name = "array_ops_test", size = "medium", srcs = ["array_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 10, + tags = [ + "noasan", # times out + "optonly", # times out + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client", "//tensorflow/python:client_testlib", @@ -1580,11 +1584,7 @@ cuda_py_test( "//tensorflow/python:variables", "//tensorflow/python/eager:context", "//tensorflow/python/eager:def_function", - ], - shard_count = 10, - tags = [ - "noasan", # times out - "optonly", # times out + "//third_party/py/numpy", ], ) @@ -1592,11 +1592,11 @@ cuda_py_test( name = "broadcast_to_ops_test", size = "small", srcs = ["broadcast_to_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client", "//tensorflow/python:client_testlib", + "//third_party/py/numpy", ], ) @@ -1604,42 +1604,42 @@ cuda_py_test( name = "inplace_ops_test", size = "small", srcs = ["inplace_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 10, + deps = [ "//tensorflow/python:array_ops", - "//tensorflow/python:errors", "//tensorflow/python:client_testlib", + "//tensorflow/python:errors", "//tensorflow/python:framework", "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], - shard_count = 10, ) cuda_py_test( name = "batch_matmul_op_test", size = "small", srcs = ["batch_matmul_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 20, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], - shard_count = 20, ) cuda_py_test( name = "batchtospace_op_test", size = "small", srcs = ["batchtospace_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:array_ops_gen", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], ) @@ -1647,13 +1647,13 @@ cuda_py_test( name = "betainc_op_test", size = "small", srcs = ["betainc_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", "//tensorflow/python:platform", + "//third_party/py/numpy", ], ) @@ -1675,17 +1675,17 @@ cuda_py_test( name = "bias_op_deterministic_test", size = "medium", srcs = ["bias_op_deterministic_test.py"], - additional_deps = [ + xla_enable_strict_auto_jit = False, + deps = [ ":bias_op_base", ], - xla_enable_strict_auto_jit = False, ) cuda_py_test( name = "bias_op_test", size = "medium", srcs = ["bias_op_test.py"], - additional_deps = [ + deps = [ ":bias_op_base", ], ) @@ -1694,11 +1694,11 @@ cuda_py_test( name = "bitcast_op_test", size = "small", srcs = ["bitcast_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], ) @@ -1706,17 +1706,17 @@ cuda_py_test( name = "check_ops_test", size = "small", srcs = ["check_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", - "//tensorflow/python/eager:context", - "//tensorflow/python/eager:def_function", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:check_ops", - "//tensorflow/python:math_ops", - "//tensorflow/python:random_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", "//tensorflow/python:framework_for_generated_wrappers", + "//tensorflow/python:math_ops", + "//tensorflow/python:random_ops", + "//tensorflow/python/eager:context", + "//tensorflow/python/eager:def_function", + "//third_party/py/numpy", ], ) @@ -1724,14 +1724,14 @@ cuda_py_test( name = "constant_op_test", size = "small", srcs = ["constant_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:errors", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", "//tensorflow/python:util", + "//third_party/py/numpy", ], ) @@ -1739,17 +1739,17 @@ cuda_py_test( name = "constant_op_eager_test", size = "small", srcs = ["constant_op_eager_test.py"], - additional_deps = [ - "//tensorflow/python/eager:core", - "//tensorflow/python/eager:context", - "//tensorflow/python/eager:test", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:errors", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", "//tensorflow/python:util", + "//tensorflow/python/eager:context", + "//tensorflow/python/eager:core", + "//tensorflow/python/eager:test", + "//third_party/py/numpy", ], ) @@ -1757,9 +1757,11 @@ cuda_py_test( name = "control_flow_ops_py_test", size = "small", srcs = ["control_flow_ops_py_test.py"], - additional_deps = [ - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", + shard_count = 16, + tags = [ + "notsan", # TODO(b/132205147): Re-enable this. + ], + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:array_ops", "//tensorflow/python:array_ops_gen", @@ -1789,10 +1791,8 @@ cuda_py_test( "//tensorflow/python:variable_scope", "//tensorflow/python:variables", "//tensorflow/python:while_v2", - ], - shard_count = 16, - tags = [ - "notsan", # TODO(b/132205147): Re-enable this. + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], ) @@ -1827,7 +1827,7 @@ cuda_py_test( name = "conv1d_test", size = "small", srcs = ["conv1d_test.py"], - additional_deps = [ + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", @@ -1839,12 +1839,12 @@ cuda_py_test( name = "conv1d_transpose_test", size = "small", srcs = ["conv1d_transpose_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], ) @@ -1852,31 +1852,31 @@ cuda_py_test( name = "conv2d_transpose_test", size = "small", srcs = ["conv2d_transpose_test.py"], - additional_deps = [ - "//third_party/py/numpy", + + # TODO(b/144432983): S32 convolutions should not be auto-clustered, only + # crashes tests. + xla_enable_strict_auto_jit = False, + deps = [ "//tensorflow/python:client", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], - - # TODO(b/144432983): S32 convolutions should not be auto-clustered, only - # crashes tests. - xla_enable_strict_auto_jit = False, ) cuda_py_test( name = "conv3d_backprop_filter_v2_grad_test", size = "small", srcs = ["conv3d_backprop_filter_v2_grad_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], ) @@ -1884,7 +1884,7 @@ cuda_py_test( name = "cross_grad_test", size = "small", srcs = ["cross_grad_test.py"], - additional_deps = [ + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:math_ops", @@ -1895,12 +1895,12 @@ cuda_py_test( name = "denormal_test", size = "small", srcs = ["denormal_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:platform", + "//third_party/py/numpy", ], ) @@ -1908,14 +1908,14 @@ cuda_py_test( name = "dense_update_ops_test", size = "small", srcs = ["dense_update_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", "//tensorflow/python:state_ops", "//tensorflow/python:variables", + "//third_party/py/numpy", ], ) @@ -1923,40 +1923,40 @@ cuda_py_test( name = "depthtospace_op_test", size = "medium", srcs = ["depthtospace_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = ["no_windows_gpu"], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], - tags = ["no_windows_gpu"], ) cuda_py_test( name = "division_past_test", size = "medium", srcs = ["division_past_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = ["manual"], + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], - tags = ["manual"], ) cuda_py_test( name = "dynamic_partition_op_test", size = "medium", srcs = ["dynamic_partition_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:data_flow_grad", "//tensorflow/python:data_flow_ops", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", + "//third_party/py/numpy", ], ) @@ -1964,13 +1964,13 @@ cuda_py_test( name = "dynamic_stitch_op_test", size = "small", srcs = ["dynamic_stitch_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:data_flow_grad", "//tensorflow/python:data_flow_ops", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", + "//third_party/py/numpy", ], ) @@ -1978,25 +1978,25 @@ cuda_py_test( name = "extract_image_patches_op_test", size = "small", srcs = ["extract_image_patches_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + # TODO(b/144432983): S32 convolutions should not be auto-clustered. + xla_enable_strict_auto_jit = False, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], - # TODO(b/144432983): S32 convolutions should not be auto-clustered. - xla_enable_strict_auto_jit = False, ) cuda_py_test( name = "extract_volume_patches_op_test", size = "small", srcs = ["extract_volume_patches_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], ) @@ -2004,8 +2004,10 @@ cuda_py_test( name = "functional_ops_test", size = "medium", srcs = ["functional_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + grpc_enabled = True, + shard_count = 2, + tags = ["no_windows"], + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", @@ -2020,24 +2022,22 @@ cuda_py_test( "//tensorflow/python:variables", "//tensorflow/python:while_v2", "//tensorflow/python/data/ops:iterator_ops", + "//third_party/py/numpy", ], - grpc_enabled = True, - shard_count = 2, - tags = ["no_windows"], ) cuda_py_test( name = "gather_nd_op_test", size = "small", srcs = ["gather_nd_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", "//tensorflow/python:variables", + "//third_party/py/numpy", ], ) @@ -2045,13 +2045,13 @@ cuda_py_test( name = "gather_op_test", size = "medium", srcs = ["gather_op_test.py"], - additional_deps = [ - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], ) @@ -2059,12 +2059,12 @@ cuda_py_test( name = "gradient_correctness_test", size = "small", srcs = ["gradient_correctness_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], ) @@ -2072,14 +2072,18 @@ cuda_py_test( name = "init_ops_test", size = "medium", srcs = ["init_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 4, + tags = [ + "noasan", + "notap", + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", - "//tensorflow/python:layers", "//tensorflow/python:framework", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:init_ops", + "//tensorflow/python:layers", "//tensorflow/python:linalg_ops", "//tensorflow/python:math_ops", "//tensorflow/python:nn_ops", @@ -2087,11 +2091,7 @@ cuda_py_test( "//tensorflow/python:random_ops", "//tensorflow/python:variable_scope", "//tensorflow/python:variables", - ], - shard_count = 4, - tags = [ - "noasan", - "notap", + "//third_party/py/numpy", ], ) @@ -2099,31 +2099,31 @@ cuda_py_test( name = "linalg_ops_test", size = "medium", srcs = ["linalg_ops_test.py"], - additional_deps = [ - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", + tags = ["no_windows_gpu"], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:linalg_ops", "//tensorflow/python:math_ops", "//tensorflow/python/ops/linalg", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], - tags = ["no_windows_gpu"], ) cuda_py_test( name = "lrn_op_test", size = "small", srcs = ["lrn_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", "//tensorflow/python:nn", "//tensorflow/python:nn_grad", + "//third_party/py/numpy", ], ) @@ -2131,8 +2131,7 @@ cuda_py_test( name = "lu_op_test", size = "small", srcs = ["lu_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", @@ -2140,6 +2139,7 @@ cuda_py_test( "//tensorflow/python:math_ops", "//tensorflow/python:platform", "//tensorflow/python/ops/linalg", + "//third_party/py/numpy", ], ) @@ -2147,8 +2147,8 @@ cuda_py_test( name = "einsum_op_test", size = "medium", srcs = ["einsum_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 4, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", @@ -2156,29 +2156,29 @@ cuda_py_test( "//tensorflow/python:math_ops", "//tensorflow/python:platform", "//tensorflow/python/ops/linalg", + "//third_party/py/numpy", ], - shard_count = 4, ) cuda_py_test( name = "manip_ops_test", size = "small", srcs = ["manip_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", - "//tensorflow/python:manip_ops", + tags = ["no_windows_gpu"], + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//tensorflow/python:manip_ops", + "//third_party/py/numpy", ], - tags = ["no_windows_gpu"], ) cuda_py_test( name = "matmul_op_test", size = "medium", srcs = ["matmul_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 20, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", @@ -2186,20 +2186,20 @@ cuda_py_test( "//tensorflow/python:math_ops", "//tensorflow/python:random_ops", "//tensorflow/python:variables", + "//third_party/py/numpy", ], - shard_count = 20, ) cuda_py_test( name = "morphological_ops_test", size = "small", srcs = ["morphological_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], ) @@ -2207,14 +2207,14 @@ cuda_py_test( name = "numerics_test", size = "small", srcs = ["numerics_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:control_flow_ops", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", "//tensorflow/python:numerics", + "//third_party/py/numpy", ], ) @@ -2222,26 +2222,26 @@ cuda_py_test( name = "one_hot_op_test", size = "small", srcs = ["one_hot_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = ["no_windows_gpu"], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], - tags = ["no_windows_gpu"], ) cuda_py_test( name = "stack_op_test", size = "small", srcs = ["stack_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:errors", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:variables", + "//third_party/py/numpy", ], ) @@ -2249,8 +2249,10 @@ cuda_py_test( name = "map_fn_test", size = "small", srcs = ["map_fn_test.py"], - additional_deps = [ - "//third_party/py/numpy", + grpc_enabled = True, + shard_count = 2, + tags = ["no_windows"], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -2261,21 +2263,19 @@ cuda_py_test( "//tensorflow/python:tensor_array_grad", "//tensorflow/python:variable_scope", "//tensorflow/python:variables", + "//third_party/py/numpy", ], - grpc_enabled = True, - shard_count = 2, - tags = ["no_windows"], ) cuda_py_test( name = "pad_op_test", size = "small", srcs = ["pad_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], ) @@ -2283,13 +2283,13 @@ cuda_py_test( name = "padding_fifo_queue_test", size = "small", srcs = ["padding_fifo_queue_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:data_flow_ops", "//tensorflow/python:errors", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], ) @@ -2297,8 +2297,9 @@ cuda_py_test( name = "py_func_test", size = "small", srcs = ["py_func_test.py"], - additional_deps = [ - "//third_party/py/numpy", + grpc_enabled = True, + tags = ["no_windows"], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client", "//tensorflow/python:client_testlib", @@ -2307,21 +2308,20 @@ cuda_py_test( "//tensorflow/python:script_ops", "//tensorflow/python/eager:context", "//tensorflow/python/eager:function", + "//third_party/py/numpy", ], - grpc_enabled = True, - tags = ["no_windows"], ) cuda_py_test( name = "reduce_join_op_test", size = "small", srcs = ["reduce_join_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:string_ops", + "//third_party/py/numpy", ], ) @@ -2329,12 +2329,12 @@ cuda_py_test( name = "unsorted_segment_join_op_test", size = "small", srcs = ["unsorted_segment_join_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:string_ops", + "//third_party/py/numpy", ], ) @@ -2342,16 +2342,16 @@ cuda_py_test( name = "reduction_ops_test", size = "medium", srcs = ["reduction_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 6, + tags = [ + "no_windows_gpu", + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", - ], - shard_count = 6, - tags = [ - "no_windows_gpu", + "//third_party/py/numpy", ], ) @@ -2359,36 +2359,36 @@ cuda_py_test( name = "reduction_ops_test_big", size = "medium", srcs = ["reduction_ops_test_big.py"], - additional_deps = [ - "//third_party/py/numpy", - "//tensorflow/python:array_ops", - "//tensorflow/python:client_testlib", - "//tensorflow/python:framework_for_generated_wrappers", - "//tensorflow/python:math_ops", - ], shard_count = 3, tags = [ "manual", "no_gpu", "noguitar", ], + deps = [ + "//tensorflow/python:array_ops", + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework_for_generated_wrappers", + "//tensorflow/python:math_ops", + "//third_party/py/numpy", + ], ) cuda_py_test( name = "relu_op_test", size = "small", srcs = ["relu_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", "//tensorflow/python:random_ops", + "//tensorflow/python:tf2", "//tensorflow/python:training", "//tensorflow/python:variables", "//tensorflow/python/eager:backprop", - "//tensorflow/python:tf2", + "//third_party/py/numpy", ], ) @@ -2396,11 +2396,11 @@ cuda_py_test( name = "reshape_op_test", size = "small", srcs = ["reshape_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], ) @@ -2408,11 +2408,11 @@ cuda_py_test( name = "reverse_sequence_op_test", size = "small", srcs = ["reverse_sequence_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], ) @@ -2420,11 +2420,11 @@ cuda_py_test( name = "compare_and_bitpack_op_test", size = "small", srcs = ["compare_and_bitpack_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", - "//tensorflow/python:math_ops", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], ) @@ -2432,8 +2432,9 @@ cuda_py_test( name = "scalar_test", size = "small", srcs = ["scalar_test.py"], - additional_deps = [ - "//third_party/py/numpy", + # b/140221961: Invalid dims for operations + xla_enable_strict_auto_jit = False, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", @@ -2443,21 +2444,20 @@ cuda_py_test( "//tensorflow/python:platform", "//tensorflow/python:random_ops", "//tensorflow/python:sparse_ops", + "//third_party/py/numpy", ], - # b/140221961: Invalid dims for operations - xla_enable_strict_auto_jit = False, ) cuda_py_test( name = "scan_ops_test", size = "medium", srcs = ["scan_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:errors", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], ) @@ -2465,7 +2465,7 @@ cuda_py_test( name = "session_ops_test", size = "small", srcs = ["session_ops_test.py"], - additional_deps = [ + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", @@ -2477,9 +2477,7 @@ cuda_py_test( name = "shape_ops_test", size = "medium", srcs = ["shape_ops_test.py"], - additional_deps = [ - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", @@ -2487,6 +2485,8 @@ cuda_py_test( "//tensorflow/python:framework", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], ) @@ -2494,13 +2494,13 @@ cuda_py_test( name = "softmax_op_test", size = "medium", srcs = ["softmax_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:errors", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], ) @@ -2508,12 +2508,12 @@ cuda_py_test( name = "softplus_op_test", size = "small", srcs = ["softplus_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], ) @@ -2521,12 +2521,12 @@ cuda_py_test( name = "softsign_op_test", size = "small", srcs = ["softsign_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], ) @@ -2534,14 +2534,14 @@ cuda_py_test( name = "spacetobatch_op_test", size = "small", srcs = ["spacetobatch_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:array_ops_gen", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], ) @@ -2549,16 +2549,16 @@ cuda_py_test( name = "spacetodepth_op_test", size = "medium", srcs = ["spacetodepth_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = [ + "no_windows", + "no_windows_gpu", + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", - ], - tags = [ - "no_windows", - "no_windows_gpu", + "//third_party/py/numpy", ], ) @@ -2596,13 +2596,13 @@ cuda_py_test( name = "sparse_tensor_dense_matmul_grad_test", size = "small", srcs = ["sparse_tensor_dense_matmul_grad_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:sparse_grad", "//tensorflow/python:sparse_ops", + "//third_party/py/numpy", ], ) @@ -2610,8 +2610,7 @@ cuda_py_test( name = "sparse_xent_op_test", size = "small", srcs = ["sparse_xent_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:array_ops", "//tensorflow/python:client", @@ -2624,9 +2623,10 @@ cuda_py_test( "//tensorflow/python:nn_ops", "//tensorflow/python:nn_ops_gen", "//tensorflow/python:platform", - "//tensorflow/python:sparse_ops", "//tensorflow/python:random_ops", + "//tensorflow/python:sparse_ops", "//tensorflow/python:variables", + "//third_party/py/numpy", ], ) @@ -2634,13 +2634,13 @@ cuda_py_test( name = "split_op_test", size = "medium", srcs = ["split_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], ) @@ -2648,14 +2648,14 @@ cuda_py_test( name = "stack_ops_test", size = "small", srcs = ["stack_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:control_flow_ops", "//tensorflow/python:data_flow_ops_gen", "//tensorflow/python:errors", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], ) @@ -2663,7 +2663,7 @@ cuda_py_test( name = "string_to_hash_bucket_op_test", size = "small", srcs = ["string_to_hash_bucket_op_test.py"], - additional_deps = [ + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", @@ -2675,7 +2675,7 @@ cuda_py_test( name = "string_to_number_op_test", size = "small", srcs = ["string_to_number_op_test.py"], - additional_deps = [ + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", @@ -2687,12 +2687,12 @@ cuda_py_test( name = "summary_v1_audio_op_test", size = "small", srcs = ["summary_v1_audio_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:summary", + "//third_party/py/numpy", ], ) @@ -2700,14 +2700,14 @@ cuda_py_test( name = "summary_v1_image_op_test", size = "small", srcs = ["summary_v1_image_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:image_ops", "//tensorflow/python:nn_grad", "//tensorflow/python:summary", + "//third_party/py/numpy", ], ) @@ -2715,10 +2715,13 @@ cuda_py_test( name = "tensor_array_ops_test", size = "small", srcs = ["tensor_array_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + flaky = 1, # create_local_cluster sometimes times out. + shard_count = 10, + tags = ["no_rocm"], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", + "//tensorflow/python:cond_v2", "//tensorflow/python:control_flow_ops", "//tensorflow/python:data_flow_ops_gen", "//tensorflow/python:distributed_framework_test_lib", @@ -2728,46 +2731,37 @@ cuda_py_test( "//tensorflow/python:init_ops", "//tensorflow/python:math_ops", "//tensorflow/python:nn_grad", - "//tensorflow/python:tensor_spec", - "//tensorflow/python:training", "//tensorflow/python:tensor_array_grad", "//tensorflow/python:tensor_array_ops", - "//tensorflow/python:variables", + "//tensorflow/python:tensor_spec", + "//tensorflow/python:training", "//tensorflow/python:variable_scope", - "//tensorflow/python:cond_v2", + "//tensorflow/python:variables", "//tensorflow/python:while_v2", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/eager:backprop", "//tensorflow/python/eager:context", "//tensorflow/python/eager:def_function", + "//third_party/py/numpy", ], - flaky = 1, # create_local_cluster sometimes times out. - shard_count = 10, - tags = ["no_rocm"], ) cuda_py_test( name = "trace_op_test", size = "small", srcs = ["trace_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = ["no_windows_gpu"], + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], - tags = ["no_windows_gpu"], ) cuda_py_test( name = "transpose_op_test", size = "medium", srcs = ["transpose_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", - "//tensorflow/python:array_ops", - "//tensorflow/python:client_testlib", - "//tensorflow/python:framework_for_generated_wrappers", - ], shard_count = 10, tags = [ "no_gpu", @@ -2775,17 +2769,23 @@ cuda_py_test( "notap", # flaky timeout/segfault, b/136498892 "optonly", # times out ], + deps = [ + "//tensorflow/python:array_ops", + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", + ], ) cuda_py_test( name = "unstack_op_test", size = "small", srcs = ["unstack_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], ) @@ -2793,8 +2793,7 @@ cuda_py_test( name = "variable_ops_test", size = "small", srcs = ["variable_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:errors", @@ -2803,6 +2802,7 @@ cuda_py_test( "//tensorflow/python:state_ops", "//tensorflow/python:state_ops_gen", "//tensorflow/python:variables", + "//third_party/py/numpy", ], ) @@ -2810,8 +2810,7 @@ cuda_py_test( name = "xent_op_test", size = "small", srcs = ["xent_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", @@ -2819,6 +2818,7 @@ cuda_py_test( "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", "//tensorflow/python:nn_ops_gen", + "//third_party/py/numpy", ], ) @@ -2826,7 +2826,7 @@ cuda_py_test( name = "zero_division_test", size = "small", srcs = ["zero_division_test.py"], - additional_deps = [ + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:errors", "//tensorflow/python:framework_for_generated_wrappers", @@ -2837,18 +2837,18 @@ cuda_py_test( name = "atrous_conv2d_test", size = "medium", srcs = ["atrous_conv2d_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 2, + tags = [ + "no_gpu", # Flaky: b/80127739, b/127001953 + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", - ], - shard_count = 2, - tags = [ - "no_gpu", # Flaky: b/80127739, b/127001953 + "//third_party/py/numpy", ], ) @@ -2856,27 +2856,27 @@ cuda_py_test( name = "atrous_convolution_test", size = "medium", srcs = ["atrous_convolution_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = ["manual"], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], - tags = ["manual"], ) cuda_py_test( name = "pool_test", size = "medium", srcs = ["pool_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], ) @@ -2884,17 +2884,17 @@ cuda_py_test( name = "conv2d_backprop_filter_grad_test", size = "medium", srcs = ["conv2d_backprop_filter_grad_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 2, + tags = [ + "optonly", # flaky timeouts unless optimized + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", - ], - shard_count = 2, - tags = [ - "optonly", # flaky timeouts unless optimized + "//third_party/py/numpy", ], ) @@ -2902,12 +2902,12 @@ cuda_py_test( name = "conv3d_transpose_test", size = "medium", srcs = ["conv3d_transpose_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], ) @@ -2915,8 +2915,11 @@ cuda_py_test( name = "conv_ops_test", size = "medium", srcs = ["conv_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 4, + tags = [ + "optonly", # times out + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client", "//tensorflow/python:client_testlib", @@ -2929,10 +2932,7 @@ cuda_py_test( "//tensorflow/python:platform", "//tensorflow/python:random_ops", "//tensorflow/python:variables", - ], - shard_count = 4, - tags = [ - "optonly", # times out + "//third_party/py/numpy", ], ) @@ -2940,17 +2940,17 @@ cuda_py_test( name = "depthwise_conv_op_test", size = "medium", # http://b/30603882 srcs = ["depthwise_conv_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + # TODO(b/118842098): Re-enable this test in Kokoro. + tags = ["no_oss"], + deps = [ + "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", - "//tensorflow/python:array_ops", "//tensorflow/python:nn", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], - # TODO(b/118842098): Re-enable this test in Kokoro. - tags = ["no_oss"], ) tf_py_test( @@ -2973,34 +2973,34 @@ cuda_py_test( name = "division_future_test", size = "medium", srcs = ["division_future_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = ["manual"], + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], - tags = ["manual"], ) cuda_py_test( name = "pooling_ops_3d_test", size = "medium", srcs = ["pooling_ops_3d_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = ["no_rocm"], + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", + "//third_party/py/numpy", ], - tags = ["no_rocm"], ) cuda_py_test( name = "pooling_ops_test", size = "medium", srcs = ["pooling_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 4, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:errors", @@ -3009,8 +3009,8 @@ cuda_py_test( "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", "//tensorflow/python:nn_ops_gen", + "//third_party/py/numpy", ], - shard_count = 4, ) cuda_py_test( @@ -3018,8 +3018,8 @@ cuda_py_test( size = "medium", timeout = "long", srcs = ["rnn_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 10, + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:array_ops", "//tensorflow/python:client", @@ -3038,18 +3038,17 @@ cuda_py_test( "//tensorflow/python:tensor_array_ops", "//tensorflow/python:variables", "//tensorflow/python/eager:context", + "//third_party/py/numpy", ], - shard_count = 10, ) cuda_py_test( name = "rnn_cell_test", size = "medium", srcs = ["rnn_cell_test.py"], - additional_deps = [ - "@absl_py//absl/testing:parameterized", - "//third_party/py/numpy", - "//tensorflow/python/eager:context", + shard_count = 15, + tags = ["no_windows"], # b/139739217 + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:control_flow_ops", @@ -3066,54 +3065,55 @@ cuda_py_test( "//tensorflow/python:util", "//tensorflow/python:variable_scope", "//tensorflow/python:variables", + "//tensorflow/python/eager:context", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], - shard_count = 15, - tags = ["no_windows"], # b/139739217 ) cuda_py_test( name = "scatter_ops_test", size = "medium", # NOTE: This is not run by default. srcs = ["scatter_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 2, + tags = ["optonly"], + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:state_ops", "//tensorflow/python:variables", + "//third_party/py/numpy", ], - shard_count = 2, - tags = ["optonly"], ) cuda_py_test( name = "slice_op_test", size = "medium", srcs = ["slice_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = ["no_windows"], # b/126916429 + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:errors", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients", + "//third_party/py/numpy", ], - tags = ["no_windows"], # b/126916429 ) cuda_py_test( name = "huge_slice_op_test", size = "medium", srcs = ["huge_slice_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = [ + "no_oss", # Requires 4GB+ RAM + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:errors", "//tensorflow/python:framework_for_generated_wrappers", - ], - tags = [ - "no_oss", # Requires 4GB+ RAM + "//third_party/py/numpy", ], ) @@ -3121,21 +3121,25 @@ cuda_py_test( name = "sparse_matmul_op_test", size = "medium", srcs = ["sparse_matmul_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = ["no_windows"], + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], - tags = ["no_windows"], ) cuda_py_test( name = "sparse_ops_test", size = "medium", srcs = ["sparse_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 5, + tags = [ + "noasan", + "optonly", # b/77589990 + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -3145,11 +3149,7 @@ cuda_py_test( "//tensorflow/python:platform_test", "//tensorflow/python:sparse_grad", "//tensorflow/python:sparse_ops", - ], - shard_count = 5, - tags = [ - "noasan", - "optonly", # b/77589990 + "//third_party/py/numpy", ], ) @@ -3157,8 +3157,7 @@ cuda_py_test( name = "sparse_tensor_dense_matmul_op_test", size = "medium", srcs = ["sparse_tensor_dense_matmul_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:array_ops", "//tensorflow/python:client", @@ -3169,6 +3168,7 @@ cuda_py_test( "//tensorflow/python:math_ops", "//tensorflow/python:platform", "//tensorflow/python:sparse_ops", + "//third_party/py/numpy", ], ) @@ -3178,46 +3178,46 @@ cuda_py_test( name = "extract_image_patches_grad_test", size = "medium", srcs = ["extract_image_patches_grad_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 3, + tags = ["notap"], # http://b/31080670 + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], - shard_count = 3, - tags = ["notap"], # http://b/31080670 ) cuda_py_test( name = "extract_volume_patches_grad_test", size = "medium", srcs = ["extract_volume_patches_grad_test.py"], - additional_deps = [ - "//third_party/py/numpy", - "//tensorflow/python:array_ops", - "//tensorflow/python:client_testlib", - "//tensorflow/python:framework", - "//tensorflow/python:framework_for_generated_wrappers", - ], tags = [ "no_pip", "nomac", # http://b/139946976 "notap", # http://b/31080670 ], + deps = [ + "//tensorflow/python:array_ops", + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework", + "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", + ], ) cuda_py_test( name = "stage_op_test", size = "medium", srcs = ["stage_op_test.py"], - additional_deps = [ + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", + "//tensorflow/python:data_flow_ops", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", "//tensorflow/python:util", - "//tensorflow/python:data_flow_ops", ], ) @@ -3225,23 +3225,23 @@ cuda_py_test( name = "map_stage_op_test", size = "medium", srcs = ["map_stage_op_test.py"], - additional_deps = [ + tags = ["no_oss"], # b/124474135 + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", + "//tensorflow/python:data_flow_ops", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", "//tensorflow/python:util", - "//tensorflow/python:data_flow_ops", ], - tags = ["no_oss"], # b/124474135 ) cuda_py_test( name = "concat_op_test", size = "medium", srcs = ["concat_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + tags = ["no_windows"], # b/126916429 + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:array_ops_gen", "//tensorflow/python:client_testlib", @@ -3250,44 +3250,44 @@ cuda_py_test( "//tensorflow/python:gradients", "//tensorflow/python:math_ops", "//tensorflow/python:variables", + "//third_party/py/numpy", ], - tags = ["no_windows"], # b/126916429 ) cuda_py_test( name = "large_concat_op_test", size = "medium", srcs = ["large_concat_op_test.py"], - additional_deps = [ - "//tensorflow/python:array_ops", - "//tensorflow/python:client_testlib", - "//tensorflow/python:framework_for_generated_wrappers", - ], tags = [ "nomsan", "notsan", ], + deps = [ + "//tensorflow/python:array_ops", + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework_for_generated_wrappers", + ], ) cuda_py_test( name = "conv_ops_3d_test", size = "medium", srcs = ["conv_ops_3d_test.py"], - additional_deps = [ + shard_count = 30, + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:nn_grad", "//tensorflow/python:nn_ops", ], - shard_count = 30, ) cuda_py_test( name = "cwise_ops_test", size = "medium", srcs = ["cwise_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 50, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -3298,16 +3298,18 @@ cuda_py_test( "//tensorflow/python:nn_grad", "//tensorflow/python:platform", "//tensorflow/python:variables", + "//third_party/py/numpy", ], - shard_count = 50, ) cuda_py_test( name = "cwise_ops_binary_test", size = "medium", srcs = ["cwise_ops_binary_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 50, + # b/140155647: Error just outside of tolerance + xla_enable_strict_auto_jit = False, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -3318,18 +3320,18 @@ cuda_py_test( "//tensorflow/python:nn_grad", "//tensorflow/python:platform", "//tensorflow/python:variables", + "//third_party/py/numpy", ], - shard_count = 50, - # b/140155647: Error just outside of tolerance - xla_enable_strict_auto_jit = False, ) cuda_py_test( name = "cwise_ops_unary_test", size = "medium", srcs = ["cwise_ops_unary_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 50, + # b/140155706: nans in result + xla_enable_strict_auto_jit = False, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -3340,18 +3342,16 @@ cuda_py_test( "//tensorflow/python:nn_grad", "//tensorflow/python:platform", "//tensorflow/python:variables", + "//third_party/py/numpy", ], - shard_count = 50, - # b/140155706: nans in result - xla_enable_strict_auto_jit = False, ) cuda_py_test( name = "embedding_ops_test", size = "medium", srcs = ["embedding_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 20, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:data_flow_ops", @@ -3367,16 +3367,16 @@ cuda_py_test( "//tensorflow/python:util", "//tensorflow/python:variable_scope", "//tensorflow/python:variables", + "//third_party/py/numpy", ], - shard_count = 20, ) cuda_py_test( name = "linalg_grad_test", size = "medium", srcs = ["linalg_grad_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 20, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", @@ -3384,21 +3384,21 @@ cuda_py_test( "//tensorflow/python:linalg_ops", "//tensorflow/python:math_ops", "//tensorflow/python/ops/linalg", + "//third_party/py/numpy", ], - shard_count = 20, ) cuda_py_test( name = "matrix_band_part_op_test", size = "medium", srcs = ["matrix_band_part_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 20, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", + "//third_party/py/numpy", ], - shard_count = 20, ) tf_py_test( @@ -3426,18 +3426,18 @@ cuda_py_test( name = "self_adjoint_eig_op_test", size = "medium", srcs = ["self_adjoint_eig_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + data = ["//tensorflow/python/kernel_tests/testdata:self_adjoint_eig_op_test_files"], + shard_count = 20, + tags = [ + "no_windows", + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:linalg_ops", "//tensorflow/python:math_ops", - ], - data = ["//tensorflow/python/kernel_tests/testdata:self_adjoint_eig_op_test_files"], - shard_count = 20, - tags = [ - "no_windows", + "//third_party/py/numpy", ], # TODO(b/127344411): This test passes because XLA does not actually cluster # the self_adjoint_eig op. @@ -3447,17 +3447,17 @@ cuda_py_test( name = "qr_op_test", size = "medium", srcs = ["qr_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 20, + tags = [ + "no_rocm", # TODO(rocm): feature not supported on ROCm platform + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:linalg_ops", "//tensorflow/python:math_ops", - ], - shard_count = 20, - tags = [ - "no_rocm", # TODO(rocm): feature not supported on ROCm platform + "//third_party/py/numpy", ], ) @@ -3465,19 +3465,19 @@ cuda_py_test( name = "svd_op_test", size = "medium", srcs = ["svd_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 20, + tags = [ + "no_oss", # b/117185141. + "nomsan", # TODO(b/117236102): Re-enable in msan build. + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:gradients_impl", "//tensorflow/python:linalg_ops", "//tensorflow/python:math_ops", - ], - shard_count = 20, - tags = [ - "no_oss", # b/117185141. - "nomsan", # TODO(b/117236102): Re-enable in msan build. + "//third_party/py/numpy", ], # TODO(b/127344411): This test passes because XLA does not actually cluster # the svd op. @@ -3487,52 +3487,52 @@ cuda_py_test( name = "norm_op_test", size = "medium", srcs = ["norm_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", - "//tensorflow/python:array_ops", - "//tensorflow/python:client_testlib", - "//tensorflow/python:framework_for_generated_wrappers", - "//tensorflow/python:linalg_ops", - ], shard_count = 20, # TODO(b/117236102): Re-enable in msan build. tags = [ "no_windows_gpu", "nomsan", ], + deps = [ + "//tensorflow/python:array_ops", + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework_for_generated_wrappers", + "//tensorflow/python:linalg_ops", + "//third_party/py/numpy", + ], ) cuda_py_test( name = "normalize_op_test", size = "medium", srcs = ["normalize_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", - "//tensorflow/python:client_testlib", - "//tensorflow/python:framework_for_generated_wrappers", - "//tensorflow/python:nn", - ], shard_count = 20, # TODO(b/117236102): Re-enable in msan build. tags = [ "no_windows_gpu", "nomsan", ], + deps = [ + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework_for_generated_wrappers", + "//tensorflow/python:nn", + "//third_party/py/numpy", + ], ) cuda_py_test( name = "tensordot_op_test", size = "medium", srcs = ["tensordot_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 20, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:errors", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], - shard_count = 20, ) sycl_py_test( @@ -3625,11 +3625,11 @@ cuda_py_test( name = "bucketize_op_test", size = "small", srcs = ["bucketize_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", + "//third_party/py/numpy", ], ) @@ -3730,7 +3730,8 @@ cuda_py_test( name = "cond_v2_test", size = "medium", srcs = ["cond_v2_test.py"], - additional_deps = [ + grpc_enabled = True, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:cond_v2", @@ -3746,18 +3747,16 @@ cuda_py_test( "//tensorflow/python:while_v2", "//tensorflow/python/compat", ], - grpc_enabled = True, ) cuda_py_test( name = "while_v2_test", size = "medium", srcs = ["while_v2_test.py"], - additional_deps = [ - "@absl_py//absl/testing:parameterized", + grpc_enabled = True, + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:array_ops", - "//tensorflow/python/eager:def_function", "//tensorflow/python:client_testlib", "//tensorflow/python:constant_op", "//tensorflow/python:control_flow_ops", @@ -3773,30 +3772,31 @@ cuda_py_test( "//tensorflow/python:tensor_array_grad", "//tensorflow/python:tf_optimizer", "//tensorflow/python:while_v2", + "//tensorflow/python/eager:def_function", + "@absl_py//absl/testing:parameterized", ], - grpc_enabled = True, ) cuda_py_test( name = "critical_section_test", size = "medium", srcs = ["critical_section_test.py"], - additional_deps = [ - "@absl_py//absl/testing:parameterized", - "//tensorflow/python:client_testlib", - "//tensorflow/python/data/experimental/ops:prefetching_ops", + deps = [ "//tensorflow/python:array_ops", + "//tensorflow/python:client_testlib", "//tensorflow/python:control_flow_ops", "//tensorflow/python:control_flow_v2_toggles", + "//tensorflow/python:critical_section_ops", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:gradients", "//tensorflow/python:platform_test", "//tensorflow/python:resource_variable_ops", - "//tensorflow/python:critical_section_ops", "//tensorflow/python:tensor_array_ops", + "//tensorflow/python/data/experimental/ops:prefetching_ops", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/eager:context", + "@absl_py//absl/testing:parameterized", ], ) @@ -3804,12 +3804,12 @@ cuda_py_test( name = "tridiagonal_matmul_op_test", size = "medium", srcs = ["tridiagonal_matmul_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 10, + tags = ["no_rocm"], + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:linalg_ops", + "//third_party/py/numpy", ], - shard_count = 10, - tags = ["no_rocm"], ) diff --git a/tensorflow/python/kernel_tests/distributions/BUILD b/tensorflow/python/kernel_tests/distributions/BUILD index 0c5d472241a..23194dec2b8 100644 --- a/tensorflow/python/kernel_tests/distributions/BUILD +++ b/tensorflow/python/kernel_tests/distributions/BUILD @@ -11,16 +11,16 @@ cuda_py_test( name = "bijector_test", size = "small", srcs = ["bijector_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", - "@six_archive//:six", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", + "@six_archive//:six", ], ) @@ -28,9 +28,9 @@ cuda_py_test( name = "util_test", size = "medium", srcs = ["util_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", + shard_count = 3, + xla_enable_strict_auto_jit = False, # TODO(b/144920376) + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -39,20 +39,20 @@ cuda_py_test( "//tensorflow/python:gradients", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", ], - shard_count = 3, - xla_enable_strict_auto_jit = False, # TODO(b/144920376) ) cuda_py_test( name = "kullback_leibler_test", size = "small", srcs = ["kullback_leibler_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/distributions", ], ) @@ -60,9 +60,7 @@ cuda_py_test( name = "beta_test", size = "small", srcs = ["beta_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -70,6 +68,8 @@ cuda_py_test( "//tensorflow/python:math_ops", "//tensorflow/python:nn_ops", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", ], ) @@ -77,14 +77,14 @@ cuda_py_test( name = "bernoulli_test", size = "small", srcs = ["bernoulli_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", ], ) @@ -92,10 +92,7 @@ cuda_py_test( name = "categorical_test", size = "small", srcs = ["categorical_test.py"], - additional_deps = [ - "@absl_py//absl/testing:parameterized", - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -104,6 +101,9 @@ cuda_py_test( "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", "//tensorflow/python:random_ops", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", + "@absl_py//absl/testing:parameterized", ], ) @@ -111,13 +111,13 @@ cuda_py_test( name = "dirichlet_test", size = "small", srcs = ["dirichlet_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", ], ) @@ -125,98 +125,87 @@ cuda_py_test( name = "dirichlet_multinomial_test", size = "medium", srcs = ["dirichlet_multinomial_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", + tags = [ + "noguitar", # b/110489471 + "notap", # b/110489471 + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", - ], - tags = [ - "noguitar", # b/110489471 - "notap", # b/110489471 + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", ], ) cuda_py_test( name = "exponential_test", srcs = ["exponential_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:nn_ops", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", ], ) cuda_py_test( name = "gamma_test", srcs = ["gamma_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:nn_ops", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", ], ) cuda_py_test( name = "laplace_test", srcs = ["laplace_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:nn_ops", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", ], ) cuda_py_test( name = "multinomial_test", srcs = ["multinomial_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", + tags = ["manual"], # b/69001419 + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", ], - tags = ["manual"], # b/69001419 ) cuda_py_test( name = "student_t_test", size = "small", srcs = ["student_t_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", - "//tensorflow/python:client_testlib", - "//tensorflow/python:framework", - "//tensorflow/python:framework_for_generated_wrappers", - "//tensorflow/python:framework_test_lib", - "//tensorflow/python:math_ops", - "//tensorflow/python:nn_ops", - "//tensorflow/python:platform_test", - ], tags = [ # TODO(b/121223043): Re-enable this test after fixing "mean not defined" # errors. @@ -225,21 +214,32 @@ cuda_py_test( # disable to avoid false positives from scipy. "nomsan", ], + deps = [ + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework", + "//tensorflow/python:framework_for_generated_wrappers", + "//tensorflow/python:framework_test_lib", + "//tensorflow/python:math_ops", + "//tensorflow/python:nn_ops", + "//tensorflow/python:platform_test", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", + ], ) cuda_py_test( name = "uniform_test", size = "small", srcs = ["uniform_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:errors", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", ], ) @@ -247,9 +247,7 @@ cuda_py_test( name = "normal_test", size = "medium", srcs = ["normal_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", @@ -258,6 +256,8 @@ cuda_py_test( "//tensorflow/python:nn_ops", "//tensorflow/python:platform_test", "//tensorflow/python:variables", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", ], ) @@ -265,15 +265,15 @@ cuda_py_test( name = "special_math_test", size = "medium", srcs = ["special_math_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:gradients", "//tensorflow/python:platform_test", "//tensorflow/python:variables", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", ], ) @@ -281,15 +281,15 @@ cuda_py_test( name = "identity_bijector_test", size = "small", srcs = ["identity_bijector_test.py"], - additional_deps = [ - "//tensorflow/python/ops/distributions", - "//third_party/py/numpy", - "@six_archive//:six", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/distributions", + "//third_party/py/numpy", + "@six_archive//:six", ], ) diff --git a/tensorflow/python/kernel_tests/linalg/BUILD b/tensorflow/python/kernel_tests/linalg/BUILD index b428356cc24..7294462ff43 100644 --- a/tensorflow/python/kernel_tests/linalg/BUILD +++ b/tensorflow/python/kernel_tests/linalg/BUILD @@ -11,15 +11,15 @@ cuda_py_test( name = "linear_operator_test", size = "small", srcs = ["linear_operator_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/linalg", + "//third_party/py/numpy", ], ) @@ -27,15 +27,15 @@ cuda_py_test( name = "linear_operator_addition_test", size = "small", srcs = ["linear_operator_addition_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/linalg", + "//third_party/py/numpy", ], ) @@ -43,9 +43,12 @@ cuda_py_test( name = "linear_operator_adjoint_test", size = "medium", srcs = ["linear_operator_adjoint_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", - "//third_party/py/numpy", + shard_count = 5, + tags = [ + "noasan", # times out, b/63678675 + "optonly", # times out + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -53,11 +56,8 @@ cuda_py_test( "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", - ], - shard_count = 5, - tags = [ - "noasan", # times out, b/63678675 - "optonly", # times out + "//tensorflow/python/ops/linalg", + "//third_party/py/numpy", ], ) @@ -65,15 +65,15 @@ cuda_py_test( name = "linear_operator_algebra_test", size = "small", srcs = ["linear_operator_algebra_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/linalg", + "//third_party/py/numpy", ], ) @@ -81,9 +81,12 @@ cuda_py_test( name = "linear_operator_block_diag_test", size = "medium", srcs = ["linear_operator_block_diag_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", - "//third_party/py/numpy", + shard_count = 6, + tags = [ + "noasan", + "optonly", + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -91,11 +94,8 @@ cuda_py_test( "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", - ], - shard_count = 6, - tags = [ - "noasan", - "optonly", + "//tensorflow/python/ops/linalg", + "//third_party/py/numpy", ], ) @@ -103,9 +103,12 @@ cuda_py_test( name = "linear_operator_composition_test", size = "medium", srcs = ["linear_operator_composition_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", - "//third_party/py/numpy", + shard_count = 5, + tags = [ + "noasan", # times out, b/63678675 + "optonly", # times out + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -113,11 +116,8 @@ cuda_py_test( "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", - ], - shard_count = 5, - tags = [ - "noasan", # times out, b/63678675 - "optonly", # times out + "//tensorflow/python/ops/linalg", + "//third_party/py/numpy", ], ) @@ -125,8 +125,13 @@ cuda_py_test( name = "linear_operator_circulant_test", size = "medium", srcs = ["linear_operator_circulant_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 10, + tags = [ + "no_rocm", # calls BLAS ops for complex types + "noasan", # times out, b/63678675 + "optonly", # times out, b/79171797 + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -136,12 +141,7 @@ cuda_py_test( "//tensorflow/python:platform_test", "//tensorflow/python/ops/linalg", "//tensorflow/python/ops/signal", - ], - shard_count = 10, - tags = [ - "no_rocm", # calls BLAS ops for complex types - "noasan", # times out, b/63678675 - "optonly", # times out, b/79171797 + "//third_party/py/numpy", ], ) @@ -149,8 +149,12 @@ cuda_py_test( name = "linear_operator_diag_test", size = "medium", srcs = ["linear_operator_diag_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", + shard_count = 5, + tags = [ + "noasan", + "optonly", + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -159,11 +163,7 @@ cuda_py_test( "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", "//tensorflow/python:random_ops", - ], - shard_count = 5, - tags = [ - "noasan", - "optonly", + "//tensorflow/python/ops/linalg", ], ) @@ -171,8 +171,12 @@ cuda_py_test( name = "linear_operator_householder_test", size = "medium", srcs = ["linear_operator_householder_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", + shard_count = 5, + tags = [ + "noasan", + "optonly", + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -181,11 +185,7 @@ cuda_py_test( "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", "//tensorflow/python:random_ops", - ], - shard_count = 5, - tags = [ - "noasan", - "optonly", + "//tensorflow/python/ops/linalg", ], ) @@ -193,8 +193,12 @@ cuda_py_test( name = "linear_operator_identity_test", size = "medium", srcs = ["linear_operator_identity_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", + shard_count = 5, + tags = [ + "noasan", + "optonly", + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -202,11 +206,7 @@ cuda_py_test( "//tensorflow/python:linalg_ops", "//tensorflow/python:platform_test", "//tensorflow/python:random_ops", - ], - shard_count = 5, - tags = [ - "noasan", - "optonly", + "//tensorflow/python/ops/linalg", ], ) @@ -214,9 +214,12 @@ cuda_py_test( name = "linear_operator_inversion_test", size = "medium", srcs = ["linear_operator_inversion_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", - "//third_party/py/numpy", + shard_count = 5, + tags = [ + "noasan", # times out, b/63678675 + "optonly", # times out + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -224,11 +227,8 @@ cuda_py_test( "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", - ], - shard_count = 5, - tags = [ - "noasan", # times out, b/63678675 - "optonly", # times out + "//tensorflow/python/ops/linalg", + "//third_party/py/numpy", ], ) @@ -236,19 +236,19 @@ cuda_py_test( name = "linear_operator_full_matrix_test", size = "medium", srcs = ["linear_operator_full_matrix_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", + shard_count = 5, + tags = [ + "noasan", + "optonly", + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:platform_test", - ], - shard_count = 5, - tags = [ - "noasan", - "optonly", + "//tensorflow/python/ops/linalg", ], ) @@ -256,9 +256,13 @@ cuda_py_test( name = "linear_operator_kronecker_test", size = "medium", srcs = ["linear_operator_kronecker_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", - "//third_party/py/numpy", + shard_count = 10, + tags = [ + "noasan", + "optonly", + ], + xla_enable_strict_auto_jit = False, # Fails in XLA b/143610154 + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -266,31 +270,27 @@ cuda_py_test( "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/linalg", + "//third_party/py/numpy", ], - shard_count = 10, - tags = [ - "noasan", - "optonly", - ], - xla_enable_strict_auto_jit = False, # Fails in XLA b/143610154 ) cuda_py_test( name = "linear_operator_lower_triangular_test", size = "medium", srcs = ["linear_operator_lower_triangular_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", + tags = [ + "noasan", + "optonly", + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:platform_test", - ], - tags = [ - "noasan", - "optonly", + "//tensorflow/python/ops/linalg", ], ) @@ -298,19 +298,19 @@ cuda_py_test( name = "linear_operator_low_rank_update_test", size = "medium", srcs = ["linear_operator_low_rank_update_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", + shard_count = 10, + tags = [ + "noasan", # times out + "optonly", + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:platform_test", - ], - shard_count = 10, - tags = [ - "noasan", # times out - "optonly", + "//tensorflow/python/ops/linalg", ], ) @@ -318,8 +318,13 @@ cuda_py_test( name = "linear_operator_permutation_test", size = "medium", srcs = ["linear_operator_permutation_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", + shard_count = 5, + tags = [ + "noasan", + "optonly", + ], + xla_enable_strict_auto_jit = True, + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -328,32 +333,27 @@ cuda_py_test( "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", "//tensorflow/python:random_ops", + "//tensorflow/python/ops/linalg", ], - shard_count = 5, - tags = [ - "noasan", - "optonly", - ], - xla_enable_strict_auto_jit = True, ) cuda_py_test( name = "linear_operator_util_test", size = "medium", srcs = ["linear_operator_util_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", + shard_count = 5, + tags = [ + "noasan", + "optonly", + ], + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:framework", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", - ], - shard_count = 5, - tags = [ - "noasan", - "optonly", + "//tensorflow/python/ops/linalg", ], ) @@ -361,8 +361,14 @@ cuda_py_test( name = "linear_operator_toeplitz_test", size = "medium", srcs = ["linear_operator_toeplitz_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 5, + tags = [ + "no_cuda_on_cpu_tap", # flaky, b/135701551 + "no_gpu", # flaky, b/135701551 + "noasan", # times out, b/63678675 + "optonly", # times out, b/79171797 + ], + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -372,13 +378,7 @@ cuda_py_test( "//tensorflow/python:platform_test", "//tensorflow/python/ops/linalg", "//tensorflow/python/ops/signal", - ], - shard_count = 5, - tags = [ - "no_cuda_on_cpu_tap", # flaky, b/135701551 - "no_gpu", # flaky, b/135701551 - "noasan", # times out, b/63678675 - "optonly", # times out, b/79171797 + "//third_party/py/numpy", ], ) @@ -386,8 +386,9 @@ cuda_py_test( name = "linear_operator_zeros_test", size = "medium", srcs = ["linear_operator_zeros_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", + shard_count = 5, + tags = ["optonly"], # Test is flaky without optimization. + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -395,7 +396,6 @@ cuda_py_test( "//tensorflow/python:linalg_ops", "//tensorflow/python:platform_test", "//tensorflow/python:random_ops", + "//tensorflow/python/ops/linalg", ], - shard_count = 5, - tags = ["optonly"], # Test is flaky without optimization. ) diff --git a/tensorflow/python/kernel_tests/linalg/sparse/BUILD b/tensorflow/python/kernel_tests/linalg/sparse/BUILD index 79290a3ca84..e5a8a93fbf7 100644 --- a/tensorflow/python/kernel_tests/linalg/sparse/BUILD +++ b/tensorflow/python/kernel_tests/linalg/sparse/BUILD @@ -11,15 +11,15 @@ cuda_py_test( name = "conjugate_gradient_test", size = "medium", srcs = ["conjugate_gradient_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg", - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", "//tensorflow/python:math_ops", "//tensorflow/python:platform_test", + "//tensorflow/python/ops/linalg", + "//third_party/py/numpy", ], ) @@ -27,58 +27,58 @@ cuda_py_test( name = "csr_sparse_matrix_test", size = "medium", srcs = ["csr_sparse_matrix_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg/sparse", - ], main = "csr_sparse_matrix_test.py", tags = ["no_rocm"], + deps = [ + "//tensorflow/python/ops/linalg/sparse", + ], ) cuda_py_test( name = "csr_sparse_matrix_ops_test", size = "medium", srcs = ["csr_sparse_matrix_ops_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg/sparse", - "//tensorflow/python/ops/linalg/sparse:gen_sparse_csr_matrix_ops", - ], main = "csr_sparse_matrix_ops_test.py", shard_count = 10, tags = ["no_rocm"], + deps = [ + "//tensorflow/python/ops/linalg/sparse", + "//tensorflow/python/ops/linalg/sparse:gen_sparse_csr_matrix_ops", + ], ) cuda_py_test( name = "csr_sparse_matrix_grad_test", size = "medium", srcs = ["csr_sparse_matrix_grad_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg/sparse", - ], main = "csr_sparse_matrix_grad_test.py", shard_count = 50, tags = ["no_rocm"], + deps = [ + "//tensorflow/python/ops/linalg/sparse", + ], ) cuda_py_test( name = "csr_sparse_matrix_dense_mat_mul_grad_test", size = "medium", srcs = ["csr_sparse_matrix_dense_mat_mul_grad_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg/sparse", - ], main = "csr_sparse_matrix_dense_mat_mul_grad_test.py", shard_count = 50, tags = ["no_rocm"], + deps = [ + "//tensorflow/python/ops/linalg/sparse", + ], ) cuda_py_test( name = "csr_sparse_matrix_sparse_mat_mul_grad_test", size = "medium", srcs = ["csr_sparse_matrix_sparse_mat_mul_grad_test.py"], - additional_deps = [ - "//tensorflow/python/ops/linalg/sparse", - ], main = "csr_sparse_matrix_sparse_mat_mul_grad_test.py", shard_count = 50, tags = ["no_rocm"], + deps = [ + "//tensorflow/python/ops/linalg/sparse", + ], ) diff --git a/tensorflow/python/kernel_tests/random/BUILD b/tensorflow/python/kernel_tests/random/BUILD index 9e395370662..2e3b6ff63d3 100644 --- a/tensorflow/python/kernel_tests/random/BUILD +++ b/tensorflow/python/kernel_tests/random/BUILD @@ -39,8 +39,7 @@ cuda_py_test( name = "multinomial_op_test", size = "small", srcs = ["multinomial_op_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:array_ops", "//tensorflow/python:client", @@ -50,6 +49,7 @@ cuda_py_test( "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", "//tensorflow/python:random_ops", + "//third_party/py/numpy", ], ) @@ -57,8 +57,8 @@ cuda_py_test( name = "multinomial_op_big_test", size = "medium", srcs = ["multinomial_op_big_test.py"], - additional_deps = [ - "//third_party/py/numpy", + shard_count = 3, + deps = [ "//tensorflow/core:protos_all_py", "//tensorflow/python:array_ops", "//tensorflow/python:client", @@ -68,18 +68,18 @@ cuda_py_test( "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:math_ops", "//tensorflow/python:random_ops", + "//third_party/py/numpy", ], - shard_count = 3, ) cuda_py_test( name = "random_crop_test", size = "small", srcs = ["random_crop_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:client_testlib", "//tensorflow/python:random_ops", + "//third_party/py/numpy", ], ) @@ -87,12 +87,12 @@ cuda_py_test( name = "random_ops_test", size = "medium", srcs = ["random_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:random_ops", + "//third_party/py/numpy", ], ) @@ -100,14 +100,14 @@ cuda_py_test( name = "stateless_random_ops_test", size = "medium", srcs = ["stateless_random_ops_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", "//tensorflow/python:platform", "//tensorflow/python:random_ops", "//tensorflow/python:stateless_random_ops", + "//third_party/py/numpy", ], ) @@ -115,26 +115,25 @@ cuda_py_test( name = "random_gamma_test", size = "medium", srcs = ["random_gamma_test.py"], - additional_deps = [ + shard_count = 4, + tags = ["nozapfhahn"], + deps = [ ":util", - "//third_party/py/numpy", "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:platform", "//tensorflow/python:random_ops", + "//third_party/py/numpy", ], - shard_count = 4, - tags = ["nozapfhahn"], ) cuda_py_test( name = "random_grad_test", size = "small", srcs = ["random_grad_test.py"], - additional_deps = [ - "//third_party/py/numpy", + deps = [ "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", @@ -143,6 +142,7 @@ cuda_py_test( "//tensorflow/python:platform", "//tensorflow/python:random_grad", "//tensorflow/python:random_ops", + "//third_party/py/numpy", ], ) @@ -169,14 +169,14 @@ cuda_py_test( name = "random_poisson_test", size = "medium", srcs = ["random_poisson_test.py"], - additional_deps = [ + deps = [ ":util", - "//third_party/py/numpy", "//tensorflow/python:array_ops", "//tensorflow/python:client_testlib", "//tensorflow/python:framework", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:platform", "//tensorflow/python:random_ops", + "//third_party/py/numpy", ], ) diff --git a/tensorflow/python/ops/parallel_for/BUILD b/tensorflow/python/ops/parallel_for/BUILD index dff4b922036..d0c5f4f5593 100644 --- a/tensorflow/python/ops/parallel_for/BUILD +++ b/tensorflow/python/ops/parallel_for/BUILD @@ -107,7 +107,8 @@ py_library( cuda_py_test( name = "control_flow_ops_test", srcs = ["control_flow_ops_test.py"], - additional_deps = [ + tags = ["no_rocm"], + deps = [ ":control_flow_ops", ":test_util", "//tensorflow/core:protos_all_py", @@ -120,21 +121,11 @@ cuda_py_test( "//tensorflow/python:tensor_array_grad", "//tensorflow/python:util", ], - tags = ["no_rocm"], ) cuda_py_test( name = "xla_control_flow_ops_test", srcs = ["xla_control_flow_ops_test.py"], - additional_deps = [ - ":control_flow_ops", - ":test_util", - "//tensorflow/python:random_ops", - "//tensorflow/compiler/tf2xla/python:xla", - "//tensorflow/python/compiler/xla:xla", - "//tensorflow/python:array_ops", - "//tensorflow/python:math_ops", - ], tags = [ "no_rocm", # XLA is not enabled by default on Mac or Windows. @@ -142,16 +133,25 @@ cuda_py_test( "no_windows", ], xla_enabled = True, + deps = [ + ":control_flow_ops", + ":test_util", + "//tensorflow/compiler/tf2xla/python:xla", + "//tensorflow/python:array_ops", + "//tensorflow/python:math_ops", + "//tensorflow/python:random_ops", + "//tensorflow/python/compiler/xla", + ], ) cuda_py_test( name = "array_test", srcs = ["array_test.py"], - additional_deps = [ + deps = [ ":control_flow_ops", ":test_util", - "//tensorflow/python:client_testlib", "//tensorflow/python:array_ops", + "//tensorflow/python:client_testlib", "//tensorflow/python:random_ops", "//tensorflow/python:util", "//tensorflow/python/eager:backprop", @@ -161,7 +161,9 @@ cuda_py_test( cuda_py_test( name = "math_test", srcs = ["math_test.py"], - additional_deps = [ + shard_count = 5, + tags = ["optonly"], # Too slow in non-opt mode + deps = [ ":control_flow_ops", ":test_util", "//tensorflow/python:client_testlib", @@ -169,8 +171,6 @@ cuda_py_test( "//tensorflow/python:random_ops", "//tensorflow/python:util", ], - shard_count = 5, - tags = ["optonly"], # Too slow in non-opt mode ) py_library( @@ -188,16 +188,16 @@ py_library( cuda_py_test( name = "gradients_test", srcs = ["gradients_test.py"], - additional_deps = [ + tags = ["optonly"], # Too slow in non-opt mode + deps = [ ":control_flow_ops", ":gradients", - "//third_party/py/numpy", - "//tensorflow/python:layers", "//tensorflow/python:client_testlib", "//tensorflow/python:control_flow_ops", "//tensorflow/python:functional_ops", + "//tensorflow/python:layers", "//tensorflow/python:random_ops", "//tensorflow/python/ops/losses", + "//third_party/py/numpy", ], - tags = ["optonly"], # Too slow in non-opt mode ) diff --git a/tensorflow/python/profiler/BUILD b/tensorflow/python/profiler/BUILD index 4853d0e6be7..8fba7080898 100644 --- a/tensorflow/python/profiler/BUILD +++ b/tensorflow/python/profiler/BUILD @@ -46,17 +46,6 @@ py_library( cuda_py_test( name = "model_analyzer_test", srcs = ["model_analyzer_test.py"], - additional_deps = [ - ":profile_context", - ":model_analyzer", - "//tensorflow/python/profiler/internal:model_analyzer_testlib", - "//tensorflow/python:client", - "//tensorflow/python:client_testlib", - "//tensorflow/python:framework_for_generated_wrappers", - "//tensorflow/python:distributed_framework_test_lib", - "//tensorflow/python:platform", - "//tensorflow/python:variables", - ], python_version = "PY3", tags = [ "no_pip", @@ -64,23 +53,34 @@ cuda_py_test( "oss_serial", ], xla_enable_strict_auto_jit = False, # Node names are different with autojit + deps = [ + ":model_analyzer", + ":profile_context", + "//tensorflow/python:client", + "//tensorflow/python:client_testlib", + "//tensorflow/python:distributed_framework_test_lib", + "//tensorflow/python:framework_for_generated_wrappers", + "//tensorflow/python:platform", + "//tensorflow/python:variables", + "//tensorflow/python/profiler/internal:model_analyzer_testlib", + ], ) cuda_py_test( name = "profiler_test", srcs = ["profiler_test.py"], - additional_deps = [ + python_version = "PY3", + tags = ["no_pip"], + xla_enable_strict_auto_jit = False, # Node names are different with autojit + deps = [ ":model_analyzer", "//tensorflow/python:client", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:platform", - "//tensorflow/python/profiler/internal:model_analyzer_testlib", "//tensorflow/python:variables", + "//tensorflow/python/profiler/internal:model_analyzer_testlib", ], - python_version = "PY3", - tags = ["no_pip"], - xla_enable_strict_auto_jit = False, # Node names are different with autojit ) py_library( @@ -126,21 +126,21 @@ py_library( cuda_py_test( name = "profile_context_test", srcs = ["profile_context_test.py"], - additional_deps = [ - ":profile_context", - "//tensorflow/python:client", - "//tensorflow/python:client_testlib", - "//tensorflow/python:framework_for_generated_wrappers", - "//tensorflow/python:platform", - "//tensorflow/python/profiler/internal:model_analyzer_testlib", - "//tensorflow/python:variables", - ], python_version = "PY3", tags = [ "no_gpu", # b/136036359 "no_pip", ], xla_enable_strict_auto_jit = False, # Node names are different with autojit + deps = [ + ":profile_context", + "//tensorflow/python:client", + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework_for_generated_wrappers", + "//tensorflow/python:platform", + "//tensorflow/python:variables", + "//tensorflow/python/profiler/internal:model_analyzer_testlib", + ], ) py_library( diff --git a/tensorflow/python/profiler/internal/BUILD b/tensorflow/python/profiler/internal/BUILD index 6e0f5a6f456..8cab716b71b 100644 --- a/tensorflow/python/profiler/internal/BUILD +++ b/tensorflow/python/profiler/internal/BUILD @@ -58,21 +58,21 @@ py_test( cuda_py_test( name = "run_metadata_test", srcs = ["run_metadata_test.py"], - additional_deps = [ - ":model_analyzer_testlib", - "//tensorflow/core/profiler:protos_all_py", - "//tensorflow/python:array_ops", - "//tensorflow/python:client_testlib", - "//tensorflow/python:math_ops", - "//tensorflow/python/profiler:model_analyzer", - "//tensorflow/python:random_ops", - ], python_version = "PY3", tags = [ "no_gpu", # b/138442728 "no_pip", ], xla_enable_strict_auto_jit = False, # Node names are different with autojit + deps = [ + ":model_analyzer_testlib", + "//tensorflow/core/profiler:protos_all_py", + "//tensorflow/python:array_ops", + "//tensorflow/python:client_testlib", + "//tensorflow/python:math_ops", + "//tensorflow/python:random_ops", + "//tensorflow/python/profiler:model_analyzer", + ], ) pybind_extension( diff --git a/tensorflow/python/saved_model/BUILD b/tensorflow/python/saved_model/BUILD index fca87c5c178..b8a059ef148 100644 --- a/tensorflow/python/saved_model/BUILD +++ b/tensorflow/python/saved_model/BUILD @@ -386,27 +386,27 @@ py_library( cuda_py_test( name = "load_test", srcs = ["load_test.py"], - additional_deps = [ - ":load", - ":save", - "@absl_py//absl/testing:parameterized", - "//tensorflow/python:constant_op", - "//tensorflow/python:control_flow_ops", - "//tensorflow/python:cond_v2", # b/118513001 - "//tensorflow/python:while_v2", # b/118513001 - "//tensorflow/python:dtypes", - "//tensorflow/python:lib", - "//tensorflow/python:tensor_spec", - "//tensorflow/python/eager:def_function", - "//tensorflow/python/eager:test", - "//tensorflow/python/module", - "//tensorflow/python/training/tracking:tracking", - ], shard_count = 10, tags = [ "no_gpu", # TODO(b/136560979): flaky "no_mac", # TODO(b/124822121): Re-enable this test. ], + deps = [ + ":load", + ":save", + "//tensorflow/python:cond_v2", # b/118513001 + "//tensorflow/python:constant_op", + "//tensorflow/python:control_flow_ops", + "//tensorflow/python:dtypes", + "//tensorflow/python:lib", + "//tensorflow/python:tensor_spec", + "//tensorflow/python:while_v2", # b/118513001 + "//tensorflow/python/eager:def_function", + "//tensorflow/python/eager:test", + "//tensorflow/python/module", + "//tensorflow/python/training/tracking", + "@absl_py//absl/testing:parameterized", + ], ) tf_py_test( diff --git a/tensorflow/python/training/saving/BUILD b/tensorflow/python/training/saving/BUILD index 83913ddd06f..a8f595f3ac6 100644 --- a/tensorflow/python/training/saving/BUILD +++ b/tensorflow/python/training/saving/BUILD @@ -30,7 +30,7 @@ cuda_py_test( srcs = [ "functional_saver_test.py", ], - additional_deps = [ + deps = [ ":functional_saver", ":saveable_hook", "//tensorflow/python/eager:test",