Commit 804f709
authored
Avoid COW ABI dependency in ATen bridge (#20808)
Summary:
- Add a local helper to fetch the mutable ATen tensor storage pointer
without calling Tensor::mutable_data_ptr().
- Use it when aliasing ATen tensors into ExecuTorch tensors so rebuilt
training pybindings do not depend on C10 COW materializer symbols.
- Preserve tensor-view offsets by applying storage_offset() *
itemsize().
- Import the XOR model relatively from the XOR exporter, so Android
source-tree model export does not load the stale installed training
pybinding before the wheel is rebuilt.
Why:
- _training_lib can fail to import when built against a Torch/C10 ABI
exposing materialize_cow_storage but loaded with a newer Torch runtime
where that symbol changed.
- The Android CI job installs the currently published executorch wheel,
so it needs the XOR exporter to avoid importing that stale native
training binding while generating test resources from source.1 parent f4b01a8 commit 804f709
2 files changed
Lines changed: 23 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
20 | 36 | | |
21 | 37 | | |
22 | 38 | | |
| |||
139 | 155 | | |
140 | 156 | | |
141 | 157 | | |
142 | | - | |
| 158 | + | |
| 159 | + | |
143 | 160 | | |
144 | 161 | | |
145 | 162 | | |
| |||
163 | 180 | | |
164 | 181 | | |
165 | 182 | | |
166 | | - | |
| 183 | + | |
167 | 184 | | |
168 | 185 | | |
169 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
0 commit comments