Commit 07f3b3a
feat(rp-20): extend probe_gpu_quality with full GPU runtime DLL surface
Before this change, probe_gpu_quality.{sh,ps1} only probed for
libcudnn.so.9 / cudnn64_9.dll. A user with a partial CUDA install
(e.g. cuDNN present but cuFFT missing — common after 'pip install
sparrow-engine-gpu' because the wheel deliberately doesn't bundle
the NVIDIA runtime sidecars) passed the existing probe but failed
at first inference with a libdl / LoadLibraryW error pointing at
whichever sidecar was the actual culprit.
Add probes for the full DT_NEEDED set of ORT 1.25.1's CUDA provider,
plus engine-side nvJPEG.
Ground truth (verified 2026-05-27 via readelf -d on the published
onnxruntime-gpu 1.25.1 wheel's libonnxruntime_providers_cuda.so):
Linux: Windows:
libcudart.so.12 cudart64_12.dll (CUDA runtime base)
libcublas.so.12 cublas64_12.dll (matmul)
libcublasLt.so.12 cublasLt64_12.dll (cuBLAS Lt)
libcurand.so.10 curand64_10.dll (RNG)
libcufft.so.11 cufft64_11.dll (FFT — audio)
libcudnn.so.9 cudnn64_9.dll (existing version-checked)
Plus engine-side (sparrow-engine-gpu/src/decode.rs dlopen'd at first
JpegDecoder::new — yolo.rs / tiled.rs / classifier.rs all raise
SparrowEngineError::NvjpegUnavailable on construction failure):
libnvjpeg.so.12 nvjpeg64_12.dll (image decode)
UX: 'collect ALL missing libs' rather than 'first-failing-wins' so the
user fixes them in one cycle rather than iterating one-DLL-per-rerun.
Verdict semantics: the existing 'cudnn_err' verdict name is preserved
(any new name would force a parallel change in sparrow-engine-install.{sh,ps1}'s
exit-code translation), but the docstring + reason string make clear it
is now the catch-all 'GPU runtime prereq missing' hard-fail bucket.
The reason string carries which specific library is the actual culprit
and the matching pip-sidecar / apt install hint pointing at
docs/user-manual.md §2.5 Option A / B.
Search dirs (Linux):
1. $LD_LIBRARY_PATH (colon-split)
2. ~/.sparrow-engine/cuda-sidecars/lib/python*/site-packages/nvidia/*/lib
(matches the Python sidecar venv pattern from user-manual.md §2.5 Option B
and the brew GPU wrapper's auto-discovery path).
3. /usr/lib/python3/dist-packages/torch/lib (Lambda Stack / PyTorch-bundled)
4. /usr/lib/python3/dist-packages/tensorflow (Lambda Stack / TF-bundled)
5. /usr/local/cuda/lib64 (NVIDIA CUDA toolkit)
6. /usr/lib/x86_64-linux-gnu (Ubuntu apt nvidia-cudnn)
7. /usr/lib64 + /usr/lib (RHEL / fallback)
Search dirs (Windows):
1. %SystemRoot%\System32
2. %CUDA_PATH%\bin
3. %CUDA_PATH_V*_*%\bin (side-by-side CUDA Toolkit installs)
Defensive: PS Search-RequiredDll guards $env:SystemRoot null (Linux pwsh
test surface) to avoid noisy Join-Path errors. Windows always has it set.
The existing cuDNN version-floor check + compute-cap (sm_80) check are
preserved unchanged behind the new gate (if all required libs are
present, the existing checks run as before).
Local validation: GREEN end-to-end on the dev-box (cuDNN 9.19, all 6
sidecars present); PowerShell parser GREEN (dotnet pwsh 7.6 ParseFile).
Refs: RP-20 (docs/ideas.md:249), OQ-2026-05-27-2 (related — CLI tarball lane).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent d9da0e5 commit 07f3b3a
2 files changed
Lines changed: 237 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
8 | 17 | | |
9 | 18 | | |
10 | | - | |
| 19 | + | |
11 | 20 | | |
12 | 21 | | |
13 | 22 | | |
| |||
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
24 | 39 | | |
25 | 40 | | |
26 | 41 | | |
| |||
40 | 55 | | |
41 | 56 | | |
42 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
43 | 65 | | |
44 | 66 | | |
45 | 67 | | |
46 | 68 | | |
47 | 69 | | |
48 | 70 | | |
49 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
50 | 105 | | |
51 | 106 | | |
52 | 107 | | |
53 | 108 | | |
54 | 109 | | |
55 | 110 | | |
56 | 111 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
64 | 121 | | |
65 | | - | |
66 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
67 | 128 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 129 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
78 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
79 | 148 | | |
80 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
81 | 156 | | |
82 | 157 | | |
83 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
10 | 20 | | |
11 | 21 | | |
12 | | - | |
| 22 | + | |
13 | 23 | | |
14 | 24 | | |
15 | 25 | | |
| |||
21 | 31 | | |
22 | 32 | | |
23 | 33 | | |
24 | | - | |
| 34 | + | |
25 | 35 | | |
26 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
27 | 43 | | |
28 | 44 | | |
29 | 45 | | |
| |||
40 | 56 | | |
41 | 57 | | |
42 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
43 | 67 | | |
44 | 68 | | |
45 | 69 | | |
| |||
51 | 75 | | |
52 | 76 | | |
53 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
54 | 136 | | |
55 | 137 | | |
56 | 138 | | |
57 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
58 | 192 | | |
59 | 193 | | |
60 | 194 | | |
| |||
0 commit comments