Commit 747da69
Fix Windows unittest CI: force CPU-only build to avoid CUDA DLL load failure
The Windows CI image ships CUDA toolkits on PATH. After adding (13, 2) to
SUPPORTED_CUDA_VERSIONS (#20440), install_executorch's auto-detection
(setup.py: is_cuda_available() via nvcc) started returning True on the Windows
runner (which has the CUDA 13.2 toolkit), so it flipped EXECUTORCH_BUILD_CUDA=ON.
But the unittest jobs install CPU torch, so the resulting CUDA build of
_portable_lib fails to load its CUDA DLLs at import time:
ImportError: DLL load failed while importing _portable_lib
causing all pytest collection to error out (unittest / unittest-editable /
unittest-release on windows).
Add a -cpuOnly switch to setup-windows.ps1 that forces
-DEXECUTORCH_BUILD_CUDA=OFF via CMAKE_ARGS, and pass it from the CPU unittest
workflow. The CUDA Windows jobs (cuda-windows.yml) keep the default and are
unaffected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 6021a58 commit 747da69
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
16 | 27 | | |
17 | 28 | | |
18 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
0 commit comments