Repository navigation
Commit a27a5db
authored
NXP backend: Fix bug with reused
### Summary
Sometimes, the bias of multiple `Linear` nodes can be shared, so all
occurrences have the same quantization parameters. But as the bias's
scale is determined by the scale of the input and weight, an error is
introduced. This commit assigns each bias the correct scale during
conversion to Neutron IR. By doing so, 7 LSTM harness tests are enabled,
leaving only 3 failing ones (2 timeouts and 1 accuracy issue. Fixing
them is not a priority as proper LSTM support is planned for the
future).
### Test plan
`pytest -c /dev/nul backends/test /suite/operators/test_lstm.py -m
backend_nxp`
cc @robert-kalmar @JakeStevens @digantdesai @rascaniLinear bias. (#23112)1 parent 53c79ed commit a27a5db
2 files changed
Lines changed: 22 additions & 10 deletions
File tree
- backends
- nxp/backend/ir/converter/node_converters/ops_converters
- test/suite/flows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
141 | 160 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
44 | 37 | | |
45 | 38 | | |
46 | 39 | | |
| |||
0 commit comments