mirror of
https://github.com/opencv/opencv.git
synced 2026-09-11 04:43:22 -05:00
dnn int8 optimization #29079 all_layers.hpp - Add float_input flag to Conv2Int8Params and Conv2Int8Layer to let the first conv accept raw FP32 input and quantize internally. graph_fusion_qdq.cpp : - Fuse DQ → Sigmoid → QL into SigmoidInt8, Similarly for MAxPool. - Fuse the input QuantizeLinear node into the first Conv2Int8. conv2_int8_layer.cpp - Add quantizeInterleaveBlock() conv2_int8_kernels.simd.hpp - Add spatial tiling to both convInt8BlockVNNI and convInt8BlockDepthwise: splits output pixels into tiles so total task count is N × ngroups × Kblk × ntiles, fully utilizing all threads even when the channel count is small. elementwise_layers.cpp - Widen CV_Assert to accept CV_8U in addition to CV_8S. eltwise2_int8_layer.cpp - Add QLinearMul support: new Mul math path for both signed and unsigned int8. - Add numpy-style broadcast support so QLinearMul / QLinearAdd with scalar ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake