Skip to content

Commit 122d546

Browse files
committed
add pl_multi_process_test decorator to TPU num_devices test
1 parent ed83e26 commit 122d546

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/accelerators/test_tpu.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def test_accelerator_cpu_with_tpu_cores_flag():
9494

9595

9696
@RunIf(tpu=True)
97+
@pl_multi_process_test
9798
@pytest.mark.parametrize(["accelerator", "devices"], [("auto", 8), ("auto", "auto"), ("tpu", None)])
9899
def test_accelerator_tpu(accelerator, devices):
99100
assert TPUAccelerator.is_available()
@@ -117,8 +118,8 @@ def test_accelerator_tpu_with_tpu_cores_priority():
117118

118119

119120
@RunIf(tpu=True)
121+
@pl_multi_process_test
120122
def test_set_devices_if_none_tpu():
121-
122123
trainer = Trainer(accelerator="tpu", tpu_cores=8)
123124
assert trainer.num_devices == 8
124125

@@ -313,6 +314,7 @@ def test_warning_if_tpus_not_used():
313314

314315

315316
@RunIf(tpu=True)
317+
@pl_multi_process_test
316318
@pytest.mark.parametrize(
317319
["devices", "expected_device_ids"],
318320
[

0 commit comments

Comments
 (0)