Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:applications:opencl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:common:applications:opencl [2023/10/26 03:21]
hyphop
products:sbc:common:applications:opencl [2025/02/17 21:20] (current)
nick
Line 11: Line 11:
 </WRAP> </WRAP>
  
-^ board ^ Linux Kernel (BSP) ^ OS ^  +^ board                                         ^ Linux Kernel (BSP)  ^ OS                            
-| VIM3 \\ **Mali G52-MP4** - Bifrost 2nd gen| 4.9 \\ 5.15 | Ubuntu 22.04| +| VIM3 \\ **Mali G52-MP4** - Bifrost 2nd gen    | 4.9 \\ 5.15         | Ubuntu 22.04 \\ Ubuntu 24.04  
-| VIM3L \\ **Mali G31-MP2** - Bifrost 1st gen| 4.9 \\ 5.15 | Ubuntu 22.04| +| VIM3L \\ **Mali G31-MP2** - Bifrost 1st gen   | 4.9 \\ 5.15         | Ubuntu 22.04 \\ Ubuntu 24.04  
-| VIM4 \\ **Mali G52-MP8** - Bifrost 2nd gen| 5.4 \\ 5.15 | Ubuntu 22.04| +| VIM4 \\ **Mali G52-MP8** - Bifrost 2nd gen    | 5.4 \\ 5.15         | Ubuntu 22.04 \\ Ubuntu 24.04  
-| Edge2 \\ **Mali G610-MP4** - Valhall 3rd gen| 5.10| Ubuntu 22.04|+| Edge2 \\ **Mali G610-MP4** - Valhall 3rd gen  | 5.10 \\ 6.1         | Ubuntu 22.04 \\ Ubuntu 24.04  |
  
 ===== Check OpenCL capabilities and details ====== ===== Check OpenCL capabilities and details ======
Line 34: Line 34:
 ==== Install the OpenCL headers ==== ==== Install the OpenCL headers ====
 ```shell ```shell
-$ sudo apt install opencl-headers opencl-clhpp-headers+$ sudo apt update 
 +$ sudo apt install -y opencl-headers opencl-clhpp-headers ocl-icd-opencl-dev
 ``` ```
  
 ==== Install the Python OpenCL library ==== ==== Install the Python OpenCL library ====
 ```shell ```shell
-$ sudo apt install python3-pip +$ sudo apt install -y python3-pip python3-numpy python3-pyopencl
-$ pip3 install numpy pyopencl+
 ``` ```
 +
 +<WRAP important>
 +**VIM3/3L** has OpenCL capabilities for both NPU and GPU, and by default the OpenCL lib in /usr/lib is for NPU.
 +To use the GPU for proper acceleration follow the below steps to replace the correct library for the GPU.
 +```shell
 +# Move the NPU OpenCL lib
 +$ sudo mv /usr/lib/libOpenCL.so /usr/lib/libOpenCL.so.old
 +```
 +
 +Note: With the 4.9 kernel, there is only OpenCL 2.0 capability and PyOpenCL will break, migrating to 5.15 kernel images will resolve it.
 +</WRAP>
  
 ===== Run Examples ===== ===== Run Examples =====
Line 88: Line 99:
 On **VIM3/3L/4**: On **VIM3/3L/4**:
 ```shell ```shell
-$ echo 2 | sudo tee /sys/class/mpugpu/scale_mode+$ echo 2 | sudo tee /sys/class/mpgpu/scale_mode
 ``` ```
  
Last modified: 2023/10/26 03:21 by hyphop