Ask Your Question
0

opencl performance test

asked 2013-11-24 23:11:26 -0600

I've compiled OpenCV 2.4.7 with OpenCV support. Am using an AMD V5900.
I want to do some OpenCV tests. I'm not sure how to test/verify that OpenCL is being used. I ran perf and test and got these results:

opencv_test_ocl.exe 244 FAILED TESTS YOU HAVE 2 DISABLED TESTS

opencv_perf_ocl.exe 40 FAILED TESTS YOU HAVE 4 DISABLED TESTS

The only comparison sample I saw was ocl-example-squares.exe. It report this: cpp average time: 66.0707ms ocl average time: 90.9966ms How is that to be interpreted? What is the best way to measure/report the difference in performance between the CPU and GPU?

Thanks, Chris

edit retag flag offensive close merge delete

Comments

Had also meant to ask this. The doc says to add the environment variable OPENCV_OPENCL_DEVICE. MUST one set that env. var. to get OpenCL?

intrasight gravatar imageintrasight ( 2013-11-24 23:18:59 -0600 )edit

Where can I find the sample ocl speed test that you mentioned in this post? I am using OpenCV 3.0 beta.

user10001 gravatar imageuser10001 ( 2015-04-09 03:27:35 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-11-25 04:08:43 -0600

OpenCL module does not have plain C/C++ fail-backs as I know. It means, that all performance and accuracy tests use OpenCL. The only possible difference here is OpenCL implementation. You can set device id and type of OpenCL impl by OPENCV_OPENCL_DEVICE environment variable.

edit flag offensive delete link more

Comments

I guess what I am asking is how to verify that OpenCV is using the OpenCL module. And also, is it necessary to set the environment variable OPENCV_OPENCL_DEVICE for OpenCV to use the OpenCL module?

intrasight gravatar imageintrasight ( 2013-11-29 20:05:48 -0600 )edit

I set the env var "OPENCV_OPENCL_DEVICE" to "AMD:GPU:1" and now I get an error when I run the OpenCV-CLIntro sample ERROR: Required OpenCL device not found, check configuration: AMD:GPU:1

The documentation on this env var is sort of cryptic. Are there more complete examples available? What is wrong with the value I have set?

intrasight gravatar imageintrasight ( 2013-11-30 23:14:45 -0600 )edit

If you want to use GPU impl of OpenCL just set OPENCV_OPENCL_DEVICE=:GPU:

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-12-02 01:21:39 -0600 )edit

Question Tools

Stats

Asked: 2013-11-24 23:11:26 -0600

Seen: 1,197 times

Last updated: Nov 25 '13