We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 539f01b + bdd6754 commit c2cfa7aCopy full SHA for c2cfa7a
1 file changed
tests/helpers.py
@@ -7,6 +7,8 @@
7
8
import torch
9
10
+from bitsandbytes.cextension import HIP_ENVIRONMENT
11
+
12
test_dims_rng = random.Random(42)
13
14
@@ -21,7 +23,7 @@ def get_available_devices():
21
23
# If the environment variable is set, use it directly.
22
24
return [os.environ["BNB_TEST_DEVICE"]]
25
- devices = ["cpu"]
26
+ devices = [] if HIP_ENVIRONMENT else ["cpu"]
27
28
if hasattr(torch, "accelerator"):
29
# PyTorch 2.6+ - determine accelerator using agnostic API.
0 commit comments