Skip to content

Commit d1cf100

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 012e18a commit d1cf100

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/lightning/fabric/accelerators/xla.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def register_accelerators(cls, accelerator_registry: _AcceleratorRegistry) -> No
104104
_XLA_GREATER_EQUAL_2_1 = RequirementCache("torch_xla>=2.1")
105105
_XLA_GREATER_EQUAL_2_5 = RequirementCache("torch_xla>=2.5")
106106

107+
107108
def _using_pjrt() -> bool:
108109
# `using_pjrt` is removed in torch_xla 2.5
109110
if _XLA_GREATER_EQUAL_2_5:

tests/tests_fabric/accelerators/test_xla.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_get_parallel_devices_raises(tpu_available):
4545
with pytest.raises(ValueError, match="Could not parse.*anything-else'"):
4646
XLAAccelerator.get_parallel_devices("anything-else")
4747

48+
4849
@pytest.mark.skipif(not _XLA_AVAILABLE, reason="test requires torch_xla to be present")
4950
def test_instantiate_xla_accelerator():
50-
xla_accelerator = XLAAccelerator()
51+
xla_accelerator = XLAAccelerator()

0 commit comments

Comments
 (0)