Fix v_round and enable unit tests for scalable universal intrinsic 64F type.#25586
Merged
asmorkalov merged 3 commits intoopencv:4.xfrom May 21, 2024
Merged
Fix v_round and enable unit tests for scalable universal intrinsic 64F type.#25586asmorkalov merged 3 commits intoopencv:4.xfrom
v_round and enable unit tests for scalable universal intrinsic 64F type.#25586asmorkalov merged 3 commits intoopencv:4.xfrom
Conversation
4 tasks
Contributor
Author
|
About #24746:
-- return vfncvt_x(vset(vlmul_ext_f64m2(vfadd(a, 1e-6, VTraits<v_float64>::vlanes())), 1, b), VTraits<v_float32>::vlanes());
++ return vfncvt_x(vset(vlmul_ext_f64m2(a), 1, b), VTraits<v_float32>::vlanes());
-- #if CV_SIMD_64F
++ #if (CV_SIMD_64F || CV_SIMD_SCALABLE_64F)
++ TheTest & test_round_pair_f64()
++ {
++ ...
++ } |
v_round and enable unit tests for scalable universal intrinsic 64F type.
Contributor
|
It seems LLVM 17 doesn't support Toolchain: LLVM 17.0.6 My attemt to recreate: https://godbolt.org/z/f9oh77dqM (clang 18 works). UPD: yes, it has been added in clang 18 - llvm/llvm-project#70355. Since intrinsics version has not been bumped we need to check clang version if we want to use this intrinsic. |
Contributor
Author
|
Bug reproduce. Seem like the "if code" and the "then code" generate the same code, so maybe we can just not use |
Junyan721113
pushed a commit
to plctlab/opencv
that referenced
this pull request
May 22, 2024
Fix v_round and enable unit tests for scalable universal intrinsic 64F type. opencv#25586 This may be a legacy issue from the previous PR opencv#24325. I don't quite remember why the float 64 part of the unit test was not enabled at that time. Whatever, this patch enables the unit tests for scalable 64F type , and makes the necessary modifications to the RVV backend to make the tests pass. This patch is compiled by GCC 14 and LLVM 17 &18, and tested on QEMU and k230. ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [ ] I agree to contribute to the project under Apache 2 License. - [ ] 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 - [ ] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] 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
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 may be a legacy issue from the previous PR #24325. I don't quite remember why the float 64 part of the unit test was not enabled at that time.
Whatever, this patch enables the unit tests for scalable 64F type , and makes the necessary modifications to the RVV backend to make the tests pass.
This patch is compiled by GCC 14 and LLVM 17 &18, and tested on QEMU and k230.
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.