Posts: 5
Threads: 1
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Dec 2017
Hi all,
Just received my Tinker board and loaded the latest Debian. Must say I'm impressed
by how much "just works". My main purpose in purchasing was to test out some OpenCL
codes I would like to run on embedded systems. I'm familiar with OpenCL but not with
the organization of code on the Tinker....e.g. is there an OpenCL driver, since I don't see it at
Asus site, can I get it from arm? I'm guessing the ARM mali OpenCL SDK is part of the
answer, but expect the driver is equally important. etc.
Any hints that would help in running an OpenCL code - even just one of the open source
benchmarks or "hello from OpenCL" - would be of great help. For instance, having crawled through the web for a
few days, I can't say I've seen anyone claim they have actually run an OpenCL program
on the Tinker. Is that correct?
Any pointers will be of help and I'll pass along successes and failures.
Regards,
RTISYS
•
Posts: 7
Threads: 0
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Jan 2018
I have been running OpenCV in combination with OpenCL and it works like a charm.
The only thing you have to do is to enable OpenCL while compiling OpenCV
If you dont use OpenCV and you only want to call OpenCL, than there is a Python library (
https://documen.tician.de/pyopencl/) available that you can use to do the API calls to OpenCL.
•
Posts: 5
Threads: 1
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Dec 2017
Thanks. I will try loading openCV since my project is C++ based. If I'm lucky,
the openCL apis I need will be implemented there. I assume the openCV library
is platform independent. There has to be a rockchip specific component that
maps onto the ways they implemented the arm mali integration. Is that library
already loaded in the TinkerOS or do I need to find it somewhere and download it?
Since I will need to link to it, do you happen to know its name and path?
Thanks,
RTISYS
•
Posts: 5
Threads: 1
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Jul 2017
At least as of 2.0.4, you still have to either rename /etc/OpenCL/venders to vendors or do a soft link to fix everything.
•
Posts: 5
Threads: 1
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Dec 2017
(01-07-2018, 05:38 PM)gowaddle Wrote: At least as of 2.0.4, you still have to either rename /etc/OpenCL/venders to vendors or do a soft link to fix everything.
Thanks, these two replies have been really helpful. Will pass along my results.
Cheers,
RTISYS
•
Posts: 5
Threads: 1
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Dec 2017
(01-07-2018, 05:38 PM)gowaddle Wrote: At least as of 2.0.4, you still have to either rename /etc/OpenCL/venders to vendors or do a soft link to fix everything.
Using most recent tinker debian load. Can't find /etc/OpenCL. Has it moved or do I need to get it off the
web somewhere.
Thanks,
RITSYS
•
Posts: 178
Threads: 31
Likes Received: 32 in 24 posts
Likes Given: 13
Joined: Jul 2017
About OpenCL, RK provides a library called libmali.so(path is /usr/lib/arm-linux-gnueabihf/libmali.so) to support.
User can build the libOpenCL.a from the code of this site:
https://github.com/krrishnarraj/libopencl-stub via assign the path of libmali.so to it
After above operations, user can use OpenCL function by linking libOpenCL.a when compiling their OpenCL program.
•
Posts: 5
Threads: 1
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Dec 2017
01-10-2018, 06:14 PM
(This post was last modified: 01-10-2018, 07:00 PM by rtisys.)
(01-10-2018, 11:05 AM)Tinker Board Wrote: About OpenCL, RK provides a library called libmali.so(path is /usr/lib/arm-linux-gnueabihf/libmali.so) to support.
User can build the libOpenCL.a from the code of this site: https://github.com/krrishnarraj/libopencl-stub via assign the path of libmali.so to it
After above operations, user can use OpenCL function by linking libOpenCL.a when compiling their OpenCL program.
Fantastic....just what I was hoping for...thanks for the info. BTW,
I'm assuming this is Opencl 1.0 (or 1.1?) but not 1.2.
Thanks again, cheers,
RTISYS
(01-10-2018, 06:14 PM)rtisys Wrote: (01-10-2018, 11:05 AM)Tinker Board Wrote: About OpenCL, RK provides a library called libmali.so(path is /usr/lib/arm-linux-gnueabihf/libmali.so) to support.
User can build the libOpenCL.a from the code of this site: https://github.com/krrishnarraj/libopencl-stub via assign the path of libmali.so to it
After above operations, user can use OpenCL function by linking libOpenCL.a when compiling their OpenCL program.
Fantastic....just what I was hoping for...thanks for the info. BTW,
I'm assuming this is Opencl 1.0 (or 1.1?) but not 1.2.
Thanks again, cheers,
RTISYS
Just to add one more thing. I could not find libopencl.h anywhere on the Tinker OS. I copied it from the github
site you pointed me to. If there's any problem w/consistency, I'll also copy and rebuild the library source
code and use that instead of the libopencl.so that's in the latest OS dist.
Cheers,
RTISYS
•
Posts: 4
Threads: 0
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Aug 2017
01-12-2018, 02:29 AM
(This post was last modified: 04-30-2018, 03:50 AM by Tinker Board.
Edit Reason: support to OpenCL 1.2
)
Hi rtisys,
RK3288 support OpenCL 1.1 not 1.2. You can refer to this site:
https://en.wikipedia.org/wiki/Rockchip_RK3288
The stub libOpenCL.a provide an interface that can dynamic link the opencl library in different platform(Apple, Android, Linux, Win32). So it's fine that use the libOpenCL.so on the Tinker OS directly without the stub.
1. Copy the CL directory from
https://github.com/rockchip-linux/libmal...include/CL to path /usr/include/
2. Add -lOpenCL as one of flag to compile your opencl program on Tinker Board
ex:
$ g++ opencl_test.cpp -o opencl_test -lOpenCL
-- update --
After confirming with the vendor, we konw that RK3288 does support to OpenCL 1.2 Full profile.
•
Posts: 7
Threads: 0
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Jan 2018
01-12-2018, 10:07 AM
(This post was last modified: 01-12-2018, 10:15 AM by unskulledman.)
(01-12-2018, 02:29 AM)cathy_chuang Wrote: Hi rtisys,
RK3288 support OpenCL 1.1 not 1.2. You can refer to this site: https://en.wikipedia.org/wiki/Rockchip_RK3288
The stub libOpenCL.a provide an interface that can dynamic link the opencl library in different platform(Apple, Android, Linux, Win32). So it's fine that use the libOpenCL.so on the Tinker OS directly without the stub.
1. Copy the CL directory from https://github.com/krrishnarraj/libopencl-stub to path /usr/include/
2. Add -lOpenCL as one of flag to compile your opencl program on Tinker Board
ex:
$ g++ opencl_test.cpp -o opencl_test -lOpenCL
I thought that the
Mali-T760 MP4 GPU of the Tinker Board supported OpenCL 1.1 and 1.2 full profile?
I used the hardware acceleration feature of the OpenCV library (which requires OpenCL 1.2 full profile) and it works.
link:
https://developer.arm.com/products/graph...i-t760-gpu
•