Question for GPU Usage
-
Hello, I am trying to use the GPU(Adreno 650) in VOXL2.
In the voxl-docker-opencv-opencl gitlab, It says this is the expected ouput.root@0a4f66eee0a6:/opt/workspace/examples/fast_corners# ./fast-corners FAST ( 300 x 168), keypoints: 557, time:0.487192 cpu [ WARN:0] Using world accessible cache directory. This may be not secure: /var/tmp/ FAST ( 300 x 168), keypoints: 557, time:6.319238 gpu
And it says GPU is too much slower than CPU. And I also got slower result compare to CPU.
Is it expected output? And What kinds of situations GPU is faster than CPU?
Thank you for your any advices! -
That docker example is for VOXL 1. You should not use a Docker on VOXL 2 to access the GPU
-
Thank you for reply Chad!
I already can run the example without docker.
My question is why GPU is slower than CPU in the result of image.
I am using opencv-opencl for my application. But I also got the result that GPU takes much time than CPU -
How are you timing the result, it can be an expensive operation to move the image memory from the cpu to the gpu and back, so it's not uncommon for the entire process to take longer using the gpu if you're copying large quantities of data back and forth even if the main processing you're doing is faster.
-
Thank you Alex!
According to your reply, Should I use the gpu for large tasks such as Neural Network or large image instead of the task that need to process each frames?