Repository navigation
Optimize 2 opencv 2 files (merge.cpp/split.cpp) with PowerPC VSX intrinsics. - #10371
justdoitqd wants to merge 3 commits into
Conversation
|
Thank you for contribution! |
|
@justdoitqd, I agree with @alalek, PowerPC is quite exotic for us and many other people platform, so those platform-specific branches are at the high risk to become abandoned and poorly tested. We extensively use and promote universal intrinsics nowadays, which is the right way to write vectorized code once and then compile and run it everywhere. |
|
@alalek I still remember that day when I removed hundreds of lines from #9763, I was covered all missing intrinsics in core module using VSX raw :xD but later I found that was a good decision from @vpisarev. Can we use universal intrinsics only for VSX without remove NEON or SSE raw intrinsics, just like my review?
Note: @justdoitqd uses universal intrinsics : And the build failure caused by v_load_deinterleave and v_store_interleave since it missing int64 support |
Currently uint64/int64 version interleave load/store is missed. This patch adds the related API in. Signed-off-by: Simon Guo <[email protected]>
Optimize modules/core/src/merge.cpp with v_load/vec_st_interleave. Signed-off-by: Simon Guo <[email protected]>
Signed-off-by: Simon Guo <[email protected]>
|
@seiko2plus Ah.. My bad... I forgot to pull the related change regarding "OPENCV_HAL_IMPL_VSX_INTERLEAVE(int64, v_int64x2)" in my branch in. And I should rebuilt on the commit branch. Thanks for pointing it out. I added the missing commit. @alalek @vpisarev Please let me know if I still miss anything. |
|
@justdoitqd, @seiko2plus, most of the time when we add branches with universal intrinsics, the corresponding native NEON/SSE branches can be removed. Of course, in some rare cases that may result in some performance degradation, but I would rather solve it by introducing new, higher-level universal intrinsics, or even by introducing small chunks of SSE/NEON-specific code (like here: https://github.com/opencv/opencv/blob/master/modules/dnn/src/layers/pooling_layer.cpp#L418). But while the latter approach might be fine for x86-specific code, because we and our users test it all the time, it may be not a good solution for PPC, because of the much smaller user base. Ultimately, there should be just universal intrinsics and that's the direction we should go to. |
|
@justdoitqd, as I see, the latest version still uses the macro |
|
@vpisarev. I see. I will try to find some timeslot to get this done to use CV_SIMD128 covering NEON/VSX. However my problem is that I don't have a ARM server to test whether ARM will work. Is it OK for me to only test PowerPC since the code will be common? |
|
@justdoitqd, yes, it's ok. Also, you likely have x86/x64 machine somewhere, e.g. your laptop, so you can test it as well. Then, as soon as you switch from CV_VSX to CV_SIMD128, our buildbot will automatically test the code on Intel/AMD and ARM CPUs that we have in our battery of test machines. |
|
@vpisarev What is the procedure to add a VM at OSUOSL to the OpenCV buildbot? |
|
sorry for a long delay with reply; there is no well-defined procedure of adding new build slaves to our buildbot, because each new build slave will take extra resources from the OpenCV core team to support it. For now you may use the "Custom" build slave with special magic commands, see the top-most comment: force_builders=Custom docker_image:Custom=powerpc64le |
|
as we agreed to go the universal intrinsics route, let's close this PR |
This pullrequest changes
Optimize powerpc opencv 2 files (merge.cpp/split.cpp) with VSX intrinsics.