Skip to content

Commit 87ff45a

Browse files
authored
Skip Testtest_galore_quant.py for ROCm (#1983)
Skip tests in `test_galore_quant.py` if CUDA is unavailable or ROCM is enabled, improving test reliability across different environments.
1 parent 173d38f commit 87ff45a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/quantization/test_galore_quant.py

+8
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
except ImportError: # noqa: F401
1616
pytest.skip("triton is not installed", allow_module_level=True) # noqa: F401
1717
import torch
18+
19+
# Skip entire test if CUDA is not available or ROCM is enabled
20+
if not torch.cuda.is_available() or torch.version.hip is not None:
21+
pytest.skip(
22+
"CUDA is not available/ ROCM support is under development",
23+
allow_module_level=True,
24+
)
25+
1826
from bitsandbytes.functional import (
1927
create_dynamic_map,
2028
dequantize_blockwise,

0 commit comments

Comments
 (0)