Commit 8438bde
authored
Cortex_M backend: Remove int8 requirement for zero_points (#16061)
The zero point would sometimes get out of range in the hardswish
decomposition (depending on the range of the quantized output) as it
adjusts the zero point. Since the zero_point is applied in int32
accumulation there is no actual reason for the limitation, so we can
just remove it.
Additionally change the input to linear_hardswish to reliably trigger
the behaviour causing the crash before the fix was introduced to catch
future regressions.
cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai
Signed-off-by: Adrian Lundell <[email protected]>1 parent 1d35df2 commit 8438bde
File tree
2 files changed
+1
-8
lines changed- backends/cortex_m
- ops
- test/ops
2 files changed
+1
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | 85 | | |
93 | 86 | | |
94 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | | - | |
| 488 | + | |
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| |||
0 commit comments