Skip to content
This repository was archived by the owner on Jan 21, 2025. It is now read-only.

Commit 4861b11

Browse files
BrianWiederMesh TensorFlow Team
authored and
Mesh TensorFlow Team
committed
Move convert_to_tensor, convert_to_tensor_v1, convert_to_tensor_v1_with_dispatch, convert_to_tensor_v2_with_dispatch, and convert_to_tensor_v2 into tensor_conversion_registry.
Also renaming `tensor_conversion_registry` to `tensor_conversion` to match. PiperOrigin-RevId: 515693810
1 parent 4513b6c commit 4861b11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mesh_tensorflow/tpu_variables.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
# pylint: disable=g-direct-tensorflow-import
2626
from tensorflow.python.framework import ops
27-
from tensorflow.python.framework import tensor_conversion_registry
27+
from tensorflow.python.framework import tensor_conversion
2828
from tensorflow.python.ops import control_flow_ops
2929
from tensorflow.python.ops import gen_resource_variable_ops
3030

@@ -224,7 +224,7 @@ def _tensor_conversion(var, dtype=None, name=None, as_ref=False):
224224
return var._dense_var_to_tensor(dtype=dtype, name=name, as_ref=as_ref) # pylint: disable=protected-access
225225

226226

227-
tensor_conversion_registry.register_tensor_conversion_function(
227+
tensor_conversion.register_tensor_conversion_function(
228228
ReplicatedVariable, _tensor_conversion)
229229

230230
if not TF_23:

0 commit comments

Comments
 (0)