Tutorial[ OpenCL ]: OpenCL 1.2 FULL_PROFILE Working
#1
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 night...it will take hours..)

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

  3. Run a test, on ARM OpenCLCompute Library:
    Code:
    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 )
    Code:
    cd /home/rock64/Desktop && git clone https://github.com/stetre/mooncl.git && cd mooncl
    make
    sudo make install

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

  5. 1st test :
    Code:
    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: 
          cl_khr_global_int32_base_atomics
          cl_khr_global_int32_extended_atomics
          cl_khr_local_int32_base_atomics
          cl_khr_local_int32_extended_atomics
          cl_khr_byte_addressable_store
          cl_khr_3d_image_writes
          cl_khr_fp64
          cl_khr_int64_base_atomics
          cl_khr_int64_extended_atomics
          cl_khr_fp16
          cl_khr_gl_sharing
          cl_khr_icd
          cl_khr_egl_event
          cl_khr_egl_image
          cl_khr_image2d_from_buffer
          cl_arm_core_id
          cl_arm_printf
          cl_arm_thread_limit_hint
          cl_arm_non_uniform_work_group_size
          cl_arm_import_memory
       - 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):
    Code:
    lua examples/hello.lua
    20 + 30 = 50
    Nice!!

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  SkiffOS server with Docker ,NAS, Home assistant, Jellyfin, Snikket XMPP (tutorial) GreyLinux 12 12,388 04-04-2022, 05:26 AM
Last Post: GreyLinux
  SimpNas server with docker - home assistant, radicale , jellyfin & esphome (tutorial) GreyLinux 0 4,884 01-17-2021, 11:33 AM
Last Post: GreyLinux
  Tutorial:How to Configure ATS Fan control tuxd3v 26 57,946 11-06-2020, 08:56 PM
Last Post: g_t_j
  Serial Connection Tutorial: FTDI 232RL hmuller 0 3,754 10-23-2020, 11:56 AM
Last Post: hmuller
Wink Tutorial[ Seagate Disks ]: Optimize Life Span/Power Managment tuxd3v 14 26,783 06-19-2019, 04:40 AM
Last Post: Neo2018
Thumbs Up Tutorial[ Seagate Disks ]: Install Seagate OpenSeaChest Utilities tuxd3v 41 84,811 04-08-2019, 10:10 AM
Last Post: Neo2018
  Tutorial[ Multimedia ] : Play DVD movies tuxd3v 0 2,981 02-26-2019, 07:21 PM
Last Post: tuxd3v

Forum Jump:


Users browsing this thread: 1 Guest(s)