Repository navigation
Commit 8d2bde0
committed
Treat a torch that fails with an ImportError as missing, as before
When importing torch raised an ImportError, for example because one of its
shared libraries is missing, the bindings used to return ExecuTorchResult
outputs, as if torch were not installed. When the torch import moved to
the first call that needs it, only a ModuleNotFoundError for torch itself
counted as missing, so such a torch made every call raise. That was the
only change in output type that had no warning period.
Count every ImportError as missing again, so these setups keep working as
they did. Any other error from importing torch is still raised, with a note
on how to run without it.1 parent baf7b9a commit 8d2bde0
4 files changed
Lines changed: 18 additions & 21 deletions
File tree
- docs/source
- extension/pybindings
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
802 | 802 | | |
803 | 803 | | |
804 | 804 | | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
417 | 412 | | |
418 | 413 | | |
419 | | - | |
| 414 | + | |
420 | 415 | | |
421 | 416 | | |
422 | 417 | | |
| |||
425 | 420 | | |
426 | 421 | | |
427 | 422 | | |
428 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
429 | 426 | | |
430 | 427 | | |
431 | 428 | | |
432 | | - | |
| 429 | + | |
433 | 430 | | |
434 | 431 | | |
435 | 432 | | |
| |||
0 commit comments