Repository navigation
Commit c7b6f52
committed
Arm backend: exclude RESCALE from late FuseDuplicateUsersPass
Running FuseDuplicateUsersPass after TOSA lowering fuses value-identical
tosa.RESCALE users of a shared producer onto one node feeding multiple
consumers. Later passes and Vela assume each integer RESCALE feeds a single
consumer, so this miscompiles quantized graphs (observed as all-zero Ethos-U55
output for addmm). The nodes are structurally and quantization-identical, so no
signature refinement can separate them; exclude tosa.RESCALE from fusion
instead. This pass's op-count wins are on TOSA-FP graphs, which carry no
rescales, so the exclusion preserves the intended benefit.
Update the pass test to assert identical RESCALE users are kept separate.
Authored with AI assistance (Claude Code).1 parent fd9e4d3 commit c7b6f52
2 files changed
Lines changed: 15 additions & 5 deletions
File tree
- backends/arm
- _passes
- test/passes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
33 | 42 | | |
34 | 43 | | |
35 | 44 | | |
| |||
95 | 104 | | |
96 | 105 | | |
97 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
98 | 110 | | |
99 | 111 | | |
100 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
| 175 | + | |
| 176 | + | |
179 | 177 | | |
180 | 178 | | |
181 | 179 | | |
| |||
0 commit comments