mirror of
https://github.com/opencv/opencv.git
synced 2026-12-02 13:16:32 -06:00
* dnn: keep INT4/UINT4 QuantizeLinear off the AVX2 per-tensor fast path The x86 AVX2 path for per-tensor float to int8/uint8 returns before the 4-bit saturation added in #30596, so INT4/UINT4 outputs were still clamped to the 8-bit range there. Skip it for 4-bit output and add a per-tensor INT4/UINT4 test that reaches that path on x86. * dnn: clamp INT4/UINT4 inside the AVX2 per-tensor QuantizeLinear path Pass the output range into the AVX2 kernel instead of skipping it, so per-tensor INT4/UINT4 keeps the vectorized, parallel path; the kernel already clamps in float before converting. The post-pass from #30596 is only reached by the generic path now. Widen the regression test to 35 elements so it covers the 8-lane loop and the scalar tail on x86. * dnn: drop the PR reference from the INT4 QuantizeLinear test comment --------- Co-authored-by: Kaustubh Arora <arorakaustubh681@gmail.com>