I've got a couple of questions about OpenCl mostly and just want to know if any one has experience with it on i.MX6. We aren't using the standard freescale sdk/os, my company chose to roll with timesys so we'd have someone to yell at if things go wrong so we payed for support and their toolchain.
They don't officially support OpenCL, so I'm not sure of the components I need to hunt down and find. I imagine it's pretty simple
Kernel driver for vivante
vivante vdk
open cl headers
I'm not really sure where to find the vivante components here. I've downloaded the SDK off the compass but haven't had a chance to really go through it.
Solved! Go to Solution.
Kevin
Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help please feel free to contact Freescale.
Thanks,
Yixing
Yes this got resolved onced I fixed the gpu issue
The i.MX6Q contains a Vivante GC2100 GPU capable of running OpenCL 1.1 Embedded Profile (EP). The EP is a relaxed version of the specification meant for embedded and mobile devices. Many of the mandatory features in OpenCL are made optional and the minimum buffer sizes are lowered to mobile-friendly sizes. EP does not include support for 3D images, 64b integers, and double precision floating point. Requirements on the samplers are reduced (in addition to the number reduced from 16 to 8) and the math precision is lowered below the IEEE 754 specification for some functions (e.g. atan). Lastly, the minimum image size is reduced to 2048 (from 8192) and the local memory is reduced to 1KB (from 16KB).
I think you have to read about this Embedded Profile.
Thanks for the response, but I don't think it really answered any of my questions. I'm just looking to figure out how to enable OpenCL. We currently do not use the GPU for anything and we just wanted to try to create some threads to help accelerate some floating point math.
We aren't trying to do anything overly advanced with OpenCL, but we don't know about the software components we need to enable it in our build.
Hi Kevin,
I work at Timesys, and we recently updated our vivante driver packages. The updated version of the vivante packages includes hard float support and contains OpenCL libraries. Have you previously tried selecting the gpu-viv-mx6q-bin package in your factory configuration?
There are openCL unit tests included in the sample applications which seem to work appropriately. However, I'd like to get more test coverage using this lib (and all the vivante drivers really). I think I may be able to assist by referencing our sample sources. Are you still working with this? Let me know.
Awesome! We technically aren't working on OpenCL yet at all, I just wanted to include it so one of our algorithm guys could play with it. We've always included the vivante library, but I've had an issue including the OpenCL headers.
We must have the version your talking about though... since we use hardfloat and everything seems to be building. I'll go dig up some details and post which version we currently use and any errors it builds with.
As of last monday we released the hard float version. You should either update your factory to obtain this newer version, or download the SDKs that I posted on IMX community to give it a try. Currently I have posted hard float X11 & fbdev SDK for mx6. Let me know if you have any questions.
Oh i'll update our factory then, I'll see if someone else can help me with this since I'm temporarily dealing with a small fire on another platform
Ok i grabbed the update and built with vivante, I think the opencl headers still don't install properly to the sdk, but I imagine i can probably just copy/paste them...
cd /home/kevin/src/factory-20130513/build_armv7l-timesys-linux-gnueabi/opencl-headers-1.1/opencl-headers-1.1 && \
cp -f *.h /home/kevin/src/factory-20130513/build_armv7l-timesys-linux-gnueabi/toolchain/usr/include/CL
-- installing opencl-headers 1.1 to -- 1368732096 [Thu, 16 May 2013 15:21:36 -0400]
mkdir: cannot create directory `/usr/include/CL': Permission denied
Hi Kevin,
I'm unable to reproduce this issue. Please check the permissions on your toolchain--it sounds like you may have run the factory as root at one point? Let me know.
I don't think this is an actual probaly, that package is the opencl headers, which is seperate from the vivante, if the vivante has headers already this won't be necessary. I removed this package and we just had another small issue. One of our custom projects couldn't be packaged anymore... I opened a support ticket for that though.
Sounds good. Hopefully we get that issue sorted quickly. Let me know how your openCL development progresses.
figured I'd let you know, we got opencl working, but we've had issues with opengl with qt5. How well does opengl and opencl work together?
Hi Kevin,
I'm not really sure about CL & GL, but I can say that we've had a bunch of issues with qt5. Are you using framebuffer, or X, or something else? Based on the way the libs are setup, I don't believe CL & GL should affect one another, but I'm not certain. What issues are you seeing with qt5? I'm currently working on updating our support to 5.0.2 with eglfs for mx6.
Right now we are trying to use linuxfb and eglfs and neither really work. linuxfb doesn't appear to draw correctly and we get an error with eglfs.
here is some debug output
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
evdevtouch: Using device /dev/input/event1
min X: 0 max X: 0
min Y: 0 max Y: 0
min pressure: 0 max pressure: 4095
device name: tsc2004
Protocol type A
EGL Error : Could not create the egl surface: error = 0x300b
>*stopped,reason="signal-received",signal-name="SIGABRT",signal-meaning="Aborted",frame={addr="0x2bd60070",func="__GI_raise",args=[{name="sig",value="6"},{name="sig@entry",value="6"}],file="../nptl/sysdeps/unix/sysv/linux/raise.c",fullname="/opt/timesys/build_armv7l-timesys-linux-gnueabi/glibc-2.17/glibc-2.17/signal/../nptl/sysdeps/unix/sysv/linux/raise.c",line="56"},thread-id="1",stopped-threads="all",core="1"
dNOTE: INFERIOR SPONTANEOUS STOP
sStopped.
dState changed from InferiorRunOk(11) to InferiorStopOk(14) [master]
dHANDLING SIGNAL SIGABRT
sStopped: Aborted (Signal SIGABRT).
Kevin, the vivante (gpu-viv-bin) package provides opencl headers. I'm not sure why you are seeing that error, I will try to reproduce. But have you tried building your application against the vivante openCL headers? I think the headers package would just be to provide openCL without vivante.