Skip to content

Commit 8d33462

Browse files
Disable fsdp1 tests on single gpu
Signed-off-by: Keval Morabia <[email protected]>
1 parent 728f30a commit 8d33462

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/examples/llm_qat/test_llm_qat.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616

1717
import pytest
18+
import torch
1819
from _test_utils.examples.run_command import run_example_command
1920

2021

@@ -37,7 +38,7 @@ def _run_command(extra_cmd_args: list[str]):
3738
)
3839

3940
@pytest.mark.parametrize("backend", [
40-
"fsdp1",
41+
pytest.param("fsdp1", marks=pytest.mark.skipif(torch.cuda.device_count() < 2, reason="need 2 GPUs!")),
4142
"fsdp2",
4243
"deepspeed",
4344
"ddp",
@@ -68,7 +69,7 @@ def test_llama_qat_int4w_int8a(tiny_llama_path, tmp_path, backend):
6869
)
6970

7071
@pytest.mark.parametrize("backend", [
71-
"fsdp1",
72+
pytest.param("fsdp1", marks=pytest.mark.skipif(torch.cuda.device_count() < 2, reason="need 2 GPUs!")),
7273
"fsdp2",
7374
"deepspeed",
7475
"ddp",

tests/examples/speculative_decoding/test_medusa.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def test_llama_medusa_fp8_qat(tiny_llama_path, num_gpus, tiny_daring_anteater_pa
6767
"--output_dir", tmp_path / "medusa-tinyllama-qat-finetune",
6868
"--quant_cfg", "FP8_DEFAULT_CFG",
6969
"--calib_size", "64",
70+
"--backend", "fsdp2",
7071
],
7172
"llm_qat",
7273
)

0 commit comments

Comments
 (0)