Make torch xla available on GPU (#29334)
* add USE_TORCH_XLA env * rename torch_tpu to torch_xla * better is_torch_xla_available; fix some fsdp and performance issues * fix format * fix bug when pjrt_device is cpu * fix bug * fix the deprecation handling --------- Co-authored-by: anw90 <ang868@gmail.com> Co-authored-by: wangang.wa <wangang.wa@alibaba-inc.com>
This commit is contained in:
@@ -21,7 +21,7 @@ import sys
|
||||
from time import time
|
||||
from unittest.mock import patch
|
||||
|
||||
from transformers.testing_utils import TestCasePlus, require_torch_tpu
|
||||
from transformers.testing_utils import TestCasePlus, require_torch_xla
|
||||
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
@@ -44,7 +44,7 @@ stream_handler = logging.StreamHandler(sys.stdout)
|
||||
logger.addHandler(stream_handler)
|
||||
|
||||
|
||||
@require_torch_tpu
|
||||
@require_torch_xla
|
||||
class TorchXLAExamplesTests(TestCasePlus):
|
||||
def test_run_glue(self):
|
||||
import xla_spawn
|
||||
|
||||
Reference in New Issue
Block a user