Tutorial[ OpenCL ]: OpenCL 1.2 FULL_PROFILE Working - Printable Version

+- PINE64 (
+-- Forum: ROCKPRO64 (
+--- Forum: RockPro64 Projects, Ideas and Tutorials (
+--- Thread: Tutorial[ OpenCL ]: OpenCL 1.2 FULL_PROFILE Working (/showthread.php?tid=6749)

Tutorial[ OpenCL ]: OpenCL 1.2 FULL_PROFILE Working - tuxd3v - 11-06-2018

Hello all,
Rockpro64 has MidGard Mali-T860, Graphics Card,
It has support at least for OpenCl 1.2 FULL_PROFILE( I don't know about OpenCL2.0?! )

For those wanting to try it, in Lua,
There are a project mooncl( which are the Lua Bindings for the Official Khronos OpenCL™ API , by stetre )

It supports Lua >= 5.3 and OpenCL >= 1.2, ... so Rockpro64 is there too!! Cool

You will need:
  1. The last stable release of  ARM OpenCLComputeLibrary
    as root(Compile it for example during the will take hours..)

  2. After compile it,
    Check if ARM opencl icd is ok:
    cat /etc/OpenCL/vendors/mali.icd

  3. Run a test, on ARM OpenCLCompute Library:
    cd /opt/ComputeLibrary && LD_LIBRARY_PATH=build/ ./build/examples/cl_convolution
    Test passed

  4. The mooncl Bindings for the Official Khronos OpenCL™ API
    as normal user ( ie: rock64 )
    cd /home/rock64/Desktop && git clone && cd mooncl
    sudo make install

    It installed the shared library and headers in /usr/local( has expected )

  5. 1st test :
    lua examples/platforminfo.lua

       Found 1 platform.
       platform no. 1:
       - name: ARM Platform
       - vendor: ARM
       - version: OpenCL 1.2 v1.r14p0-01rel0-git(966ed26).f44c85cb3d2ceb87e8be88e7592755c3
       - profile: FULL_PROFILE
       - extensions: 
       - devices: 
          1: Mali-T860 (OpenCL 1.2 v1.r14p0-01rel0-git(966ed26).f44c85cb3d2ceb87e8be88e7592755c3 - FULL_PROFILE)
    Mali-T860 is detected and in OpenCL 1.2 FULL_PROFILE!!!  Cool

  6. 2nd test( sum 20 + 30 in OpenCl):
    lua examples/hello.lua
    20 + 30 = 50

Now the Sky is the Limit for you!!!!
Kudos for stetre for providing the Lua Bindings..