Skip to content

Commit

Permalink
support backward compatibility of the old imports
Browse files Browse the repository at this point in the history
  • Loading branch information
yeounoh committed Nov 10, 2023
1 parent 09cb218 commit 2ac9dc0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions torch_xla/experimental/xla_sharded_tensor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Keep this for backward compatibility.
# TODO(yeounoh) remove after 2.2 release.
import warnings

warnings.warn(
"Importing from `torch_xla.experimental.xla_sharded_tensor` will be deprecated "
"after 2.2 release. Please use `torch_xla.experimental.spmd` "
"instead.", DeprecationWarning, 2)

from .spmd.xla_sharded_tensor import *
10 changes: 10 additions & 0 deletions torch_xla/experimental/xla_sharding.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Keep this for backward compatibility.
# TODO(yeounoh) remove after 2.2 release.
import warnings

warnings.warn(
"Importing from `torch_xla.experimental.xla_sharding` will be deprecated "
"after 2.2 release. Please use `torch_xla.experimental.spmd` instead.",
DeprecationWarning, 2)

from .spmd.xla_sharding import *

0 comments on commit 2ac9dc0

Please sign in to comment.