Commit 2ddbd0f
Guard GPU device queries on CPU lane in verify script
Summary:
`__verify_pytorch_gpu_integration` in .github/scripts/utils_pytorch.bash
computed `torch_cuda_available` but never used it, then called
`torch.cuda.get_device_capability()` and `get_device_name()`
unconditionally. On the CPU lane (torch built without CUDA) these raise
"Torch not compiled with CUDA enabled", failing the whole GPU-integration
check and the fbgemm_gpu_ci_cpu job.
Guard both device-property queries behind `torch_cuda_available == True`;
print an explicit "N/A (CUDA not available)" placeholder on CPU so the
report block still renders. Surfaced during the torch-2.14 CI triage
(T277878947); independent of any torch version.
Differential Revision: D1183160511 parent f51f3f4 commit 2ddbd0f
1 file changed
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
34 | 43 | | |
35 | 44 | | |
36 | 45 | | |
| |||
0 commit comments