Apply name change(experimental_run_v2 -> run) for all callers in Tensorflow.
PiperOrigin-RevId: 301617216 Change-Id: I17624641a96dac369b52833d9c72c3d4d2172596
This commit is contained in:
parent
1f28da1bd5
commit
c74e9eca85
@ -137,7 +137,7 @@ class TPUStrategyTest(test.TestCase):
|
||||
def computation():
|
||||
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,
|
||||
"TPU compilation failed"):
|
||||
@ -149,7 +149,7 @@ class TPUStrategyTest(test.TestCase):
|
||||
def computation():
|
||||
return random_ops.random_normal([10])
|
||||
|
||||
return strategy.experimental_run_v2(computation)
|
||||
return strategy.run(computation)
|
||||
|
||||
good_run()
|
||||
|
||||
|
@ -223,7 +223,7 @@ def tpu_replicated_input_resolver(op, resource_reads, resource_writes):
|
||||
return False
|
||||
# Replace tensors in `resource_inputs` which are outputs of TPUReplicatedInput
|
||||
# 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`.
|
||||
def replace_with_unreplicated_resources(resource_inputs):
|
||||
"""Replaces handles in `resource_inputs` with their unreplicated inputs."""
|
||||
|
@ -40,7 +40,7 @@ def _convert_to_per_replicas(distribution, values):
|
||||
Returns:
|
||||
`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],
|
||||
args=(values,)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user