[CPU][ARM] Round ACL requantization zero points #40056
<!-- ccr-overview-v2 -->
🟢 Approval recommended
No active review issues are recorded for the destination zero-point rounding change.
No open issues 🎉
<details>
<summary><strong>What changed in this PR</strong></summary>
This PR corrects destination zero-point rounding in the CPU plugin’s Arm Compute Library (ACL) requantization path, preventing truncation from causing a one-bin output error.
Changes:
| File | Description |
| ---- | ----------- |
| src/plugins/intel_cpu/tests/functional/custom/subgraph_tests/src/arm/conv_fq.cpp | Adds regression coverage for ACL requantization zero-point rounding. |
| src/plugins/intel_cpu/src/nodes/executors/acl/acl_utils.hpp | Uses std::round before converting the destination zero point to an integer. |
</details>
<sub>Review effort: Balanced</sub>
Let's add a short comment on how these ranges were chosen: it's not clear that they give a dst zero point just below an integer (the case std::round fixes), and the expected quantized_bias values below can't be checked without recomputing it.
Let's use GetNodesWithTypes from ov_subgraph.hpp instead of the manual runtime-model traversal: it also makes the found_convolution flag unnecessary.
const auto convolutions = GetNodesWithTypes(compiled.get_runtime_model(), {"Convolution"});
ASSERT_EQ(convolutions.size(), 1u);
EXPECT_EQ(convolutions.front()->get_rt_info().at(ov::exec_model_info::RUNTIME_PRECISION).as<element::Type>(),
element::u8);
Can we cover this case with a ConvAndFQ instance (FQ ranges that give the fractional zero point) instead of a standalone TEST? This reuses the model builder, the reference comparison and checkConvolutionPrecision. If abs_threshold is too loose to catch a one-bin error, it can be tightened for this instance.
Added a comment
Switched the precision check to GetNodesWithTypes
Moved the regression into a parameterized ConvAndFQ
biasOnlyValues.empty() switches the weights, scales, bias, MatMul tail, rel_threshold and the inputs in six places, while the name says it holds only the bias values. Let's extract a common model builder that takes these values explicitly (weights, scales, bias, MatMul tail on/off) and reuse it in ConvAndFQ and in a derived test class for this case. The derived class should stay simple: it reuses ConvAndFQTestParams and overrides only what differs (the inputs).
Could you please explain why rel_threshold = 0.0 is needed here? abs_threshold = 1e-3 is already below one output bin (~0.0061), so the default relative tolerance wouldn't hide the error this test targets.
It's not really needed, removed it.
Extracted a builder
Approved these changes.
v-Golubev
alvoron
Details:
- Round the destination zero point to the nearest integer before ACL signed-domain normalization. Truncation can turn a value just below an integer into a one-bin output error.
Tickets:
- CVS-190469
AI Assistance:
- AI assistance used: no / yes
- If yes, summarize how AI was used and what human validation was performed (build/tests/manual checks).