Apply name change(experimental_run_v2 -> run) for all callers in Tensorflow.

PiperOrigin-RevId: 301617216
Change-Id: I17624641a96dac369b52833d9c72c3d4d2172596
This commit is contained in:
Ken Franko 2020-03-18 10:30:09 -07:00 committed by TensorFlower Gardener
parent 1f28da1bd5
commit c74e9eca85
3 changed files with 4 additions and 4 deletions

View File

@ -137,7 +137,7 @@ class TPUStrategyTest(test.TestCase):
def computation(): def computation():
return random_ops.random_gamma([10], [0.5, 1.5]) return random_ops.random_gamma([10], [0.5, 1.5])
return strategy.experimental_run_v2(computation) return strategy.run(computation)
with self.assertRaisesRegexp(errors.InvalidArgumentError, with self.assertRaisesRegexp(errors.InvalidArgumentError,
"TPU compilation failed"): "TPU compilation failed"):
@ -149,7 +149,7 @@ class TPUStrategyTest(test.TestCase):
def computation(): def computation():
return random_ops.random_normal([10]) return random_ops.random_normal([10])
return strategy.experimental_run_v2(computation) return strategy.run(computation)
good_run() good_run()

View File

@ -223,7 +223,7 @@ def tpu_replicated_input_resolver(op, resource_reads, resource_writes):
return False return False
# Replace tensors in `resource_inputs` which are outputs of TPUReplicatedInput # Replace tensors in `resource_inputs` which are outputs of TPUReplicatedInput
# with the actual replicated inputs. This allows ACD to correct add control # with the actual replicated inputs. This allows ACD to correct add control
# deps when there are multiple calls to `experimental_run_v2` in a # deps when there are multiple calls to `run` in a
# `tf.function`. # `tf.function`.
def replace_with_unreplicated_resources(resource_inputs): def replace_with_unreplicated_resources(resource_inputs):
"""Replaces handles in `resource_inputs` with their unreplicated inputs.""" """Replaces handles in `resource_inputs` with their unreplicated inputs."""

View File

@ -40,7 +40,7 @@ def _convert_to_per_replicas(distribution, values):
Returns: Returns:
`values`, but each element has been converted to a PerReplica value. `values`, but each element has been converted to a PerReplica value.
""" """
return distribution.experimental_run_v2( return distribution.run(
lambda values: [array_ops.identity(v) for v in values], lambda values: [array_ops.identity(v) for v in values],
args=(values,) args=(values,)
) )