mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-02 03:01:07 +06:00
Don't init TPU device twice (#4916)
This commit is contained in:
parent
ef2dcdccaa
commit
466aa57a45
@ -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=
|
||||
|
Loading…
Reference in New Issue
Block a user