Files
FastDeploy/docs/en/faq/rknpu2/build.md
Hu Chuqi e2de3f36d3 [Doc] Add English version of some documents (#1221)
* Update README_CN.md

* Create README.md

* Update README.md

* Create README_CN.md

* Update README.md

* Update README_CN.md

* Update README_CN.md

* Create README.md

* Update README.md

* Update README_CN.md

* Create README.md

* Update README.md

* Update README_CN.md

* Rename examples/vision/faceid/insightface/rknpu2/cpp/README.md to examples/vision/faceid/insightface/rknpu2/README_EN.md

* Rename README_CN.md to README.md

* Rename README.md to README_EN.md

* Rename README.md to README_CN.md

* Rename README_EN.md to README.md

* Create build.md

* Create environment.md

* Create issues.md

* Update build.md

* Update environment.md

* Update issues.md

* Update build.md

* Update environment.md

* Update issues.md
2023-02-06 11:11:00 +08:00

2.7 KiB

English | 中文

FastDeploy RKNPU2 Engine Compilation

FastDeploy supported backends

FastDeploy currently supports the following backends on the RK platform:

Backend Platform Supported model formats Notes
ONNX Runtime RK356X
RK3588
ONNX Compile switch ENABLE_ORT_BACKEND is controlled by ON or OFF. Default OFF
RKNPU2 RK356X
RK3588
RKNN Compile switch ENABLE_RKNPU2_BACKEND is controlled by ON or OFF. Default OFF

Compile FastDeploy SDK

Compile FastDeploy C++ SDK on board side

Currently, RKNPU2 is only available on linux. The following tutorial is completed on RK3568(debian 10) and RK3588(debian 11).

git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy

# If you are using the develop branch, type the following command 
git checkout develop

mkdir build && cd build
cmake ..  -DENABLE_ORT_BACKEND=ON \
	      -DENABLE_RKNPU2_BACKEND=ON \
	      -DENABLE_VISION=ON \
	      -DRKNN2_TARGET_SOC=RK3588 \
          -DCMAKE_INSTALL_PREFIX=${PWD}/fastdeploy-0.0.0
make -j8
make install

Cross-compile FastDeploy C++ SDK

git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy

# If you are using the develop branch, type the following command 
git checkout develop

mkdir build && cd build
cmake ..  -DCMAKE_C_COMPILER=/home/zbc/opt/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc \
          -DCMAKE_CXX_COMPILER=/home/zbc/opt/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++ \
          -DCMAKE_TOOLCHAIN_FILE=./../cmake/toolchain.cmake \
          -DTARGET_ABI=arm64 \
          -DENABLE_ORT_BACKEND=OFF \
	      -DENABLE_RKNPU2_BACKEND=ON \
	      -DENABLE_VISION=ON \
	      -DRKNN2_TARGET_SOC=RK3588 \
	      -DENABLE_FLYCV=ON \
          -DCMAKE_INSTALL_PREFIX=${PWD}/fastdeploy-0.0.0
make -j8
make install

Compile the Python SDK on the board

Currently, RKNPU2 is only available on linux. The following tutorial is completed on RK3568(debian 10) and RK3588(debian 11). Packing Python is dependent on wheel, so run pip install wheel before compiling.

git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy

# If you are using the develop branch, type the following command 
git checkout develop

cd python
export ENABLE_ORT_BACKEND=ON
export ENABLE_RKNPU2_BACKEND=ON
export ENABLE_VISION=ON
export RKNN2_TARGET_SOC=RK3588
python3 setup.py build
python3 setup.py bdist_wheel
cd dist
pip3 install fastdeploy_python-0.0.0-cp39-cp39-linux_aarch64.whl