[HAL RVV] impl exp and log | add log perf test#27010
Conversation
|
Related: #26886 |
|
There is UI implementation for log: . I propose to enable it first for RVV and then benchmark HAL. More generic implementation with UI preferable, if it produces similar performance. Also, you use copy of table with pre-computed values. |
|
Actually, I just wrote it according to the code here. And I mean, there doesn’t seem to be a UI for RVV, because it doesn’t allow CV_SIMD_SCALABLE. Do you mean that I should first adapt the UI for RVV? |
Yes, it should not be hard, IMHO. |
|
@asmorkalov I will do it. And I found a logical error in my implementation of |
|
Let's try. |
|
Test on MUSE-PI after enable UI: |
|
The new numbers generally say that the patch brings significant speedup for doubles. OpenCV uses std::exp and std::log for doubles, so the speedup is expected there. |
352396d to
e6a1106
Compare
|
Rebase the branch. Fix |
Co-authored-by: Liutong HAN <liutong2020@iscas.ac.cn>
Co-authored-by: Liutong HAN <liutong2020@iscas.ac.cn>
e6a1106 to
0fed1fa
Compare
|
My performance results (K1 vs RK3568): |
|
@asmorkalov @fengyuentau I found a potential speedup in intrin_math.hpp. I will try it and than return back. If it's also faster than current UI, should I also replace it in this PR? |
I think it is a different topic and worths a different PR. |
Implement through the existing interfaces
cv_hal_exp32f,cv_hal_exp64f,cv_hal_log32f,cv_hal_log64f.Perf test done on MUSE-PI. Because the performance of scalar is much worse than universal intrinsic, only ui and hal rvv is compared.
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.