How to know if an OpenCV 3.0 algorithm has an OpenCL implementation in the transparent API

穿精又带淫゛_ 提交于 2020-01-02 03:39:17

问题


I am migrating my OpenCV 2.4.2 to OpenCV 3.0 for using OpenCL performance throught the Transparent-API. But, I note that some algorithms take the same time in CPU or GPU implementation.
I searched in the official documentation, but I didn't find the answer. How to know if an algorithm has an automatic OpenCL translation in the Transparent API or not ?


回答1:


If you have amd gpu, use codexl and create a new codexl project, attach your project and start session from codexl, or, start your project from your IDE and attach codexl to runtime of it. Then when program finishes, codexl automatically generates necessary graph and profiling info(if you choose proper gpu profiling modes) in the end.

I used codexl once to know how compubench.com handles workgroup sizes.(it was 32 on an occasion because of memory resource requirements)

If it doesn't use opencl, codexl informs you with a dialog window telling potential causes.

You can even know errors, warnings this way and look at kernel string(but mangled probably).


Intel has Code-Builder

Nvidia has some profilers too.



来源:https://stackoverflow.com/questions/34494520/how-to-know-if-an-opencv-3-0-algorithm-has-an-opencl-implementation-in-the-trans

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!