Commit a8694f7
committed
Phase-2: split cap (constants only) + users>=2 filter (activations)
Two refinements after the L2 reservation fix:
1. The 2 KB cap (Phase-1 \xc2\xa710.1) now applies ONLY to ConstantBuffers.
Activations are dynamically allocated in MEMORYARENA_L2 (not
linker-placed static PI_L2), so the per-tile static-read codegen
bug \xc2\xa710.1 was protecting against does not apply to them.
Removing the cap on activations lets large multi-consumer
activations (residual splits, attention K/V) actually promote.
2. Activations now require users >= 2 (multi-consumer) by default.
Single-use activations gain nothing structural from promotion
(the next-layer cl_ram round-trip happens once either way) and
triggered an L2-allocator corner case on AnomalyDetection
(35/640 errors when 9 users=1 onnxGemm_* tensors entered the
reservation pool). Constants bypass this filter.
Phase-2 sweep with both refinements (and reservation fix from a3fc5d1):
| Model | const-only (P1) | act-included (P2) | Δ vs baseline |
|-----------------|----------------:|------------------:|--------------:|
| IC100 | 2 389 072 cyc | 2 277 046 cyc | -8.4 %% |
| ml1 | 3 475 840 cyc | 3 095 426 cyc | -26.8 %% |
| miniMobileNet | 134 946 cyc | 134 946 cyc | -29.6 %% |
| AnomalyDet 200 | 509 558 cyc | 509 464 cyc | -15.3 %% |
All 4 PASS output equality. The users>=2 filter costs perf vs the
no-filter run on ml1 / miniMobileNet (single-use activations were
genuine wins there) but restores AD correctness. Future Phase-2
work: figure out why AD's single-use activations specifically trip
the reservation allocator and lift the filter only for safe models.1 parent a3fc5d1 commit a8694f7
1 file changed
Lines changed: 21 additions & 2 deletions
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
238 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
239 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
240 | 259 | | |
241 | 260 | | |
242 | 261 | | |
| |||
0 commit comments