Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 13 additions & 0 deletions tests/llmcompressor/transformers/compression/test_has_gpu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import os

import pytest
import torch


@pytest.mark.skipif(os.getenv("GITHUB_ACTIONS") != "true", reason="Only run for GHA")
def test_has_gpu():
"""
This test exists purely to raise an error if
a runner performs transformers tests without a GPU
"""
assert torch.cuda.is_available()
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ def test_model_shared_tensors_gpu(
)


@pytest.mark.skipif(not torch.cuda.is_available(), reason="requires gpu")
@pytest.mark.parametrize(
"model_stub, recipe, sparse_format, quant_format",
[
Expand Down
Loading