Repository navigation
Commit 05994b9
fix(inference): join NVML and DXGI on PCI identity, not adapter name
Shared GPU memory is discovered through DXGI and attached to the NVML device it
belongs to by matching adapter *name*. The two APIs do not always report the same
name for the same physical adapter, and when they disagree the match silently
fails, SharedGpuMemoryBytes stays null, and the adapter is assessed on its
dedicated pool alone.
On a unified-memory part that is the difference between working and not. Measured
on a DGX Spark (GB10) engineering unit:
NVML name : 'JMJWOA-Generic-GPU' shared: null
DXGI name : 'RTX Spark GPU' SharedSystemMemory: 30.07 GiB
=> no match, 30.07 GiB discarded
The adapter is then judged to have 15.94 GiB instead of 46.01 GiB, and every model
in the catalog fails eligibility with InsufficientGpuMemory:
Qwen3.6 35B-A3B required 34.11 GiB detected 15.94 GiB Unsupported
Qwen3.6 27B required 39.93 GiB detected 15.94 GiB Unsupported
Qwen3.5 9B required 21.47 GiB detected 15.94 GiB Unsupported
There is no diagnostic pointing at the cause: the failure reads as "this machine
is too small", not "the join failed".
DXGI already reads VendorId, DeviceId and SubSystemId in DXGI_ADAPTER_DESC1 and
discards them. NVML exposes the same identity via nvmlDeviceGetPciInfo_v3, which
packs pciDeviceId as (deviceId << 16) | vendorId. This joins on that identity and
keeps the name match as a fallback, so behaviour is unchanged wherever the names
already agree or PCI identity is unavailable. The identity match requires exactly
one candidate, so an ambiguous set still attributes nothing.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01BE8kMbmSjPCwd8i9GJEsqx1 parent ff3fb35 commit 05994b9
2 files changed
Lines changed: 103 additions & 5 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
89 | 95 | | |
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
93 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
94 | 104 | | |
95 | 105 | | |
96 | 106 | | |
| |||
209 | 219 | | |
210 | 220 | | |
211 | 221 | | |
212 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
| |||
115 | 122 | | |
116 | 123 | | |
117 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
118 | 146 | | |
119 | 147 | | |
120 | 148 | | |
| |||
181 | 209 | | |
182 | 210 | | |
183 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
184 | 224 | | |
185 | 225 | | |
186 | 226 | | |
| |||
207 | 247 | | |
208 | 248 | | |
209 | 249 | | |
210 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
211 | 271 | | |
212 | 272 | | |
213 | 273 | | |
| |||
311 | 371 | | |
312 | 372 | | |
313 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
314 | 398 | | |
315 | 399 | | |
316 | 400 | | |
317 | 401 | | |
318 | 402 | | |
319 | 403 | | |
320 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
321 | 407 | | |
322 | 408 | | |
323 | 409 | | |
| |||
0 commit comments