Don't init TPU device twice (#4916)

This commit is contained in:
Lysandre Debut 2020-06-10 15:53:15 -04:00 committed by GitHub
parent ef2dcdccaa
commit 466aa57a45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,9 +71,7 @@ except ImportError:
try:
import torch_xla.core.xla_model as xm
tpu_device = xm.xla_device()
import torch_xla.core.xla_model as xm # noqa: F401
if _torch_available:
_torch_tpu_available = True # pylint: disable=