Repository navigation
Commit 74f957a
authored
Re-land Python buffer inputs after internal CI fixes (pytorch#23535)
## Summary
Corrected re-land of pytorch#23088 after pytorch#23532.
- accept NumPy arrays and other CPU Python buffer providers directly
- retain borrowed storage for the runtime input lifetime
- handle empty and read-only buffers safely
- reject resized borrowed inputs before execution
- preserve all existing Torch-input behavior
- avoid importing torch on buffer-only call paths
## Internal CI fixes
- removed unsupported ChannelsLast3d bridging from the portable Torch
path
- restored legacy RuntimeError behavior for unsupported Torch layouts
- kept the zero-source tensor-copy behavior unchanged
- added regression coverage for buffer-only calls and empty tensor
copies
## Test plan
- Python syntax validation
- internal ATen and portable pybindings targets
- internal standard and custom-library variants
- low-level ATen tensor utility tests
Differential Revision: D1238934541 parent 9b5758f commit 74f957a
7 files changed
Lines changed: 803 additions & 40 deletions
File tree
- extension/pybindings
- test
- runtime/core/exec_aten/util
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
0 commit comments