问题
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