Fix issues in RISC-V Vector (RVV) Universal Intrinsic#27006
Merged
asmorkalov merged 4 commits intoopencv:4.xfrom Mar 4, 2025
Merged
Fix issues in RISC-V Vector (RVV) Universal Intrinsic#27006asmorkalov merged 4 commits intoopencv:4.xfrom
asmorkalov merged 4 commits intoopencv:4.xfrom
Conversation
Contributor
|
I confirm that item 2 has been resolved. |
Contributor
|
@hanliutong Please take a look on warnings with MS Visual Studio. |
Contributor
|
@fengyuentau Please take a look too. |
fengyuentau
reviewed
Mar 4, 2025
Member
|
As for #26936, most probably it is due to gcc because I did not see the problem with clang. |
| { | ||
| auto c_signed = dataC.as_int(i); | ||
| dataC[i] = (LaneType)(c_signed == 0 ? -1 : -std::abs(c_signed)); | ||
| } |
Contributor
There was a problem hiding this comment.
Why do we need to change that?
It is code for testing, all checks are below.
Code of input preparation - so it is OK.
Contributor
Author
There was a problem hiding this comment.
Because we need dataC to be all negative numbers, then v_check_all(c) will be true.
R c = dataC;
EXPECT_EQ(true, v_check_all(c));
The previous dataC *= (LaneType)-1; cannot handle the case where the length of dataC greater than 128 for int_8
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.
This PR aims to make
opencv_test_corepass on RVV, via following two parts:max_nlanesshould be multiplied by 2, because we use LMUL=2 in RVV Universal Intrinsic since Use LMUL=2 in the RISC-V Vector (RVV) backend of Universal Intrinsic. #26318.v_erfto make the tests passThis patch is tested under the following conditions:
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.