This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Keystone II + OpenCV + OpenCL?

On my EVMK2H I try to run OpenCV (3.0.0 beta) with OpenCL. OpenCL is recognized by cmake and then in runtime, but it seems not to be used. Instead, running an example dumps:

root@192# ./opencv_perf_core
Time compensation is 0
OpenCV version: 3.0.0-beta
OpenCV VCS version: unknown
Build type: release
CPU features:
OpenCL Platforms:
    TI OpenCL for ARM + DSP
OpenCV Error: Unknown error code -222 (OpenCL device is not available) in dumpOpenCLDevice, file /home/root/opencv-3.0.0-beta/modules/ts/src/ocl_test.cpp, line 132
Exception. Can't dump OpenCL info
OpenCL device not available

And then the tests are performed without OCL. However, I can successfully run standalone examples of OCL, like mandelbrot.

How can I force OpenCV to really use OpenCL?


my config:

EVMK2H v4

mcsdk_3_01_03_06

mcsdk-hpc_03_00_01_08

1.5G of memory properly reserved for CMEM

  • I have not looked at the details of the OpenCV code where it leverages OpenCL, but I have seen other examples and the generic usage of opencl will typically request CL_DEVICE_TYPE_CPU or CL_DEVICE_TYPE_GPU. The DSP in TI's OpenCL is a CL_DEVICE_TYPE_ACCELERATOR.
  • I did some investigation. In opencv/modules/ts/src/ocl_test.cpp there is a function dumpOpenCLDevice which produces the output I pasted before. The device is enumerated correctly but for some reason the condition "if (!device.available())" fails.