tenglike1997/onnxruntime-projects

Cannot find Ordinal 8 when running ort_test.exe

Closed this issue · 5 comments

Thanks for your sharing of this repo!
I've tried to build onnxruntime for GPU for several days, so far I can only build successfully with the support for GPU,
if I try to build with TensorRT and (DNNL and MKLML), the build cannot be finished,
(whith command
build.bat --config Release --parallel --build_shared_lib --build_csharp --use_cuda --cuda_version 10.0 --cuda_home "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0" --cudnn_home "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0" --use_tensorrt --tensorrt_home "D:\Coco\Libs\TensorRT-7.0.0.11" --use_dnnl --cmake_generator "Visual Studio 15 2017" )
so I try to use your project instead.
However, after some setting of library's linkage has been done,
the .exe file cannot run as expected, and it looks like this.
I've search online for this issue, most of the answer told me to update Visual Studio C++ Redistributable Package,
but that didn't work...
So I want to make sure that is there any difference between our running environment?
Here's some related info of my env:

  • OS: Windows 10 1903
  • IDE/Compiler: Visual Studio 2017 15.9.25
  • CUDA/ cuDNN: 10.0/ 7.6.5
  • TensorRT: 7.0.011

總之我是想確認我們的建置跟運行環境有沒有一致
因為這些資訊好像沒有提到(雖然之前有人問#1 但沒回覆0.0)
如果針對onnxruntime的建置您有其他建議也麻煩跟我說一聲
會打英文是想說至少不懂中文的人也能看得懂
看您想回答中文或英文都行~
期待您的回覆,謝謝!

不好意思,现在才看到。似乎官方build.md里面,写的现版本的tensorrt运行配置是cuda10.2,会不会是这个原因?https://github.com/microsoft/onnxruntime/blob/master/BUILD.md#tensorrt 我也有一段时间没配置了,才疏学浅,不过你可以尝试一下

不會不會~
感謝您的回覆!
我有嘗試過要建置cuda10.2的onnxruntime但沒成功...
不過我的疑問是
為什麼都用了您目錄提供的onnx相關檔案還是沒辦法執行(?)
(在Visual Studio內能編譯過)
是因為我沒有onnxruntime的dll嗎?
如果是這樣的話
方便提供您使用的onnxruntime的dll嗎?
再跟您說聲謝謝 ^^
.
No problem. Thanks for your reply!
I've tried to build onnxruntime with CUDA10.2 but I failed...
My question is, why the program can't run with the files in your repo?
(Because the build is success in Visual Studio)
Is that because I didn't have the onnxruntime's dll?
If so, could you provide your onnxruntime.dll file?
Thanks again! ^^

不會不會~
感謝您的回覆!
我有嘗試過要建置cuda10.2的onnxruntime但沒成功...
不過我的疑問是
為什麼都用了您目錄提供的onnx相關檔案還是沒辦法執行(?)
(在Visual Studio內能編譯過)
是因為我沒有onnxruntime的dll嗎?
如果是這樣的話
方便提供您使用的onnxruntime的dll嗎?
再跟您說聲謝謝 ^^
.
No problem. Thanks for your reply!
I've tried to build onnxruntime with CUDA10.2 but I failed...
My question is, why the program can't run with the files in your repo?
(Because the build is success in Visual Studio)
Is that because I didn't have the onnxruntime's dll?
If so, could you provide your onnxruntime.dll file?
Thanks again! ^^

我的onnx模型文件应该没什么问题,但是代码已经是onnxruntime前面的版本的了,然后我的比较新的版本的代码在onnxruntime-projects/Windows/new_version/onnx_ssd/ort_test/ort_test.cpp这里,是一个用SSD.onnx的推理代码(C++风格),可能其他的代码在现在更新的onnxruntime中不能适用。但是如果您能够把我旧代码的C风格的函数换成C++风格的函数(如OrtSession换成Ort::Session,即函数都在onnxruntime_cxx_api.h)应该是一样可以运行的。然后我这里也没有最新版本的编译的出来的onnxruntime.dll,而且这个在windows平台应该也是需要的……不过你应该可以尝试从官方的release中下载https://github.com/microsoft/onnxruntime/releases
希望可以帮到您!

好的我再試試,謝謝您!

Hi,

Just an update about this issue,
I've successfully built a onnxruntime with trt support.
(I also ask here for help)
while running the code, I met a similar issue again,
and found a solution here
It seems like it's the issue with different version of dll use for onnxruntime,
so try to copy all the new-built dlls under the program you're going to run may solve the issue.

Thanks again! ^^