Broken OpenCL in Fenix for Khadas VIM3

Hi all,

If you use fenix,
BRANCH=master
COMMIT=2e74e40cd84c
MESSAGE=“logo: update logo”

,to build a system with the following configuration:

KHADAS_BOARD=VIM3
LINUX=mainline
UBOOT=mainline
DISTRIBUTION=Ubuntu
DISTRIB_RELEASE=focal
DISTRIB_TYPE=server
DISTRIB_ARCH=arm64
INSTALL_TYPE=SD-USB

, you’ll get a faulty image, with broken OpenCL and of course all of it’s dependants.
It will download:
npu_aml-dd7b0a7036d480739c9f8c62bdb51a2daa16e91a.tar.gz
containing:
aml-npu_6.4.6.2.5.3.2_arm64.deb

This package contains the following files:
CONTENTS/lib:
314504 Nov 29 23:40 libArchModelSw.so
1682875 Nov 29 23:40 libGAL.so
330224 Nov 29 23:40 libNNArchPerf.so
151264 Nov 29 23:40 libnnsdk.so
428593 Nov 29 23:40 libOpenCL.so
2689844 Nov 29 23:40 libOpenVX.so
34302 Nov 29 23:40 libOpenVXU.so
3713800 Nov 29 23:40 libovxlib.so
164240 Nov 29 23:40 libVSC_Lite.so

When you run the image on the Khadas VIM3, you run this command:
khadas@Khadas:/usr/lib$ ldd libOpenCL.so
linux-vdso.so.1 (0x0000ffff87a4e000)
libGAL.so => /lib/libGAL.so (0x0000ffff87813000)
libVSC.so => not found
libCLC.so => not found
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffff87766000)
librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x0000ffff8774e000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff875db000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffff875a9000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffff87595000)
/lib/ld-linux-aarch64.so.1 (0x0000ffff87a1e000)

As you can see libOpenCL.so was linked against libVSC.so and libCLC.so, those files are missing, but you have one libVSC_Lite.so instead.

How will this OpenCL work if the libOpenCL.so module is not loadable ?
No one tested OpenCL with npu_sdk_6.4.6.2.5.3.2 till now ?

Hello @telelaci

OpenCL only supported on 4.9 kernel, but you choose the mainline kernel, please use the 4.9 kernel.

That makes the mainline system almost unusable, don’t you think ?

OpenCL was supported by the previous npu-aml package: 6.4.4.3AAA
With that package + mainline 5.16 kernel:
clinfo: /usr/lib/aarch64-linux-gnu/libOpenCL.so.1: no version information available (required by clinfo)
Number of platforms 1
Platform Name Vivante OpenCL Platform
Platform Vendor Vivante Corporation
Platform Version OpenCL 1.2 V6.4.4.3.310723AAA
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix viv

Platform Name Vivante OpenCL Platform
Number of devices 1
Device Name Vivante OpenCL Device VIPNano-QI.7120.0000
Device Vendor Vivante Corporation
Device Vendor ID 0x564956
Device Version OpenCL 1.2
Driver Version OpenCL 1.2 V6.4.4.3.310723AAA
Device OpenCL C Version OpenCL C 1.2
Device Type GPU
Device Profile FULL_PROFILE
… so on … it worked …

The problem is not the kernel at all, but the broken npu-aml package. You upgraded Fenix mainline and you upgraded the npu_aml in it and you removed the OpenCL support from it ? It was not worth mentioning ?

It would be supported with a proper Vivante libOpenCL.so up to OpenCL 3.0. (Mali supports only OpenCL 2.1)
You just have to get the missing libVSC.so and libCLC.so belonging to the mentioned libOpenCL.so.
That mentioned libOpenCL has been built somehow somewhere:

khadas@Khadas:/usr/lib$ sha1sum libOpenCL.so
18e615282b5b806282ee9b86f9ba5a2854b6afcf libOpenCL.so

Those missing libVSC.so and libCLC.so do exist (because Vivante couldn’t have built libOpenCL.so without them) at Vivante just it seems you don’t have it, you can’t get it.
Why is that ? Why Amlogic/VeriSilicon/Vivante do not want to support the NPU? I doubt that.
Is it a royaly problem ? Do they want device royalty for it, and you don’t want to pay for that ?
It seems that in the previous Vivante NPU blobs OpenCL was limited at v1.2 Full Profile.
Now they don’t support OpenCL at all ?
You should explain the situation to the customers honestly, they deserve it.

You know kernel 4.9 is a very serious restriction in the year of 2022 even if it gets security patches and fixes.

Thanks for your feedback we will check this issue.

Hello @telelaci

You want to use OpenCL with NPU or GPU?

Although clinfo command works with npu-aml package: 6.4.4.3AAA, but the information is from NPU, I’m not sure whether it can work.

root@Khadas:# clinfo 
clinfo: /lib/libOpenCL.so.1: no version information available (required by clinfo)
Number of platforms                               1
  Platform Name                                   Vivante OpenCL Platform
  Platform Vendor                                 Vivante Corporation
  Platform Version                                OpenCL 1.2 V6.4.4.3.310723AAA
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             viv

  Platform Name                                   Vivante OpenCL Platform
Number of devices                                 1
  Device Name                                     Vivante OpenCL Device VIPNano-QI.7120.0000
  Device Vendor                                   Vivante Corporation
  Device Vendor ID                                0x564956
  Device Version                                  OpenCL 1.2 
  Driver Version                                  OpenCL 1.2 V6.4.4.3.310723AAA
  Device OpenCL C Version                         OpenCL C 1.2 
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               1
  Max clock frequency                             800MHz
  Device Partition                                (core)
    Max number of sub-devices                     0
    Supported partition types                     (n/a)
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
=== CL_PROGRAM_BUILD_LOG ===
(6:0) : error : syntax error at 'kernel'
  Preferred work group size multiple              <getWGsizes:1200: create kernel : error -45>
  Preferred / native vector sizes                 
    char                                                 4 / 4       
    short                                                4 / 4       
    int                                                  4 / 4       
    long                                                 4 / 4       
    half                                                 0 / 0        (cl_khr_fp16)
    float                                                4 / 4       
    double                                               0 / 0        (n/a)
  Half-precision Floating-point support           <printDeviceInfo:68: get CL_DEVICE_HALF_FP_CONFIG : error -30>
  Single-precision Floating-point support         (core)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Double-precision Floating-point support         (n/a)
  Address bits                                    32, Little-Endian
  Global memory size                              268435456 (256MiB)
  Error Correction support                        Yes
  Max memory allocation                           134217728 (128MiB)
  Unified memory for Host and Device              Yes
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       2048 bits (256 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        16384 (16KiB)
  Global Memory cache line size                   64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max size for 1D images from buffer            65536 pixels
    Max 1D or 2D image array size                 8192 images
    Max 2D image size                             8192x8192 pixels
    Max 3D image size                             8192x8192x8192 pixels
    Max number of read image args                 128
    Max number of write image args                8
  Local memory type                               Global
  Local memory size                               32768 (32KiB)
  Max number of constant args                     9
  Max constant buffer size                        65536 (64KiB)
  Max size of kernel argument                     1024
  Queue properties                                
    Out-of-order execution                        Yes
    Profiling                                     Yes
  Prefer user sync for interop                    Yes
  Profiling timer resolution                      1000ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
  printf() buffer size                            1048576 (1024KiB)

I don’t have much knowledge about OpenCL, but the libOpenCL.so is from npu package not from Arm Mali blob, are you sure it can work well?

For 4.9 kernel, the correct clinfo from Mali GPU is:

Number of platforms                               1
  Platform Name                                   ARM Platform
  Platform Vendor                                 ARM
  Platform Version                                OpenCL 2.0 git.c8adbf9.122c9daed32dbba4b3056f41a2f23c58
  Platform Profile                                FULL_PROFILE
  Platform 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_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp16 cl_khr_icd cl_khr_egl_image cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_subgroups cl_khr_create_command_queue cl_arm_core_id cl_arm_printf cl_arm_thread_limit_hint cl_arm_non_uniform_work_group_size cl_arm_import_memory cl_arm_shared_virtual_memory
  Platform Extensions function suffix             ARM

  Platform Name                                   ARM Platform
Number of devices                                 1
  Device Name                                     Mali-G52
  Device Vendor                                   ARM
  Device Vendor ID                                0x72120000
  Device Version                                  OpenCL 2.0 git.c8adbf9.122c9daed32dbba4b3056f41a2f23c58
  Driver Version                                  2.0
  Device OpenCL C Version                         OpenCL C 2.0 git.c8adbf9.122c9daed32dbba4b3056f41a2f23c58
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               2
  Max clock frequency                             750MHz
  Device Partition                                (core)
    Max number of sub-devices                     0
    Supported partition types                     None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             384x384x384
  Max work group size                             384
  Preferred work group size multiple              8
  Preferred / native vector sizes                 
    char                                                16 / 4       
    short                                                8 / 2       
    int                                                  4 / 1       
    long                                                 2 / 1       
    half                                                 8 / 2        (cl_khr_fp16)
    float                                                4 / 1       

Hi numbqq,

Both, if that would be possible, but it is not. So any of them, but I need at least one HW OpenCL device.
It’s necessary in many old-style existing computing programs, including OpenCV.
You can’t upgrade every AI tasks to the NPU sdk.

There are 2 OpenCL devices on the VIM3 board.
1 - Vivante VIPNano NPU - compatible with OpenCL 3.0 Full Profile
2 - Mali G52 GPU - compatible with OpenCL 2.0 Full Profile

I can’t use Mali GPU because I have to use mainline kernel. And I can’t use the Mali kernel drivers with the libMali.so binary blob (which contains OpenCL also) from the year 2018 in 2022 with and 5.16 mainline kernel. I don’t want to use 4.9 kernel, that is nonsense if you support a kernel released in 2016 (!!!), you want me to use it in 2022. I know it’s not your fault but Amlogic’s. They should build a new Mali IP library for the newest kernels. They stopped to support A311D Soc in the year 2018 with a 4.9 system ? That was it ?

So we have to use mainline. The aml-npu sdk would be ok, the VIPNano NPU is much faster compute device than Mali GPU anyway.
But the OpenCL support were discontinued after npu-aml package v6.4.4.3AAA.
And it was supported OpenCL v1.2 anyway, although the NPU is able to do OpenCL v3.0.
I think it was intentional restriction.
And now with the aml-npu_6.4.6.2.5.3.2 the OpenCL is broken totally.
It can be intentional, or just a bug. You shoul ask them, Vivante or Amlogic, whoever provides aml-npu_6.4.6.2.5.3.2 to you. Is there any documentation, information, roadmap about NPU support ?

Sorry to say, but A311D is getting unusable, or at least it has very limited use.
And with mainline kernel, we have a huge problem with video decoding/encoding also.
Even the H.264 decoding is bugged but basically works at least at 1080p.
But we have no 4k decoding at all.
And the AVE-10 device capabilities are: MVC, MPEG-1/2/4, VC-1/WMV, AVS, AVS+, AVS2 RealVideo, MJPEG, H.264, H265-10, VP9 and also JPEG pictures with no size limitation. The independent encoder is able to encode in JPEG or H.265/H.264 up to 1080p at 60fps
We have minimal support in mainline kernel, only H.264 decoding, nothing else in the above list.
Even LibreElec H.265 decoding freezes immediately, it can’t even play 4k movies.

Sorry to say but VIM3 SW support is catastrophy now in 2022, although A311D chip it’s not a bad and not an obsolete chip yet. You shouldn’t bury it already. But the kernel v4.9 will do that, it makes it unusable. That kernel was 2 years already in 2018, when the A311D chip was started. Now its almost 6 years old.
This is basically Amlogic’s fault, not your’s fault either Neil Armstrong’s, but you should push Amlogic harder. They could build libMali.so for 5.15 kernel if they wanted. They could upgrade their buildroot to 2022 or at least 2021 if they wanted.

Have you tesetd and didn’t work ? The clinfo executes standard OpenCL commands on the HW device, so if it’s able to get the device parameters then most probably it works, why wouldn’t ?

I’m not sure of course, but A311D has a Vivante NPU, and that NPU supports OpenCL 3.0.
This is the library what Vivante distributes for i.MX8 boards also. The i.MX8MP has vivante VIP8000 Nano NPU almost looks like the A311D’s NPU, very similar things. I hope it works, why not. And Vivante/Amlogic should support the HW device (NPU) they sold you, or they should talk about it if they don’t. Do they want royalty fee for fully supported NPU ? How much is it, per SoC ? They should say something at least.

Regards,
Laci

I have just booted my vim3pro in linux for the first time, I am interested in using OpenCL with mali gpu but I cannot.
I use an os image from: dl.khadas.com - Index of /products/vim3/firmware/ubuntu/emmc/
khadas-vim3:~$ clinfo
gives:
Number of platforms 0

I have seen some other posts in this forum also related to the usage of openCL, and that certain versions don’t support openCL.

Could you tell me what you did to use openCL on vim3?

@alex_alex with the provided kernel 4.9 images, please check if this solves your issue.

echo "libmali.so" > /etc/OpenCL/vendors/mali.icd

Sorry Alex, I don’t use that board anymore, its was obsolete already when it was new. It was a big disappointment, they wanted me to use 4.9 kernel and 1.14 gstreamer. That Amlogic A311D system was released in 2018…2019, when the A311D chip was released. It never got upgraded since then, by Amlogic. The current stable kernel is 6.5.7 and gstreamer is about 1.22.6.
Debian’s Bookworm kernel is 6.1.55-1 (2023-09-29)
Such old systems like 4.9 are not wanted. You can say the same about the “new” VIM4’s kernel 5.4. It’s already obsolete, and most probably its system won’t get updated ever, just like VIM3 never did. I don’t understand Amlogic to be honest, they do no long term maintenance at all. Are they lazy? Or they just don’t care, these are not their important products? You can’t do anything else but using 4.9 kernel with the old libmali.so for OpenCL 1.2 as electric1 recommended. It will probably work.

2 Likes

Mainline linux kernel supports panfrost and opencl implementations with clover, you can check it out.

And not use the VPU?
Are you kidding?
Ha ha ha

Hi Electr1,

If you work for Khadas, you should learn more about these things. Not just the kernel supports panfrost, but the mesa3d library also (that is the user level you want)

Panfrost — The Mesa 3D Graphics Library latest documentation (G52)

This mesa gallium driver is HW accelerated indeed.
But unfortunately, the native libmali.so is about 5 times faster than this mesa driver. And this multiplier is true for every ARM (Mali) GPU. Most probably the mesa driver was made by reverse engineering, and the performance is not great, although it’s faster than the SW rendering.

Regards,
Laci

Exactly.
The kernel doesn’t support even h264 for this VCU, although a French guy was working on it. It was bugged and unfinished.
And h265/hevc, vp8, vp9, mpeg, jpeg (the most basic decoders for video playing) are not even planned.
Not mentioning the encoders, for recording.
The supported SW is only: kernel 4.9 and gstreamer 1.14 (from 2016)

Most probably the problem is the same with VIM4. Obsolete, old and partial SW support. This is not a serious product in my opinion, only noobs will buy them.

@telelaci the 4.9 kernel has been superseded by the new 5.15 kernel, OpenCL api version support has been bumped up from 1.2 to 3.0

khadas@Khadas:~$ clinfo
Number of platforms                               1
  Platform Name                                   ARM Platform
  Platform Vendor                                 ARM
  Platform Version                                OpenCL 3.0 v1.r37p0-wayland-drm-g52-aarch64-e0568045b-cf.0347e3e8af711046d4b44864aff1a929
  Platform Profile                                FULL_PROFILE
  Platform 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_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp16 cl_khr_icd cl_khr_egl_image cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_subgroups cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_subgroup_non_uniform_arithmetic cl_khr_subgroup_clustered_reduce cl_khr_il_program cl_khr_priority_hints cl_khr_create_command_queue cl_khr_spirv_no_integer_wrap_decoration cl_khr_extended_versioning cl_khr_device_uuid cl_khr_suggested_local_work_size cl_khr_extended_bit_ops cl_khr_integer_dot_product cl_khr_semaphore cl_khr_external_semaphore cl_khr_external_semaphore_sync_fd cl_khr_command_buffer cl_arm_core_id cl_arm_printf cl_arm_non_uniform_work_group_size cl_arm_import_memory cl_arm_import_memory_dma_buf cl_arm_import_memory_host cl_arm_import_memory_protected cl_arm_integer_dot_product_int8 cl_arm_job_slot_selection cl_arm_scheduling_controls cl_arm_controlled_kernel_termination cl_ext_cxx_for_opencl cl_ext_image_tiling_control cl_ext_image_requirements_info cl_ext_image_from_buffer
  Platform Extensions with Version                cl_khr_global_int32_base_atomics                                 0x400000 (1.0.0)
                                                  cl_khr_global_int32_extended_atomics                             0x400000 (1.0.0)
                                                  cl_khr_local_int32_base_atomics                                  0x400000 (1.0.0)
                                                  cl_khr_local_int32_extended_atomics                              0x400000 (1.0.0)
                                                  cl_khr_byte_addressable_store                                    0x400000 (1.0.0)
                                                  cl_khr_3d_image_writes                                           0x400000 (1.0.0)
                                                  cl_khr_int64_base_atomics                                        0x400000 (1.0.0)
                                                  cl_khr_int64_extended_atomics                                    0x400000 (1.0.0)
                                                  cl_khr_fp16                                                      0x400000 (1.0.0)
                                                  cl_khr_icd                                                       0x400000 (1.0.0)
                                                  cl_khr_egl_image                                                 0x400000 (1.0.0)
                                                  cl_khr_image2d_from_buffer                                       0x400000 (1.0.0)
                                                  cl_khr_depth_images                                              0x400000 (1.0.0)
                                                  cl_khr_subgroups                                                 0x400000 (1.0.0)
                                                  cl_khr_subgroup_extended_types                                   0x400000 (1.0.0)
                                                  cl_khr_subgroup_non_uniform_vote                                 0x400000 (1.0.0)
                                                  cl_khr_subgroup_ballot                                           0x400000 (1.0.0)
                                                  cl_khr_subgroup_non_uniform_arithmetic                           0x400000 (1.0.0)
                                                  cl_khr_subgroup_clustered_reduce                                 0x400000 (1.0.0)
                                                  cl_khr_il_program                                                0x400000 (1.0.0)
                                                  cl_khr_priority_hints                                            0x400000 (1.0.0)
                                                  cl_khr_create_command_queue                                      0x400000 (1.0.0)
                                                  cl_khr_spirv_no_integer_wrap_decoration                          0x400000 (1.0.0)
                                                  cl_khr_extended_versioning                                       0x400000 (1.0.0)
                                                  cl_khr_device_uuid                                               0x400000 (1.0.0)
                                                  cl_khr_suggested_local_work_size                                 0x400000 (1.0.0)
                                                  cl_khr_extended_bit_ops                                          0x400000 (1.0.0)
                                                  cl_khr_integer_dot_product                                       0x800000 (2.0.0)
                                                  cl_khr_semaphore                                                   0x9000 (0.9.0)
                                                  cl_khr_external_semaphore                                          0x9000 (0.9.0)
                                                  cl_khr_external_semaphore_sync_fd                                  0x9000 (0.9.0)
                                                  cl_khr_command_buffer                                              0x9000 (0.9.0)
                                                  cl_arm_core_id                                                   0x400000 (1.0.0)
                                                  cl_arm_printf                                                    0x400000 (1.0.0)
                                                  cl_arm_non_uniform_work_group_size                               0x400000 (1.0.0)
                                                  cl_arm_import_memory                                             0x400000 (1.0.0)
                                                  cl_arm_import_memory_dma_buf                                     0x400000 (1.0.0)
                                                  cl_arm_import_memory_host                                        0x400000 (1.0.0)
                                                  cl_arm_import_memory_protected                                   0x400000 (1.0.0)
                                                  cl_arm_integer_dot_product_int8                                  0x400000 (1.0.0)
                                                  cl_arm_job_slot_selection                                        0x400000 (1.0.0)
                                                  cl_arm_scheduling_controls                                         0x4000 (0.4.0)
                                                  cl_arm_controlled_kernel_termination                             0x400000 (1.0.0)
                                                  cl_ext_cxx_for_opencl                                            0x400000 (1.0.0)
                                                  cl_ext_image_tiling_control                                        0x1000 (0.1.0)
                                                  cl_ext_image_requirements_info                                     0x5000 (0.5.0)
                                                  cl_ext_image_from_buffer                                         0x400000 (1.0.0)
  Platform Numeric Version                        0xc00000 (3.0.0)
  Platform Extensions function suffix             ARM
  Platform Host timer resolution                  1ns

  Platform Name                                   ARM Platform
Number of devices                                 1
  Device Name                                     Mali-G52 r0p0
  Device Vendor                                   ARM
  Device Vendor ID                                0x72120000
  Device Version                                  OpenCL 3.0 v1.r37p0-wayland-drm-g52-aarch64-e0568045b-cf.0347e3e8af711046d4b44864aff1a929
  Device UUID                                     00001272-0100-0000-0000-000000000000
  Driver UUID                                     558d19a1-3080-94ae-eb2e-6bbdb2554b8d
  Valid Device LUID                               No
  Device LUID                                     0000-000000000000
  Device Node Mask                                0
  Device Numeric Version                          0xc00000 (3.0.0)
  Driver Version                                  3.0
  Device OpenCL C Version                         OpenCL C 3.0 v1.r37p0-wayland-drm-g52-aarch64-e0568045b-cf.0347e3e8af711046d4b44864aff1a929
  Device OpenCL C all versions                    OpenCL C                                                         0x400000 (1.0.0)
                                                  OpenCL C                                                         0x401000 (1.1.0)
                                                  OpenCL C                                                         0x402000 (1.2.0)
                                                  OpenCL C                                                         0x800000 (2.0.0)
                                                  OpenCL C                                                         0xc00000 (3.0.0)
  Device OpenCL C features                        __opencl_c_images                                                0x400000 (1.0.0)
                                                  __opencl_c_int64                                                 0x400000 (1.0.0)
                                                  __opencl_c_3d_image_writes                                       0x402000 (1.2.0)
                                                  __opencl_c_atomic_order_acq_rel                                  0x800000 (2.0.0)
                                                  __opencl_c_atomic_order_seq_cst                                  0x800000 (2.0.0)
                                                  __opencl_c_atomic_scope_device                                   0x800000 (2.0.0)
                                                  __opencl_c_atomic_scope_all_devices                              0x800000 (2.0.0)
                                                  __opencl_c_device_enqueue                                        0x800000 (2.0.0)
                                                  __opencl_c_generic_address_space                                 0x800000 (2.0.0)
                                                  __opencl_c_pipes                                                 0x800000 (2.0.0)
                                                  __opencl_c_program_scope_global_variables                        0x800000 (2.0.0)
                                                  __opencl_c_read_write_images                                     0x800000 (2.0.0)
                                                  __opencl_c_subgroups                                             0x800000 (2.0.0)
                                                  __opencl_c_work_group_collective_functions                       0x800000 (2.0.0)
  Device C++ for OpenCL Numeric Version           0x400000 (1.0.0)
  Latest comfornace test passed                   v2021-03-05-00
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               2
  Available core IDs                              0-1
  Available job slots (ARM)                       1-2
  Max clock frequency                             5MHz
  Device Partition                                (core)
    Max number of sub-devices                     0
    Supported partition types                     None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             384x384x384
  Max work group size                             384
  Preferred work group size multiple (device)     8
  Preferred work group size multiple (kernel)     8
  Max sub-groups per work group                   48
  Preferred / native vector sizes                 
    char                                                16 / 4       
    short                                                8 / 2       
    int                                                  4 / 1       
    long                                                 2 / 1       
    half                                                 8 / 2        (cl_khr_fp16)
    float                                                4 / 1       
    double                                               0 / 0        (n/a)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Double-precision Floating-point support         (n/a)
  Address bits                                    64, Little-Endian
  Global memory size                              2014236672 (1.876GiB)
  Error Correction support                        No
  Max memory allocation                           2014236672 (1.876GiB)
  Unified memory for Host and Device              Yes
  Shared Virtual Memory (SVM) capabilities        (core)
    Coarse-grained buffer sharing                 Yes
    Fine-grained buffer sharing                   No
    Fine-grained system sharing                   No
    Atomics                                       No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       1024 bits (128 bytes)
  Preferred alignment for atomics                 
    SVM                                           0 bytes
    Global                                        0 bytes
    Local                                         0 bytes
  Atomic memory capabilities                      relaxed, acquire/release, sequentially-consistent, work-item scope, work-group scope, device scope, all-devices scope
  Atomic fence capabilities                       relaxed, acquire/release, sequentially-consistent, work-item scope, work-group scope, device scope, all-devices scope
  Max size for global variable                    65536 (64KiB)
  Preferred total size of global vars             0
  Global Memory cache type                        Read/Write
  Global Memory cache size                        131072 (128KiB)
  Global Memory cache line size                   64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max size for 1D images from buffer            65536 pixels
    Max 1D or 2D image array size                 2048 images
    Base address alignment for 2D image buffers   32 bytes
    Pitch alignment for 2D image buffers          64 pixels
    Max 2D image size                             65536x65536 pixels
    Max 3D image size                             65536x65536x65536 pixels
    Max number of read image args                 128
    Max number of write image args                64
    Max number of read/write image args           64
  Pipe support                                    Yes
  Max number of pipe args                         16
  Max active pipe reservations                    1
  Max pipe packet size                            1024
  Local memory type                               Global
  Local memory size                               32768 (32KiB)
  Max number of constant args                     128
  Max constant buffer size                        2014236672 (1.876GiB)
  Generic address space support                   Yes
  Max size of kernel argument                     1024
  Queue properties (on host)                      
    Out-of-order execution                        Yes
    Profiling                                     Yes
  Device enqueue capabilities                     supported, replaceable default queue
  Queue properties (on device)                    
    Out-of-order execution                        Yes
    Profiling                                     Yes
    Preferred size                                2097152 (2MiB)
    Max size                                      16777216 (16MiB)
  Max queues on device                            1
  Max events on device                            1024
  Prefer user sync for interop                    No
  Profiling timer resolution                      1000ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Non-uniform work-groups                       Yes
    Work-group collective functions               Yes
    Sub-group independent forward progress        Yes
    IL version                                    SPIR-V_1.0
    ILs with version                              SPIR-V                                                           0x400000 (1.0.0)
  printf() buffer size                            1048576 (1024KiB)
  Built-in kernels                                (n/a)
  Built-in kernels with version                   (n/a)
  Device 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_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp16 cl_khr_icd cl_khr_egl_image cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_subgroups cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_subgroup_non_uniform_arithmetic cl_khr_subgroup_clustered_reduce cl_khr_il_program cl_khr_priority_hints cl_khr_create_command_queue cl_khr_spirv_no_integer_wrap_decoration cl_khr_extended_versioning cl_khr_device_uuid cl_khr_suggested_local_work_size cl_khr_extended_bit_ops cl_khr_integer_dot_product cl_khr_semaphore cl_khr_external_semaphore cl_khr_external_semaphore_sync_fd cl_khr_command_buffer cl_arm_core_id cl_arm_printf cl_arm_non_uniform_work_group_size cl_arm_import_memory cl_arm_import_memory_dma_buf cl_arm_import_memory_host cl_arm_import_memory_protected cl_arm_integer_dot_product_int8 cl_arm_job_slot_selection cl_arm_scheduling_controls cl_arm_controlled_kernel_termination cl_ext_cxx_for_opencl cl_ext_image_tiling_control cl_ext_image_requirements_info cl_ext_image_from_buffer
  Device Extensions with Version                  cl_khr_global_int32_base_atomics                                 0x400000 (1.0.0)
                                                  cl_khr_global_int32_extended_atomics                             0x400000 (1.0.0)
                                                  cl_khr_local_int32_base_atomics                                  0x400000 (1.0.0)
                                                  cl_khr_local_int32_extended_atomics                              0x400000 (1.0.0)
                                                  cl_khr_byte_addressable_store                                    0x400000 (1.0.0)
                                                  cl_khr_3d_image_writes                                           0x400000 (1.0.0)
                                                  cl_khr_int64_base_atomics                                        0x400000 (1.0.0)
                                                  cl_khr_int64_extended_atomics                                    0x400000 (1.0.0)
                                                  cl_khr_fp16                                                      0x400000 (1.0.0)
                                                  cl_khr_icd                                                       0x400000 (1.0.0)
                                                  cl_khr_egl_image                                                 0x400000 (1.0.0)
                                                  cl_khr_image2d_from_buffer                                       0x400000 (1.0.0)
                                                  cl_khr_depth_images                                              0x400000 (1.0.0)
                                                  cl_khr_subgroups                                                 0x400000 (1.0.0)
                                                  cl_khr_subgroup_extended_types                                   0x400000 (1.0.0)
                                                  cl_khr_subgroup_non_uniform_vote                                 0x400000 (1.0.0)
                                                  cl_khr_subgroup_ballot                                           0x400000 (1.0.0)
                                                  cl_khr_subgroup_non_uniform_arithmetic                           0x400000 (1.0.0)
                                                  cl_khr_subgroup_clustered_reduce                                 0x400000 (1.0.0)
                                                  cl_khr_il_program                                                0x400000 (1.0.0)
                                                  cl_khr_priority_hints                                            0x400000 (1.0.0)
                                                  cl_khr_create_command_queue                                      0x400000 (1.0.0)
                                                  cl_khr_spirv_no_integer_wrap_decoration                          0x400000 (1.0.0)
                                                  cl_khr_extended_versioning                                       0x400000 (1.0.0)
                                                  cl_khr_device_uuid                                               0x400000 (1.0.0)
                                                  cl_khr_suggested_local_work_size                                 0x400000 (1.0.0)
                                                  cl_khr_extended_bit_ops                                          0x400000 (1.0.0)
                                                  cl_khr_integer_dot_product                                       0x800000 (2.0.0)
                                                  cl_khr_semaphore                                                   0x9000 (0.9.0)
                                                  cl_khr_external_semaphore                                          0x9000 (0.9.0)
                                                  cl_khr_external_semaphore_sync_fd                                  0x9000 (0.9.0)
                                                  cl_khr_command_buffer                                              0x9000 (0.9.0)
                                                  cl_arm_core_id                                                   0x400000 (1.0.0)
                                                  cl_arm_printf                                                    0x400000 (1.0.0)
                                                  cl_arm_non_uniform_work_group_size                               0x400000 (1.0.0)
                                                  cl_arm_import_memory                                             0x400000 (1.0.0)
                                                  cl_arm_import_memory_dma_buf                                     0x400000 (1.0.0)
                                                  cl_arm_import_memory_host                                        0x400000 (1.0.0)
                                                  cl_arm_import_memory_protected                                   0x400000 (1.0.0)
                                                  cl_arm_integer_dot_product_int8                                  0x400000 (1.0.0)
                                                  cl_arm_job_slot_selection                                        0x400000 (1.0.0)
                                                  cl_arm_scheduling_controls                                         0x4000 (0.4.0)
                                                  cl_arm_controlled_kernel_termination                             0x400000 (1.0.0)
                                                  cl_ext_cxx_for_opencl                                            0x400000 (1.0.0)
                                                  cl_ext_image_tiling_control                                        0x1000 (0.1.0)
                                                  cl_ext_image_requirements_info                                     0x5000 (0.5.0)
                                                  cl_ext_image_from_buffer                                         0x400000 (1.0.0)

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  ARM Platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [ARM]
  clCreateContext(NULL, ...) [default]            Success [ARM]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 ARM Platform
    Device Name                                   Mali-G52 r0p0
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 ARM Platform
    Device Name                                   Mali-G52 r0p0
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 ARM Platform
    Device Name                                   Mali-G52 r0p0

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.14
  ICD loader Profile                              OpenCL 3.0

I was talking about GPU in my last comment.
The mali and the panfrost comparison, you should test that. Try glmark2-es2-wayland for example, or glmark2-es2-drm.
And VPU.
But I don’t use this board VIM3 - A311D anymore, it was obsolete in it’s lifetime because of lack of SW support, now the HW itself obsolete, because it’s slow
In 2022 January when I started this thread I was able to use OpenCL 1.2 with Vivante VIPNano, and OpenCL 2.0 with mali G52.