Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Update PaddleLite-generic-demo to v2.11 #9012

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/demo_guides/amlogic_npu.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Paddle Lite 已支持晶晨 NPU 的预测部署。

### 运行图像分类示例程序

- 下载 Paddle Lite 通用示例程序[PaddleLite-generic-demo.tar.gz](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo.tar.gz),解压后目录主体结构如下:
- 下载 Paddle Lite 通用示例程序[PaddleLite-generic-demo.tar.gz](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo_v2_11_0.tar.gz),解压后目录主体结构如下:

```shell
- PaddleLite-generic-demo
Expand Down
2 changes: 1 addition & 1 deletion docs/demo_guides/android_nnapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Paddle Lite 已支持 Android NNAPI 的预测部署。

### 运行图像分类示例程序

- 下载 Paddle Lite 通用示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo.tar.gz),解压后目录主体结构如下:
- 下载 Paddle Lite 通用示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo_v2_11_0.tar.gz),解压后目录主体结构如下:

```shell
- PaddleLite-generic-demo
Expand Down
2 changes: 1 addition & 1 deletion docs/demo_guides/huawei_ascend_npu.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ $ npu-smi info

### 运行图像分类示例程序

- 下载示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo.tar.gz)(该 demo 的默认预编译库基于 CANN 5.1.RC1.alpha001 版本),解压后清单如下:
- 下载示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo_v2_11_0.tar.gz)(该 demo 的默认预编译库基于 CANN 5.1.RC1.alpha001 版本),解压后清单如下:

```shell
- PaddleLite-generic-demo
Expand Down
2 changes: 1 addition & 1 deletion docs/demo_guides/huawei_kirin_npu.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Paddle Lite 是首款支持华为自研达芬奇架构 NPU(Kirin 810/990 SoC

### 运行图像分类示例程序

- 下载 Paddle Lite 通用示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo.tar.gz),解压后目录主体结构如下:
- 下载 Paddle Lite 通用示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo_v2_11_0.tar.gz),解压后目录主体结构如下:

```shell
- PaddleLite-generic-demo
Expand Down
2 changes: 1 addition & 1 deletion docs/demo_guides/imagination_nna.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Paddle Lite 已支持 Imagination NNA 的预测部署。

### 运行图像分类示例程序

- 下载 Paddle Lite 通用示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo.tar.gz),解压后目录主体结构如下:
- 下载 Paddle Lite 通用示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo_v2_11_0.tar.gz),解压后目录主体结构如下:

```shell
- PaddleLite-generic-demo
Expand Down
2 changes: 1 addition & 1 deletion docs/demo_guides/intel_openvino.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Paddle Lite 已支持英特尔 OpenVINO 在 X86 服务器上进行预测部署

### 运行图像分类示例程序

- 下载示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo.tar.gz),解压后清单如下:
- 下载示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo_v2_11_0.tar.gz),解压后清单如下:

```shell
- PaddleLite-generic-demo
Expand Down
2 changes: 1 addition & 1 deletion docs/demo_guides/mediatek_apu.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Paddle Lite 已支持 MediaTek APU 的预测部署。

### 运行图像分类示例程序

- 下载 Paddle Lite 通用示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo.tar.gz),解压后目录主体结构如下:
- 下载 Paddle Lite 通用示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo_v2_11_0.tar.gz),解压后目录主体结构如下:

```shell
- PaddleLite-generic-demo
Expand Down
2 changes: 1 addition & 1 deletion docs/demo_guides/nvidia_tensorrt.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Paddle Lite 已支持 NVIDIA TensorRT 预测部署。 其接入原理是在线

## 运行示例程序

- 下载示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo.tar.gz),解压后清单如下:
- 下载示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo_v2_11_0.tar.gz),解压后清单如下:

```shell
- PaddleLite-generic-demo
Expand Down
2 changes: 1 addition & 1 deletion docs/demo_guides/rockchip_npu.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Paddle Lite 已支持 Rockchip NPU 的预测部署。

### 运行图像分类示例程序

- 下载 Paddle Lite 通用示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo.tar.gz),解压后目录主体结构如下:
- 下载 Paddle Lite 通用示例程序[ PaddleLite-generic-demo.tar.gz ](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo_v2_11_0.tar.gz),解压后目录主体结构如下:

```shell
- PaddleLite-generic-demo
Expand Down
2 changes: 1 addition & 1 deletion docs/demo_guides/verisilicon_timvx.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Paddle Lite 已支持通过 TIM-VX 的方式调用芯原 NPU 算力的预测部

### 运行图像分类示例程序

- 下载 Paddle Lite 通用示例程序[PaddleLite-generic-demo.tar.gz](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo.tar.gz),解压后目录主体结构如下:
- 下载 Paddle Lite 通用示例程序[PaddleLite-generic-demo.tar.gz](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo_v2_11_0.tar.gz),解压后目录主体结构如下:

```shell
- PaddleLite-generic-demo
Expand Down
2 changes: 1 addition & 1 deletion docs/develop_guides/nnadapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ typedef struct Device {
- [NNADAPTER_ADD 到 ge::op::Add 的转换器的实现](https://github.com/PaddlePaddle/Paddle-Lite/blob/ede855cb5bf602cbfb3c4e5fb59997f78ec19b81/lite/backends/nnadapter/nnadapter/src/driver/huawei_ascend_npu/converter/elementwise.cc#L23) 和 [NNADAPTER_ADD 到 ge::op::Add 的转换器的注册](https://github.com/PaddlePaddle/Paddle-Lite/blob/ede855cb5bf602cbfb3c4e5fb59997f78ec19b81/lite/backends/nnadapter/nnadapter/src/driver/huawei_ascend_npu/converter/all.h#L21) :在 HAL 层的 `Model` 到厂商 SDK 模型转换步骤的 `Operation` 转换过程中,用于保证正确调用指定的转换器生成并添加厂商 SDK 的算子表示,进而基于厂商 SDK 完成模型转换。
- [Paddle 算子 elementwise_add 到 NNADAPTER_ADD 转换器的注册](https://github.com/PaddlePaddle/Paddle-Lite/blob/ede855cb5bf602cbfb3c4e5fb59997f78ec19b81/lite/kernels/nnadapter/converter/all.h#L98) :具体是在转换器注册的设备名称字串中添加目标硬件的名称,其主要用于在 Paddle 模型的子图分割阶段中告诉子图分割算法哪些 Paddle 算子可以放在哪些硬件上执行,即哪些算子可以融合成一个 NNAdapter 子图,且在 NNAdapter 算子 Kernel 执行时,能够该子图转换为 NNAdapter 模型,进而传递到硬件的 HAL 层做进一步的转换。

- 基于 [PaddleLite-generic-demo](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo.tar.gz) 跑通第一个分类模型:当目标硬件的 HAL 层代码开发完成后(前期仅需开发一个 `NNADAPTER_SOFTMAX` 的转换器即可),需要验证 HAL 层到厂商 SDK 的链路是否打通,为方便厂商和用户测试,我们提供了包含图像分类和目标检测模型的 Demo 的压缩包,它支持 NNAdapter 目前已支持的所有硬件,覆盖 x86 Linux 、ARM Linux 和 Android 系统,可以本地执行或基于 ssh 或 adb 方式推送到远端设备上执行,各硬件的文档均涉及 Demo 的使用方法,具体可以访问:[华为昇腾 NPU](../demo_guides/huawei_ascend_npu) 、[华为麒麟 NPU](../demo_guides/huawei_kirin_npu) 、[晶晨 NPU](../demo_guides/amlogic_npu) 、[瑞芯微 NPU](../demo_guides/rockchip_npu) 、[联发科 APU](../demo_guides/mediatek_apu) 和[颖脉 NNA](../demo_guides/imagination_nna) 等。
- 基于 [PaddleLite-generic-demo](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo_v2_11_0.tar.gz) 跑通第一个分类模型:当目标硬件的 HAL 层代码开发完成后(前期仅需开发一个 `NNADAPTER_SOFTMAX` 的转换器即可),需要验证 HAL 层到厂商 SDK 的链路是否打通,为方便厂商和用户测试,我们提供了包含图像分类和目标检测模型的 Demo 的压缩包,它支持 NNAdapter 目前已支持的所有硬件,覆盖 x86 Linux 、ARM Linux 和 Android 系统,可以本地执行或基于 ssh 或 adb 方式推送到远端设备上执行,各硬件的文档均涉及 Demo 的使用方法,具体可以访问:[华为昇腾 NPU](../demo_guides/huawei_ascend_npu) 、[华为麒麟 NPU](../demo_guides/huawei_kirin_npu) 、[晶晨 NPU](../demo_guides/amlogic_npu) 、[瑞芯微 NPU](../demo_guides/rockchip_npu) 、[联发科 APU](../demo_guides/mediatek_apu) 和[颖脉 NNA](../demo_guides/imagination_nna) 等。
- 模型、算子转换器调试方法:调试 Demo 中的模型有时候并不是一帆风顺,可能在模型转换过程中出现 `core dump` ,也可能在模型跑通后发现结果无法与 CPU 结果对齐,这些问题尝尝源于部分 NNAdapter 操作符到厂商 SDK 算子的转换器的 BUG 导致的,有效的解决办法是:先将模型中所有 Paddle 算子强制跑在 CPU 上,然后根据模型拓扑顺序,逐步将 Paddle 算子放在目标硬件上执行,通过二分法、排除法最终定位到有问题的算子转换器上,具体可以参考上一章节中『自定义子图分割』。

- 添加算子、模型的单元测试
Expand Down
2 changes: 1 addition & 1 deletion docs/performance/benchmark_tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ adb shell "cd /data/local/tmp/benchmark;
编译完成后,NNAdapter 运行时库和 Device HAL 库将会生成在`build.lite*/inference_lite_lib*/cxx/lib/`目录下。

##### 步骤 3:获取新硬件 DDK
请下载 [Paddle Lite 通用示例程序](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo.tar.gz),并参照下表路径,获取新硬件所需的 DDK。
请下载 [Paddle Lite 通用示例程序](https://paddlelite-demo.bj.bcebos.com/devices/generic/PaddleLite-generic-demo_v2_11_0.tar.gz),并参照下表路径,获取新硬件所需的 DDK。

|No.| 新硬件名称 | DDK 路径 |
|---|---|---|
Expand Down