Skip to content

Add RISC-V HAL implementation for cv::solve#26892

Merged
asmorkalov merged 6 commits intoopencv:4.xfrom
amane-ame:solve_hal_rvv
Mar 7, 2025
Merged

Add RISC-V HAL implementation for cv::solve#26892
asmorkalov merged 6 commits intoopencv:4.xfrom
amane-ame:solve_hal_rvv

Conversation

@amane-ame
Copy link
Copy Markdown
Contributor

This patch implements cv_hal_LU/cv_hal_Cholesky/cv_hal_SVD/cv_hal_QR function in RVV_HAL using native intrinsics, optimizing the performance for cv::solve with method DECOMP_LU/DECOMP_SVD/DECOMP_CHOLESKY/DECOMP_QR and data types 32FC1/64FC1.

Tested on MUSE-PI (Spacemit X60) for both gcc 14.2 and clang 20.0.

$ ./opencv_test_core --gtest_filter="*Solve*:*SVD*:*Cholesky*"
$ ./opencv_perf_core --gtest_filter="*SolveTest*" --perf_min_samples=100 --perf_force_samples=100

The tail of the perf table is shown below since the table is too long.

View the full perf table here: hal_rvv_solve.pdf

Untitled

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

amane-ame and others added 6 commits March 7, 2025 08:52
Co-authored-by: Liutong HAN <liutong2020@iscas.ac.cn>
Co-authored-by: Liutong HAN <liutong2020@iscas.ac.cn>
Co-authored-by: Liutong HAN <liutong2020@iscas.ac.cn>
Co-authored-by: Liutong HAN <liutong2020@iscas.ac.cn>
Co-authored-by: Liutong HAN <liutong2020@iscas.ac.cn>
Co-authored-by: Liutong HAN <liutong2020@iscas.ac.cn>
@asmorkalov asmorkalov merged commit 00956d5 into opencv:4.x Mar 7, 2025
21 of 28 checks passed
@asmorkalov asmorkalov mentioned this pull request Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants