Commit a977868
committed
feat: enable F32 output in CpuGemmConv2d
- Updated convolution reference to branch epilogue:
* TO=float: int32 to float dequant (acc * sA * sB + bias_f32)
* TO!=float: usual quantize_down_scale_by_fixedpoint with int32 bias
- Changed fixture to use F32 bias tensor for Q->F32 runs (instead of S32),
matching arm_gemm dequant epilogue which only supports float bias.
- Added explicit template instantiations for convolution_layer with
TBias=float, TO=float to fix linker errors in validation.
- Disabled activation in arm_gemm dequant path:
offsets are applied afterwards by CpuGemmLowpOffsetContributionKernel,
so activation must run there to see the correct final accumulator.
- src/cpu/kernels/gemmlowp/generic/neon/impl.h
neon_run_offset_contribution_float(): replace per-batch offset
for vector_sum_col from Y stride to W stride.
This aligns target and reference for quantized to F32 convolution tests
and prevents premature clamping before offset contributions.
Change-Id: I6fffc98dc0798542a2702e6a593b850c16561e3b
Signed-off-by: Pablo Marquez Tello <[email protected]>1 parent 7b9dbd8 commit a977868
File tree
13 files changed
+474
-135
lines changed- arm_compute/runtime
- NEON/functions
- experimental/operators
- docs/user_guide
- src/cpu
- kernels/gemmlowp/generic/neon
- operators
- tests/validation
- NEON
- fixtures
- reference
13 files changed
+474
-135
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
114 | | - | |
| 115 | + | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
143 | | - | |
144 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
145 | 149 | | |
146 | 150 | | |
147 | 151 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| |||
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
| 613 | + | |
613 | 614 | | |
614 | 615 | | |
615 | 616 | | |
| |||
1712 | 1713 | | |
1713 | 1714 | | |
1714 | 1715 | | |
| 1716 | + | |
1715 | 1717 | | |
1716 | 1718 | | |
1717 | 1719 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
99 | | - | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
219 | | - | |
| 220 | + | |
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| 101 | + | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
| |||
287 | 291 | | |
288 | 292 | | |
289 | 293 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
296 | 315 | | |
297 | 316 | | |
298 | 317 | | |
| |||
367 | 386 | | |
368 | 387 | | |
369 | 388 | | |
370 | | - | |
| 389 | + | |
371 | 390 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
378 | 411 | | |
379 | 412 | | |
380 | 413 | | |
| |||
506 | 539 | | |
507 | 540 | | |
508 | 541 | | |
509 | | - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
510 | 546 | | |
511 | 547 | | |
512 | 548 | | |
| |||
725 | 761 | | |
726 | 762 | | |
727 | 763 | | |
728 | | - | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
729 | 772 | | |
730 | 773 | | |
731 | 774 | | |
| |||
777 | 820 | | |
778 | 821 | | |
779 | 822 | | |
780 | | - | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
781 | 826 | | |
782 | 827 | | |
783 | 828 | | |
| |||
0 commit comments