tf.distribute: Move old/unused all_reduce util to v1/

PiperOrigin-RevId: 343975576
Change-Id: Idb77013708cf40fb21127adf6e5f65f063f16029
This commit is contained in:
Priya Gupta 2020-11-23 19:43:15 -08:00 committed by TensorFlower Gardener
parent 5bc72656b7
commit b0d40302ec
4 changed files with 37 additions and 37 deletions
tensorflow/python/distribute

View File

@ -16,47 +16,13 @@ exports_files(["LICENSE"])
py_library(
name = "distribute_test_lib_pip",
deps = [
":all_reduce",
":combinations",
":multi_worker_test_base",
":single_loss_example",
":strategy_combinations",
":strategy_test_lib",
":test_util",
],
)
py_library(
name = "all_reduce",
srcs = [
"all_reduce.py",
],
srcs_version = "PY2AND3",
deps = [
"//tensorflow/python:array_ops",
"//tensorflow/python:framework_ops",
"//tensorflow/python:math_ops",
"//tensorflow/python:nccl_ops",
],
)
tf_py_test(
name = "all_reduce_test",
srcs = ["all_reduce_test.py"],
deps = [
":all_reduce",
"//tensorflow/core:protos_all_py",
"//tensorflow/python:array_ops",
"//tensorflow/python:client",
"//tensorflow/python:client_testlib",
"//tensorflow/python:constant_op",
"//tensorflow/python:framework_ops",
"//tensorflow/python:framework_test_lib",
"//tensorflow/python:math_ops",
"//tensorflow/python:platform",
"//tensorflow/python:platform_test",
"//tensorflow/python:state_ops",
"//third_party/py/numpy",
"//tensorflow/python/distribute/v1:all_reduce",
],
)
@ -147,7 +113,6 @@ py_library(
name = "distribute",
srcs_version = "PY2AND3",
deps = [
":all_reduce",
":cross_device_ops",
":distribute_lib",
":mirrored_strategy",

View File

@ -1,3 +1,4 @@
load("//tensorflow:tensorflow.bzl", "tf_py_test")
load("//tensorflow:tensorflow.bzl", "cuda_py_test")
package(
@ -39,3 +40,37 @@ cuda_py_test(
"@absl_py//absl/testing:parameterized",
],
)
py_library(
name = "all_reduce",
srcs = [
"all_reduce.py",
],
srcs_version = "PY2AND3",
deps = [
"//tensorflow/python:array_ops",
"//tensorflow/python:framework_ops",
"//tensorflow/python:math_ops",
"//tensorflow/python:nccl_ops",
],
)
tf_py_test(
name = "all_reduce_test",
srcs = ["all_reduce_test.py"],
deps = [
":all_reduce",
"//tensorflow/core:protos_all_py",
"//tensorflow/python:array_ops",
"//tensorflow/python:client",
"//tensorflow/python:client_testlib",
"//tensorflow/python:constant_op",
"//tensorflow/python:framework_ops",
"//tensorflow/python:framework_test_lib",
"//tensorflow/python:math_ops",
"//tensorflow/python:platform",
"//tensorflow/python:platform_test",
"//tensorflow/python:state_ops",
"//third_party/py/numpy",
],
)

View File

@ -23,7 +23,7 @@ import time
import numpy as np
from tensorflow.core.framework import types_pb2
from tensorflow.python.distribute import all_reduce as ar
from tensorflow.python.distribute.v1 import all_reduce as ar
from tensorflow.python.framework import constant_op
from tensorflow.python.framework import ops
from tensorflow.python.framework import tensor_shape