Skip to content

Commit 081d63c

Browse files
author
Austin Glover
committed
added a validation check to the action to see which condition is not triggering
1 parent d172e3b commit 081d63c

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/verify_extension_build.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,24 @@ jobs:
3131
pip install -r .github/workflows/requirements_cuda_ci.txt
3232
pip install -e .
3333
34+
- name: Validate CUDA environment
35+
run: |
36+
python - <<'PY'
37+
import os
38+
import sys
39+
import torch
40+
41+
cuda_home = os.environ.get("CUDA_HOME")
42+
if not cuda_home:
43+
sys.exit("CUDA_HOME is not set; CUDA toolkit may not be available.")
44+
print(f"CUDA_HOME={cuda_home}")
45+
46+
cuda_version = getattr(torch.version, "cuda", None)
47+
if not cuda_version:
48+
sys.exit("torch.version.cuda is empty; torch may not have CUDA support.")
49+
print(f"torch.version.cuda={cuda_version}")
50+
PY
51+
3452
- name: Test extension build via import
3553
run: |
36-
pytest tests/import_test.py -k test_extension_built
54+
pytest tests/import_test.py -k test_extension_built

0 commit comments

Comments
 (0)