Skip to content

Commit ecbe70b

Browse files
[TEST] Fix triton_kernels IGC after bea27e3
Signed-off-by: Whitney Tsang <whitney.tsang@intel.com>
1 parent 57c0faf commit ecbe70b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/triton_kernels/tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ def pytest_configure(config):
3737
if worker_id is not None and worker_id.startswith("gw"):
3838
import torch
3939
gpu_id = int(worker_id[2:]) # map gw0 → 0, gw1 → 1, ...
40-
os.environ["CUDA_VISIBLE_DEVICES"] = str(gpu_id % torch.cuda.device_count())
40+
if torch.cuda.is_available():
41+
os.environ["CUDA_VISIBLE_DEVICES"] = str(gpu_id % torch.cuda.device_count())

0 commit comments

Comments
 (0)