Files
FastDeploy/docs/compile
DefTruth 584ba3de68 [win] Add fastdeploy_init.bat and update docs (#320)
* [cmake] support Android arm64-v8a & armeabi-v7a native c++ sdk

* [cmake] fixed patchelf download on mac and android

* [lite] Add threads and power_mode option support

* [pybind] update runtime pybind for lite power mode

* [python] Add set_lite_power_mode api to runtime

* [Lite] add lite enable_fp16 option support

* [lite] add more options for lite backend.

* [cmake] fixed Paddle Lite typo

* [runtime] format LitePowerMode enum comments

* [runtime] format lite option comments

* [win] Add fastdeploy_init.bat and update docs

* [win] Add fastdeploy_init.bat and update docs
2022-10-06 15:57:18 +08:00
..
2022-09-21 20:05:19 +08:00

FastDeploy编译

本文档说明编译C++预测库、Python预测库两种编译过程根据编译的平台参考如下文档

其中编译过程中,各平台上编译选项如下表所示

选项 作用 备注
ENABLE_ORT_BACKEND 启用ONNXRuntime推理后端默认ON 默认支持CPU开启WITH_GPU后同时支持GPU
ENABLE_PADDLE_BACKEND 启用Paddle Inference推理后端默认OFF 默认支持CPU开启WITH_GPU后同时支持GPU
ENABLE_OPENVINO_BACKEND 启用OpenVINO推理后端默认OFF 仅支持 CPU
ENABLE_TRT_BACKEND 启用TensorRT推理后端默认OFF 仅支持GPU
WITH_GPU 是否开启GPU使用默认OFF 当设为TRUE编译后将支持Nvidia GPU部署
CUDA_DIRECTORY 指定编译时的CUDA路径默认为/usr/local/cuda CUDA 11.2及以上
TRT_DIRECTORY 当启用TensorRT推理后端时需通过此参数指定TensorRT路径 TensorRT 8.4及以上
ENABLE_VISION 启用视觉模型模块默认为ON
ENABLE_TEXT 启用文本模型模块默认为ON
OPENCV_DIRECTORY 指定已安装OpenCV库的路径默认为空 若没指定OpenCV库路径则会自动下载安装OpenCV
ORT_DIRECTORY 指定已安装ONNXRuntime库的路径默认为空 若没指定ONNXRuntime库路径则会自动下载安装ONNXRuntime

FastDeploy支持在编译时用户选择自己的后端进行编译, 目前已经支持Paddle Inference、ONNXRuntime、TensorRT(加载ONNX格式)。FastDeploy已支持的模型已完成在不同后端上的验证工作会自动根据编译时支持的后端进行选择如若无可用后端则会给出相应提示(如YOLOv7目前仅支持ONNXRuntime/TensorRT后端如若编译时未开启这两个后端则推理时会提示无可用后端)。