Repository navigation
Commit ac9857b
authored
Catch a CUDA row built against the wrong minor version (pytorch#21991)
The wheel build refuses a row whose train disagrees with the installed
toolkit, so a
wheel cannot declare one CUDA runtime and be compiled by another. The
check compared
major versions only, and two of the published rows share a major: cu130
and cu132 both
reduce to 13. A cu132 row built on a 13.0 toolkit passed.
That combination is worth catching. The declared runtime dependency is
per major, so it
stays correct, but the device code and the version recorded in the
wheel's local label
both come from the row. The result installs, resolves its dependency,
and claims a
toolkit it was not compiled by.
Read both numbers from the toolkit and compare the pair. The existing
major-only
comparison stays, because it reports a different and blunter problem,
and the new one
runs after it so its message can name both versions.
The detection helper keeps returning whatever the toolkit reports rather
than reading
through the supported-version validator. That was already deliberate:
going through the
validator made the guard blind to any unlisted minor, which is how a
mismatched wheel
got built in the first place, and narrowing it now would reopen that
hole.
Verified against every combination the published rows allow: a cu132 row
on a 13.0
toolkit is now refused and names both versions; cu126 on 12.6, cu130 on
13.0 and cu132
on 13.2 are silent; a cu130 row on a 12.6 toolkit still fails on the
major; and a build
with no toolkit installed is unaffected.1 parent 5030bdd commit ac9857b
2 files changed
Lines changed: 44 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
213 | | - | |
| 212 | + | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
227 | | - | |
228 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
229 | 237 | | |
230 | 238 | | |
231 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
336 | 342 | | |
337 | 343 | | |
338 | 344 | | |
339 | 345 | | |
340 | 346 | | |
341 | 347 | | |
342 | | - | |
| 348 | + | |
343 | 349 | | |
344 | | - | |
| 350 | + | |
| 351 | + | |
345 | 352 | | |
346 | 353 | | |
347 | 354 | | |
| |||
363 | 370 | | |
364 | 371 | | |
365 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
366 | 393 | | |
367 | 394 | | |
368 | 395 | | |
| |||
0 commit comments