Skip to content

Commit f1fe8bc

Browse files
authored
Clean up deprecated APIs (#8927)
1 parent f0881b5 commit f1fe8bc

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
@@ -22,7 +22,6 @@
2222
from torch_xla.distributed.spmd.xla_sharding import ShardingSpec
2323
from torch_xla.distributed.xla_multiprocessing import create_optimized_replica_groups
2424
import os
25-
from torch_xla.experimental.deprecation import deprecated
2625
import torch_xla._internal.utils as _utils
2726

2827
_DEVICES = xu.LazyProperty(lambda: torch_xla._XLAC._xla_get_devices())
@@ -41,15 +40,6 @@
4140

4241
from . import xla_model as this_module
4342

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

5444
class DeviceContext(object):
5545

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)