DNN: Add large scalar fastconv kernel for WASM/no-SIMD build #27723
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a larger scalar kernel (convBlockNoSIMD4x24) in the DNN fastConv path. It targets non-SIMD WebAssembly build.
Background
In OpenCV.js/no-SIMD builds, OpenCV.js 4.x shows ~35% slowdown compared to 4.5.2 on Intel Core Ultra 7 258V. The regression comes from using a small scalar fallback, which increases the memory load/store pressure.
What's changed
Performance
Workload: Face detection and image classification using res10_300x300_ssd_iter_140000_fp16.caffemodel and squeezenet.onnx v 1.0 on five images (720x480)
Environment: WASM no-SIMD build/Chrome stable 138/on Intel Core Ultra 7 258V
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.