Commit d88b620
fix(codegen): eliminate dead optimizer L3 arena allocation (#25)
The arena-elimination regex in _patch_shared_buffers only matched
pi_*_malloc (L2) but not cl_ram_malloc (L3). When all optimizer I/O
buffers are shared with the training network, the L3 arena has no
remaining pointer-arithmetic references and should be removed — but
the regex silently failed to match the cl_ram_malloc call, leaving a
dead allocation that wastes external RAM.
Extend the pattern to match both pi_*_malloc and cl_ram_malloc so the
dead-code check works uniformly across all memory levels.
Co-authored-by: Run Wang <runwang@skylab.ee.ethz.ch>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 42f87d2 commit d88b620
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | | - | |
| 586 | + | |
| 587 | + | |
587 | 588 | | |
588 | 589 | | |
589 | 590 | | |
| |||
0 commit comments