Skip to content

Commit

Permalink
moved tpu_device_exists to lightning.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lezwon committed Aug 31, 2020
1 parent e150678 commit f52321a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pytorch_lightning/core/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@
from pytorch_lightning.utilities.device_dtype_mixin import DeviceDtypeModuleMixin
from pytorch_lightning.utilities.parsing import AttributeDict, collect_init_args, get_init_args
from pytorch_lightning.core.step_result import TrainResult, EvalResult
from pytorch_lightning.utilities.xla_device_utils import TPU_AVAILABLE
from pytorch_lightning.utilities.xla_device_utils import tpu_device_exists

TPU_AVAILABLE = tpu_device_exists()
if TPU_AVAILABLE:
import torch_xla.core.xla_model as xm

Expand Down
2 changes: 0 additions & 2 deletions pytorch_lightning/utilities/xla_device_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,3 @@ def tpu_device_exists():
else:
return False


TPU_AVAILABLE = tpu_device_exists()

0 comments on commit f52321a

Please sign in to comment.