Commit 1deeb4e
committed
Cortex_m backend: Simplify add + linear fusion passes
Reuses the FoldAndAnnotateQParamsPass from the Arm backend
to greatly simplify the logic for fusing the ops.
Additionally updates the linear kernel to be numerically correct
and computes the kernel_sum aot in the quantized_linear_fusion pass.
Note that since this replaces the bias node it typically causes no
extra memory useage.
Updates the Linear tests to mirror this, including removing the
various matmul tests. Since the linear is handled as a separate op
rather than a particular type of matmul these tests are not related
anymore.
Removes unnecessary stub definitions in operatos.py, operators.yaml and
op_quantized_linear.cpp
Leaving a few TODO:s since the patch is large already.
Signed-off-by: Adrian Lundell <[email protected]>
Change-Id: I194228ee3ae4b64a92f3f818afb2e045cc3acf911 parent ad0bb51 commit 1deeb4e
File tree
9 files changed
+353
-1430
lines changed- backends/cortex_m
- ops
- passes
- test/ops
9 files changed
+353
-1430
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
0 commit comments