Commit 9b59ee9
committed
feat: enable QASYMM8_SIGNED to F32 assembly dequantization
Enable QASYMM8_SIGNED input and weights to use the F32 DequantizeFloat assembly output stage, including the direct convolution selection path.
Propagate input and weight zero-points plus the unrounded mathematical K depth so asymmetric offset correction uses the real GEMM/convolution depth rather than arm_gemm's padded internal K.
Fix the interleaved no-merge DequantizeFloat scheduler stride so kernels that do not pack row-sum slots advance between A panels correctly.
Guard the symmetric no-merge dequant support helper with the SME/SME2 feature macros. The helper is only referenced when those no-merge dequantized kernels are compiled, so non-SME builds must not define it unconditionally under Werror.
Add NEON validation coverage for the direct I8S8F32 convolution path.
Performance was checked on a Cortex-A76, pinned to CPU 4 with one thread. The change is neutral on large workloads and improves the small NHWC signed int8 to F32 convolution path: QASYMM8_SIGNED/RunSmallDequantizeF32 NHWC/no-activation cases show a 1.36x geomean speedup over github/main, with the tiniest single-batch cases improving by roughly 1.45x to 3.13x.
Validate GEMM3D convolution probes with the real weights and output tensor metadata instead of reusing the input data type for every dummy tensor. This prevents QASYMM8 input with QSYMM8_PER_CHANNEL weights from selecting a 3D path that the real lowp operation cannot safely configure.
When QASYMM8 output is handled through the signed lowp assembly path, route fused assembly through the signed intermediate output, keep the adjusted output stage in sync for configure/validate/runtime quantization updates, and convert back to QASYMM8 after the fused assembly path as well as the fallback path.
Reject non-uniform QASYMM8_SIGNED dequantization metadata: this path only supports one weight scale. Although QSYMM8_PER_CHANNEL is the usual per-channel weights data type, ACL does not enforce uniform quantization from the QASYMM8_SIGNED data type alone; a TensorInfo can still contain a QuantizationInfo scale vector. DequantizeFloat currently consumes only a single scalar scale via QuantizationInfo::uniform(), so accepting a scale vector would silently use scale[0] for every output channel. Reject QASYMM8_SIGNED weights with more than one scale on dequantized F32/F16 convolution and GEMM paths until per-channel DequantizeFloat support is implemented.
Signed-off-by: Pablo Marquez Tello <pablo.tello@arm.com>
Change-Id: I945c24e5cd3d21d857b68de90d27aa18a31f75471 parent a386845 commit 9b59ee9
18 files changed
Lines changed: 711 additions & 90 deletions
File tree
- src
- core/NEON/kernels/arm_gemm
- cpu
- kernels/assembly
- arm_common/internal
- arm_gemm
- operators
- internal
- runtime/NEON/functions
- tests/validation
- NEON
- fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
75 | 102 | | |
76 | 103 | | |
77 | 104 | | |
| |||
281 | 308 | | |
282 | 309 | | |
283 | 310 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
292 | 324 | | |
293 | 325 | | |
294 | 326 | | |
| |||
300 | 332 | | |
301 | 333 | | |
302 | 334 | | |
303 | | - | |
| 335 | + | |
304 | 336 | | |
305 | 337 | | |
306 | 338 | | |
| |||
317 | 349 | | |
318 | 350 | | |
319 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
320 | 357 | | |
321 | 358 | | |
322 | 359 | | |
323 | 360 | | |
324 | 361 | | |
325 | 362 | | |
326 | 363 | | |
327 | | - | |
| 364 | + | |
| 365 | + | |
328 | 366 | | |
329 | 367 | | |
330 | 368 | | |
| |||
475 | 513 | | |
476 | 514 | | |
477 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
478 | 523 | | |
479 | 524 | | |
480 | 525 | | |
| |||
557 | 602 | | |
558 | 603 | | |
559 | 604 | | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
560 | 611 | | |
561 | 612 | | |
562 | 613 | | |
| |||
647 | 698 | | |
648 | 699 | | |
649 | 700 | | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
650 | 708 | | |
651 | 709 | | |
652 | 710 | | |
| |||
693 | 751 | | |
694 | 752 | | |
695 | 753 | | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
696 | 762 | | |
697 | 763 | | |
698 | 764 | | |
| |||
937 | 1003 | | |
938 | 1004 | | |
939 | 1005 | | |
940 | | - | |
| 1006 | + | |
941 | 1007 | | |
942 | 1008 | | |
943 | 1009 | | |
| |||
1027 | 1093 | | |
1028 | 1094 | | |
1029 | 1095 | | |
1030 | | - | |
| 1096 | + | |
1031 | 1097 | | |
1032 | 1098 | | |
1033 | 1099 | | |
| |||
1060 | 1126 | | |
1061 | 1127 | | |
1062 | 1128 | | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
1063 | 1133 | | |
1064 | 1134 | | |
1065 | 1135 | | |
| |||
1212 | 1282 | | |
1213 | 1283 | | |
1214 | 1284 | | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
1215 | 1299 | | |
1216 | 1300 | | |
1217 | 1301 | | |
| |||
1431 | 1515 | | |
1432 | 1516 | | |
1433 | 1517 | | |
1434 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
52 | 63 | | |
53 | 64 | | |
54 | 65 | | |
55 | 66 | | |
56 | 67 | | |
57 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
58 | 72 | | |
59 | 73 | | |
60 | 74 | | |
61 | 75 | | |
62 | 76 | | |
63 | 77 | | |
64 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
65 | 82 | | |
66 | 83 | | |
67 | 84 | | |
68 | 85 | | |
69 | 86 | | |
70 | 87 | | |
71 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
72 | 92 | | |
73 | 93 | | |
74 | 94 | | |
75 | 95 | | |
76 | 96 | | |
77 | 97 | | |
78 | 98 | | |
79 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
80 | 103 | | |
81 | 104 | | |
82 | 105 | | |
83 | 106 | | |
84 | 107 | | |
85 | 108 | | |
86 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
87 | 113 | | |
88 | 114 | | |
89 | 115 | | |
90 | 116 | | |
91 | 117 | | |
92 | 118 | | |
93 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
94 | 123 | | |
95 | 124 | | |
96 | 125 | | |
| |||
153 | 182 | | |
154 | 183 | | |
155 | 184 | | |
156 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
0 commit comments