Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/test_optim.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,15 @@ def test_optimizer8bit(dim1, dim2, gtype, optim_name, device):
@pytest.mark.parametrize("dim2", [4096], ids=id_formatter("dim2"))
@pytest.mark.parametrize("gtype", [torch.float32, torch.bfloat16, torch.float16], ids=describe_dtype)
@pytest.mark.parametrize("optim_name", optimizer_names_benchmark, ids=id_formatter("opt"))
@pytest.mark.parametrize("device", get_available_devices(), ids=id_formatter("device"))
@pytest.mark.benchmark
def test_benchmark_blockwise(dim1, dim2, gtype, optim_name, device):
if device == "cpu" and optim_name.startswith("paged_"):
pytest.skip("Paged optimizers are not meaningful on CPU")

if optim_name.startswith("paged_") and sys.platform == "win32":
pytest.skip("Paged optimizers can have issues on Windows.")

if dim1 == 1 and dim2 == 1:
return
p1 = torch.randn(dim1, dim2, device=device, dtype=gtype) * 0.1
Expand Down