OpenCL on Sabre iMX6Q

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OpenCL on Sabre iMX6Q

Jump to solution
5,392 Views
constantins
Contributor II

All,

I am attempting to compile OpenCV with OpenCL support for my iMX6Q board. I had some compiler issues earlier which I resolved by manually dropping the optimization level for one file. However, now I am having linking trouble due to undefined references in the libOpenCL.so and I am at a loss.

A "readelf -s /usr/lib/libOpenCL.so" shows many undefined symbols. This libOpenCL.so came with my system and I did not install it. I am confused as to where I have made a mistake. I installed the packages that came with the board (some packages were ignored as they seemed to have been replaced by newer versions.)

Linking CXX executable ../../bin/opencv_perf_ocl

/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../../lib/libOpenCL.so: undefined reference to `gcoOS_CloseThread'

/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../../lib/libOpenCL.so: undefined reference to `gcoOS_AtomIncrement'

... and so on

Labels (3)
1 Solution
1,804 Views
andre_silva
NXP Employee
NXP Employee

As far as I know OpenCV only uses FULL profile CL backend, unfortunately, you can see more information here: OpenCL Module Introduction — OpenCV 2.4.4.0 documentation

View solution in original post

0 Kudos
12 Replies
1,804 Views
MikeZelina
Contributor I

It appears that the OpenCL definition file is missing the libGAL reference. To add that, edit:

opencv-2.4.5/cmake/OpenCVDetectOpenCL.cmake

And add in the list(APPEND line after the set(OPENCL_LIBRARIES line shown below.

  set(OPENCL_LIBRARIES${OPENCL_LIBRARY})
  list(APPEND OPENCL_LIBRARIES"GAL")


0 Kudos
1,804 Views
mattiamoro
Contributor I

Hi Michael, have you succeeded to use opencv with opencl support?

0 Kudos
1,804 Views
andre_silva
NXP Employee
NXP Employee

You can set it to built in OpenCV but as I said, OpenCV is CUDA not Vivante Embedded CL profile. You will only be able to run it in your PC.

regards,

Andre

0 Kudos
1,804 Views
andre_silva
NXP Employee
NXP Employee

which bsp are you using ? the CL libs should be there as far you have selected the vivante´s gpu driver in ltib package list.


https://community.nxp.com/message/320932/edit" style="font-style: inherit; font-family: inherit; col...

0 Kudos
1,804 Views
constantins
Contributor II

Okay, I realized that OpenCV wasn't linking libGAL.so and updated the generated files. Does anyone know if an OpenCV with OpenCL w/ ARM support exists in any repositories? (Something like the opencv with cuda for ARM for the CARMA dev board).  Thanks!

0 Kudos
1,804 Views
kimlim
Contributor III

may i know how you solve the libOpenCL.so: undefined symbol: gcoOS_AtomConstruct issue?

0 Kudos
1,804 Views
andre_silva
NXP Employee
NXP Employee

Hi Kim, it is not supported by our current profile. OpenCV´s CL support is CUDA based, while we do only the Embedded Profile.

regards,

Andre

0 Kudos
1,805 Views
andre_silva
NXP Employee
NXP Employee

As far as I know OpenCV only uses FULL profile CL backend, unfortunately, you can see more information here: OpenCL Module Introduction — OpenCV 2.4.4.0 documentation

0 Kudos
1,804 Views
tumbleweed
Contributor I

Andre, this release from Vivante seems to imply that opencl full profile 1.2 is supported. Is that not the case?

http://www.vivantecorp.com/index.php/en/media-article/news/155-vivante-goes-mainstream-with-opencl-c...

0 Kudos
1,804 Views
andre_silva
NXP Employee
NXP Employee

Hi Todd,

I believe this will be applied for the next Vivante´s gpu generation, for i.MX6 it is not valid.

regards,

Andre

0 Kudos
1,804 Views
constantins
Contributor II

Yes, it seems that upon running the tests, I ran into quite a few problems! I will attempt to implement some OpenCL functions myself, thank you for the helpful link.

0 Kudos
1,804 Views
tumbleweed
Contributor I

Did you ever get opencv's ocl module working with the iMX6Q?

0 Kudos