[深度学习][onnxruntime]onnxruntime在windows10编译

测试环境:

windows10

cuda11.1.1

cudnn8.2.0

tensorrt8.2.3.0

VS2019

onnxruntime==1.12.1

cmake==3.24.3

编译流程:

git clone  --recursive https://github.com/Microsoft/onnxruntime

打开:x64 Native Tools Command Prompt for VS 2019

cd /d [youronnxrumtimepath]

.\build.bat  --build_shared_lib --parallel --use_cuda --cuda_version 11.1 --cuda_home "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1" --cudnn_home "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1"  --build_csharp --use_tensorrt --tensorrt_home "D:\lufiles\TensorRT-8.2.3.0" --cmake_generator "Visual Studio 16 2019" --skip_tests --config Release

特别注意:

(1)不要用VS2022编译,要用VS2019

   (2)cmake版本不能过高,cmake==3.27.7编译会出现MSB3271 ml64.exe错误,需要cmake==3.24.3或者低一点也行。

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

FL1623863129

你的打赏是我写文章最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值