This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:common:applications:opencl [2025/01/09 20:58] nick |
products:sbc:common:applications:opencl [2025/02/17 21:20] (current) nick |
||
---|---|---|---|
Line 22: | Line 22: | ||
``` | ``` | ||
- | <WRAP important> | ||
- | **VIM3** 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 / | ||
- | |||
- | # Symlink the right OpenCL lib for Mali GPU | ||
- | $ sudo ln -s / | ||
- | ``` | ||
- | |||
- | 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. | ||
- | </ | ||
===== Get source code ====== | ===== Get source code ====== | ||
Clone the examples [[gh> | Clone the examples [[gh> | ||
Line 48: | Line 35: | ||
```shell | ```shell | ||
$ sudo apt update | $ sudo apt update | ||
- | $ sudo apt install opencl-headers opencl-clhpp-headers | + | $ sudo apt install |
``` | ``` | ||
==== Install the Python OpenCL library ==== | ==== Install the Python OpenCL library ==== | ||
```shell | ```shell | ||
- | $ sudo apt install python3-pip python3-numpy python3-pyopencl | + | $ sudo apt install |
``` | ``` | ||
+ | |||
+ | <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 / | ||
+ | ``` | ||
+ | |||
+ | 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. | ||
+ | </ | ||
===== Run Examples ===== | ===== Run Examples ===== |