前言:作者在做深度学习模型部署过程中,遇到一些算子问题,需要在ONNX Runtime平台上实现一些自定义算子,在此过程中,onnxruntime官方给的现成的库缺少一些必要文件,遂需要下载onnxruntime源码并进行编译。
一、环境说明
windows 10
cuda V11.5
cudnn 8.8.0
cmake 3.24.3(试过其他版本,均无法编译顺利完成)Index of /files/v3.24 (cmake.org)
visual studio 2019
python 3.9(电脑需要有python环境,编译本质上是运行的build.py)
onnxruntime 1.11.1
二、编译流程
# 打开git bash
git clone -b rel-1.11.1 --recursive https://github.com/Microsoft/onnxruntime
cd onnxruntime
git submodule update --init --recursive
# 管理员打开vs的工具x64 Native Tools Command Prompt for VS 2019
d:
cd onnxruntime
执行脚本编译
.\build.bat --build_shared_lib --parallel --use_cuda --cuda_version 11.4 -

最低0.47元/天 解锁文章
1668

被折叠的 条评论
为什么被折叠?



