Skip to content

Commit

Permalink
[Doc]Rknn docs (PaddlePaddle#1376)
Browse files Browse the repository at this point in the history
* 按照要求更新

* update rknn docs
  • Loading branch information
Zheng-Bicheng authored Feb 20, 2023
1 parent dc5b4be commit 9593c15
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions docs/cn/faq/rknpu2/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ FastDeploy当前在RK平台上支持后端引擎如下:

## 编译FastDeploy SDK

针对RK356X和RK3588的性能差异,我们提供了两种编译FastDeploy的方式。

### 板端编译FastDeploy C++ SDK

RKNPU2暂时仅支持linux系统, 以下教程在RK3568(debian 10)、RK3588(debian 11) 环境下完成。
针对RK3588,其CPU性能较强,板端编译的速度还是可以接受的,我们推荐在板端上进行编译。以下教程在RK356X(debian10),RK3588(debian 11) 环境下完成。

```bash
git clone https://github.com/PaddlePaddle/FastDeploy.git
Expand All @@ -33,6 +35,9 @@ make install
```

### 交叉编译FastDeploy C++ SDK

针对RK356X,其CPU性能较弱,我们推荐使用交叉编译进行编译。以下教程在Ubuntu 22.04环境下完成。

```bash
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy
Expand All @@ -54,9 +59,11 @@ make -j8
make install
```

如果你找不到编译工具,你可以复制[交叉编译工具](https://bj.bcebos.com/paddle2onnx/libs/gcc-linaro-6.3.1-2017.zip)进行下载。

### 板端编译Python SDK

RKNPU2暂时仅支持linux系统, 以下教程在RK3568(debian 10)、RK3588(debian 11) 环境下完成。Python打包依赖`wheel`,编译前请先执行`pip install wheel`
Python SDK的编译暂时仅支持板端编译, 以下教程在RK3568(debian 10)、RK3588(debian 11) 环境下完成。Python打包依赖`wheel`,编译前请先执行`pip install wheel`

```bash
git clone https://github.com/PaddlePaddle/FastDeploy.git
Expand All @@ -69,8 +76,15 @@ cd python
export ENABLE_ORT_BACKEND=ON
export ENABLE_RKNPU2_BACKEND=ON
export ENABLE_VISION=ON

# 请根据你的开发版的不同,选择RK3588和RK356X
export RKNN2_TARGET_SOC=RK3588

# 如果你的核心板的运行内存大于等于8G,我们建议您执行以下命令进行编译。
python3 setup.py build
# 值得注意的是,如果你的核心板的运行内存小于8G,我们建议您执行以下命令进行编译。
python3 setup.py build -j1

python3 setup.py bdist_wheel
cd dist
pip3 install fastdeploy_python-0.0.0-cp39-cp39-linux_aarch64.whl
Expand Down

0 comments on commit 9593c15

Please sign in to comment.