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!!    
 
You will need: 
- The last stable release of  ARM OpenCLComputeLibrary
 
   as root(Compile it for example during the night...it will take hours..) 
 
 
- After compile it,
 
   Check if ARM opencl icd is ok: 
   Code: cat /etc/OpenCL/vendors/mali.icd 
libMaliOpenCL.so
  
 
- Run a test, on ARM OpenCLCompute Library:
 
   Code: cd /opt/ComputeLibrary && LD_LIBRARY_PATH=build/ ./build/examples/cl_convolution 
(...) 
Test passed
  
 
- 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 ) 
 
 
- 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!!!    
 
 
- 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..
 
 
 
 |