core: improve norm of hal rvv#26991
Merged
asmorkalov merged 9 commits intoopencv:4.xfrom Mar 18, 2025
Merged
Conversation
vpisarev
reviewed
Mar 5, 2025
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
99b991f to
23a8915
Compare
Member
Author
|
Conflicts are resolved. Feel free to review @asmorkalov |
This comment was marked as outdated.
This comment was marked as outdated.
Member
Author
|
Updated perf results: perf-norm.zip |
asmorkalov
reviewed
Mar 10, 2025
Comment on lines
-324
to
-325
| inline int hal_ni_norm(const uchar* src, size_t src_step, const uchar* mask, size_t mask_step, int width, | ||
| int height, int type, int norm_type, double* result) { return CV_HAL_ERROR_NOT_IMPLEMENTED; } |
Contributor
There was a problem hiding this comment.
FastCV HAL implements the old API too.
| #include "precomp.hpp" | ||
|
|
||
| #if CV_RVV | ||
| #include "norm.rvv1p0.hpp" |
Contributor
There was a problem hiding this comment.
Where is replacement for these removed optimizations? (added by #26885)
Member
Author
There was a problem hiding this comment.
All moved to hal rvv.
…implementation with rvv covering different data types, channels and norm types
ef8787e to
dc31c5d
Compare
Member
Author
|
I refactored this PR with the same handling of overflow accumulator. |
Contributor
|
The patch birngs speedup for many cases, but there are some strange regressions against current 4.x: Details |
Member
Author
@asmorkalov Your results are about norm2. Norm2 should not be affected by this patch. I will also improve norm2 after this patch is merged. |
asmorkalov
approved these changes
Mar 18, 2025
fengyuentau
added a commit
to fengyuentau/opencv
that referenced
this pull request
Apr 27, 2025
core: improve norm of hal rvv opencv#26991 Merge with opencv/opencv_extra#1241 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 - [ ] 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. - [ ] The feature is well documented and sample code can be built with the project CMake
asmorkalov
pushed a commit
that referenced
this pull request
Apr 28, 2025
5.x merge 4.x: merge changes of norm and norm_diff in hal rvv from 4.x #27261 Merge with opencv/opencv_extra#1251 No related changes in contrib #26991 from fengyuentau:4x/core/norm2hal_rvv #27045 from fengyuentau:4x/hal_rvv/normDiff Previous "Merge 4.x" on norm_diff vectorization: #27068
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Merge with opencv/opencv_extra#1241
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.