Repository navigation
fix: Correct padding for NCHW quantized AVG pooling - #1319
vera-rubin wants to merge 2 commits into
Conversation
With included padding, a 2x2 QASYMM8 input filled with its zero point of 128 produces corner values of 32 instead of 128. The NCHW kernels sum stored codes but use raw zero for padding. Use the input zero point for included AVG padding in the 2x2, 3x3 and general kernels. Keep samples beyond explicit padding out of partial CEIL windows, since the averaging divisor excludes those samples. Add coverage for signed and unsigned quantization, equal and differing output quantization, both padding modes, and partial vector windows. Signed-off-by: Nathan Chandrasekar <322284620+vera-rubin@users.noreply.github.com>
|
Could you share more about your use case for ACL?
As ACL approaches end of life, we want to help users identify suitable migration paths, including KleidiAI or LiteRT where appropriate. Understanding your requirements will help us assess which options could work for you. |
|
We don't ship ACL in a product. We're a small hardware lab that checks open-source numerics libraries against their documented behaviour and sends fixes for what we find; this one came from a check of quantized average pooling with NCHW padding. So there's nothing to migrate on our side, and it's fine to close this if ACL isn't taking fixes anymore. |
morgolock
left a comment
There was a problem hiding this comment.
Please confirm who owns the copyright for these changes and add the appropriate notice to both changed files, following #1310:
SPDX-FileCopyrightText: Copyright 2026 <copyright holder>
Preserve the existing Arm notices and MIT licence. In quantized.h, remove the newly added 2026 from Arm’s notice unless Arm owns this contribution. The test file’s existing Arm notice should remain unchanged.
Add an SPDX-FileCopyrightText line for the contributed changes to quantized.h and PoolingLayer.cpp, and restore Arm's copyright line in quantized.h to its original years. Signed-off-by: Nathan Chandrasekar <322284620+vera-rubin@users.noreply.github.com>
|
I added the SPDX-FileCopyrightText line to quantized.h and PoolingLayer.cpp in the form used in #1310, and restored Arm's line in quantized.h to 2021-2022, 2024. The copyright for these changes is held by Donmakino LLC dba ChipLab. The existing Arm notices and the MIT licence text are unchanged in both files. |
|
Hi @vera-rubin Could you please squash the commits into a single change? |
NCHW quantized AVG pooling uses raw code zero for included padding. With a 2×2 QASYMM8 input filled with code 128, scale 0.25 and zero point 128, a 2×2 pool with stride 1 and padding 1 produces corners of 32 and edges of 64. The documented zero padding should leave every output at 128.
We use the input zero point for included padding in the 2×2, 3×3 and general kernels, while omitting samples beyond explicit padding in partial CEIL windows.
We tested the reproducer, 72 regression cases covering signed and unsigned quantization, and the existing pooling suite.
— ChipLab