Skip to content

Commit c2cfa7a

Browse files
authored
Merge pull request #75 from MISHANMAURYA/skip_cpu_test_upstream_main_rocm_enabled
Skip_cpu_test_upstream_main_rocm_enabled
2 parents 539f01b + bdd6754 commit c2cfa7a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
import torch
99

10+
from bitsandbytes.cextension import HIP_ENVIRONMENT
11+
1012
test_dims_rng = random.Random(42)
1113

1214

@@ -21,7 +23,7 @@ def get_available_devices():
2123
# If the environment variable is set, use it directly.
2224
return [os.environ["BNB_TEST_DEVICE"]]
2325

24-
devices = ["cpu"]
26+
devices = [] if HIP_ENVIRONMENT else ["cpu"]
2527

2628
if hasattr(torch, "accelerator"):
2729
# PyTorch 2.6+ - determine accelerator using agnostic API.

0 commit comments

Comments
 (0)