diff --git a/torch_xla/core/xla_model.py b/torch_xla/core/xla_model.py index b5f82675647..b1c7d4c3023 100755 --- a/torch_xla/core/xla_model.py +++ b/torch_xla/core/xla_model.py @@ -18,10 +18,12 @@ import torch_xla.utils.utils as xu import torch_xla.utils.closures as xc + def _lazy_get_device(): runtime._maybe_select_default_device() return torch_xla._XLAC._xla_get_devices() + _DEVICES = xu.LazyProperty(_lazy_get_device) REDUCE_SUM = 'sum'