Skip to content

Commit da7fdca

Browse files
authored
Clean up deprecated APIs (#8927) (#8939)
1 parent e82231f commit da7fdca

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

torch_xla/core/xla_model.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import torch_xla.utils.closures as xc
2222
from torch_xla.distributed.spmd.xla_sharding import ShardingSpec
2323
import os
24-
from torch_xla.experimental.deprecation import deprecated
2524
import torch_xla._internal.utils as _utils
2625

2726
_DEVICES = xu.LazyProperty(lambda: torch_xla._XLAC._xla_get_devices())
@@ -40,15 +39,6 @@
4039

4140
from . import xla_model as this_module
4241

43-
xrt_world_size = deprecated(this_module, torch_xla.runtime.world_size,
44-
'xrt_world_size() will be removed in release 2.7.')
45-
get_ordinal = deprecated(
46-
this_module, torch_xla.runtime.global_ordinal,
47-
'xla_model.get_ordinal() will be removed in release 2.7.')
48-
parse_xla_device = deprecated(
49-
this_module, _utils.parse_xla_device,
50-
'xla_model.parse_xla_device() will be removed in release 2.7.')
51-
5242

5343
class DeviceContext(object):
5444

torch_xla/experimental/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
from .eager import eager_mode, compile, is_eager_mode, eager_mode_context
1+
from .eager import eager_mode, is_eager_mode, eager_mode_context
22

33
__all__ = [
44
"eager_mode",
5-
"compile",
65
"is_eager_mode",
76
"eager_mode_context",
87
]

torch_xla/experimental/eager.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,3 @@ def eager_mode_context(enable: bool):
3030
yield saved_eager_mode
3131
finally:
3232
eager_mode(saved_eager_mode)
33-
34-
35-
def compile(func):
36-
# can's use deprecated wrapper at import time due to circular dependency
37-
logging.warning(
38-
'torch_xla.experimental.compile is deprecated. Use torch_xla.compile instead.'
39-
)
40-
return torch_xla.compile(func)

0 commit comments

Comments
 (0)