代码拉取完成,页面将自动刷新
同步操作将从 PaddlePaddle/FastDeploy 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
FastDeploy当前在CPU支持后端引擎如下
后端 | 平台 | 支持模型格式 | 说明 |
---|---|---|---|
Paddle Inference | Windows(x64) Linux(x64) |
Paddle | 编译开关ENABLE_PADDLE_BACKEND 为ON或OFF控制, 默认OFF |
ONNX Runtime | Windows(x64) Linux(x64/aarch64) Mac(x86/arm64) |
Paddle/ONNX | 编译开关ENABLE_ORT_BACKEND 为ON或OFF控制,默认OFF |
OpenVINO | Windows(x64) Linux(x64) Mac(x86) |
Paddle/ONNX | 编译开关ENABLE_OPENVINO_BACKEND 为ON或OFF控制,默认OFF |
Linux上编译需满足
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy
mkdir build && cd build
cmake .. -DENABLE_ORT_BACKEND=ON \
-DENABLE_PADDLE_BACKEND=ON \
-DENABLE_OPENVINO_BACKEND=ON \
-DCMAKE_INSTALL_PREFIX=${PWD}/compiled_fastdeploy_sdk \
-DENABLE_VISION=ON \
-DENABLE_TEXT=ON
make -j12
make install
Windows编译需要满足条件
在Windows菜单中,找到x64 Native Tools Command Prompt for VS 2019
打开,执行如下命令
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy
mkdir build && cd build
cmake .. -G "Visual Studio 16 2019" -A x64 ^
-DENABLE_ORT_BACKEND=ON ^
-DENABLE_PADDLE_BACKEND=ON ^
-DENABLE_OPENVINO_BACKEND=ON ^
-DENABLE_VISION=ON ^
-DENABLE_TEXT=ON ^
-DCMAKE_INSTALL_PREFIX="D:\Paddle\compiled_fastdeploy" ^
msbuild fastdeploy.sln /m /p:Configuration=Release /p:Platform=x64
msbuild INSTALL.vcxproj /m /p:Configuration=Release /p:Platform=x64
编译完成后,即在CMAKE_INSTALL_PREFIX
指定的目录下生成C++推理库
如您使用CMake GUI可参考文档Windows使用CMakeGUI + Visual Studio 2019 IDE编译
编译过程同样需要满足
Python打包依赖wheel
,编译前请先执行pip install wheel
所有编译选项通过环境变量导入
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy/python
export ENABLE_ORT_BACKEND=ON
export ENABLE_PADDLE_BACKEND=ON
export ENABLE_OPENVINO_BACKEND=ON
export ENABLE_VISION=ON
export ENABLE_TEXT=ON
python setup.py build
python setup.py bdist_wheel
编译过程同样需要满足
在Windows菜单中,找到x64 Native Tools Command Prompt for VS 2019
打开,执行如下命令
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy/python
set ENABLE_ORT_BACKEND=ON
set ENABLE_PADDLE_BACKEND=ON
set ENABLE_OPENVINO_BACKEND=ON
set ENABLE_VISION=ON
set ENABLE_TEXT=ON
python setup.py build
python setup.py bdist_wheel
编译完成即会在FastDeploy/python/dist
目录下生成编译后的wheel
包,直接pip install即可
编译过程中,如若修改编译参数,为避免带来缓存影响,可删除FastDeploy/python
目录下的build
和.setuptools-cmake-build
两个子目录后再重新编译
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。