Repository navigation
Commit 41db862
authored
Restore the banked memory planner after the storage_base rename (pytorch#22231)
### Summary
pytorch#21840 renamed _resolve_inplace_specs to _resolve_storage_base_specs and
TensorSpec.inplace_base to storage_base, and deleted materialize_buffer.
exir/banked_memory_planning.py imported the first of those, so the
module stopped importing and exir/tests/test_banked_memory_planning.py
failed at collection. That single collection error red-lighted every
unittest, unittest-editable and unittest-release job on main.
Moving the banked planner onto the new names is the whole fix.
_resolve_storage_base_specs already applies storage_base_offset when it
places a deferred spec inside its base's shared object, so the planner
gains offset support without further change. The banked planner had no
coverage of a non-zero offset, so a test pins down that a storage-backed
spec lands at its offset inside the base, in the base's bank, without
costing the bank anything.
The packed_size test helper wanted only the total, so it sums the shared
object sizes instead of reviving materialize_buffer.
Authored with Claude Code.1 parent 6755ea3 commit 41db862
2 files changed
Lines changed: 25 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
| |||
236 | 238 | | |
237 | 239 | | |
238 | 240 | | |
239 | | - | |
| 241 | + | |
240 | 242 | | |
241 | | - | |
| 243 | + | |
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
121 | | - | |
| 120 | + | |
122 | 121 | | |
123 | 122 | | |
124 | 123 | | |
| |||
661 | 660 | | |
662 | 661 | | |
663 | 662 | | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
664 | 677 | | |
665 | 678 | | |
666 | 679 | | |
| |||
0 commit comments