This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:vim4:npu:npu-sdk [2023/08/30 03:02] louis |
products:sbc:vim4:npu:npu-sdk [2025/05/08 03:08] (current) nick |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ~~tag> | ||
| - | ====== NPU Model Convert ====== | + | **Doc for version ddk-3.4.7.7** |
| + | |||
| + | ====== | ||
| + | |||
| + | {{indexmenu_n> | ||
| <WRAP important > | <WRAP important > | ||
| - | Only **New VIM4** supports NPU, you can check the version of your VIM4 here: [[products: | + | Only **New VIM4** supports NPU, you can [[../configurations/identify-version|check VIM4 the version]] |
| </ | </ | ||
| Line 10: | Line 15: | ||
| </ | </ | ||
| - | ===== Build Virtual | + | ===== Build Docker |
| Follow Docker official docs to install Docker: [[https:// | Follow Docker official docs to install Docker: [[https:// | ||
| - | Get Docker: | + | Follow the script below to get Docker |
| ```shell | ```shell | ||
| - | $ cd vim4_npu_sdk | + | docker pull numbqq/npu-vim4 |
| - | $ docker pull yanwyb/npu:v1 | + | |
| - | $ docker run -it --name | + | |
| - | -v / | + | |
| - | -v / | + | |
| - | yanwyb/ | + | |
| ``` | ``` | ||
| ===== Get Convert Tool ===== | ===== Get Convert Tool ===== | ||
| + | |||
| + | You can find the SDK here: [[dl> | ||
| ```shell | ```shell | ||
| - | $ git clone https://gitlab.com/khadas/ | + | $ wget https://dl.khadas.com/products/ |
| - | $ cd vim4_npu_sdk | + | $ tar xvzf vim4_npu_sdk-ddk-3.4.7.7-250508.tgz |
| + | $ cd vim4_npu_sdk-ddk-3.4.7.7-250508 | ||
| $ ls | $ ls | ||
| - | bin demo | + | adla-toolkit-binary |
| ``` | ``` | ||
| - | * '' | + | * '' |
| - | * '' | + | * '' |
| - | * '' | + | * '' |
| + | |||
| + | <WRAP important> | ||
| + | If your kernel is older than 241129, please use branch npu-ddk-1.7.5.5. | ||
| + | </ | ||
| ===== Convert Model ===== | ===== Convert Model ===== | ||
| Line 43: | Line 50: | ||
| ```shell | ```shell | ||
| - | $ khadas@2655b6cbbc01: | + | bash convert-in-docker.sh normal |
| - | $ khadas@2655b6cbbc01: | + | |
| ``` | ``` | ||
| Line 50: | Line 56: | ||
| ```shell | ```shell | ||
| - | $ khadas@2655b6cbbc01: | + | ~/vim4_npu_sdk$ ls adla-toolkit-binary/ |
| caffe_output | caffe_output | ||
| convert_adla.sh | convert_adla.sh | ||
| Line 56: | Line 62: | ||
| Converted model is '' | Converted model is '' | ||
| + | |||
| + | <WRAP tip > | ||
| + | If you want to convert your own model, just modify script '' | ||
| + | </ | ||
| + | |||
| ==== Important parameters ==== | ==== Important parameters ==== | ||
| Line 63: | Line 74: | ||
| * '' | * '' | ||
| * '' | * '' | ||
| - | * '' | + | * '' |
| - | * '' | + | * '' |
| * '' | * '' | ||
| * '' | * '' | ||
| Line 72: | Line 83: | ||
| * '' | * '' | ||
| * '' | * '' | ||
| - | * '' | + | * '' |
| * '' | * '' | ||