Closed Chiranmb closed 1 month ago
Is this due to Visual Studio? Do I need to build from source?
Yes, the default binaries are compiled with Visual Studio 2022 and thus must be linked with Visual Studio 2022.
You'll have to compile ONNX Runtime for Visual Studio 2019: https://onnxruntime.ai/docs/build/inferencing.html#windows
& instructions for linking ort
to a custom build of ONNX Runtime: https://ort.pyke.io/setup/linking
Hello, thanks for your reply. If its not too much trouble, could you give me some advise on the following?
From the ort documentation page on linking (https://ort.pyke.io/setup/platforms) it shows that Windows x86-64 is "Supported. Dynamic & static binaries provided by pyke." with the disclaimer that "A recent version of Windows 10/11 & Visual Studio 2022 are required for pyke binaries."
I am on windows 10, on a x86-64 device, and I have Visual Studio 2022 installed.
The page also states that "Almost no setup will be required to get ort up and running." if my device is one of those marked with the green circle.
However, if I simply add ort as part of my dependencies
[dependencies]
ort = "2.0.0-rc.4"
I get the linking error again.
Although I am currently in the midst of compiling ONNX runtime for windows from the microsoft github and going to try to do the linking later, it seems strange that the website says that almost no setup is necessary for my device.
My follow up question:
I have a Rust app built in Tauri that uses ORT. My end users are on Windows. We can assume they will be on x86-64 devices. Do I then need to perform this linking for all my end users? Preferably having the dependency as part of the Cargo.toml
would suffice as per the ORT platform support page.
Thank you very much for your assistance.
I get the linking error again.
How recent is your VS2022 install? >=17.10 is required.
I have a Rust app built in Tauri that uses ORT. My end users are on Windows. We can assume they will be on x86-64 devices. Do I then need to perform this linking for all my end users? Preferably having the dependency as part of the
Cargo.toml
would suffice as per the ORT platform support page.
If by end users you mean users receiving compiled binaries (not building from source), no. If you use dynamic linking (which, by default, is only the case if you've enabled the CUDA/TensorRT EP features), some additional configuration may be required on your end, but your users won't have to do anything.
I am on windows machine:
I am able to run other rust code fine. When i try to load onnx model using ort, I get very large error message:
Is this due to Visual Studio? Do I need to build from source?
This is my Rust code for reference:
Any help is much appreciated, thank you very much
EDIT: I have tried the suggested solution from here but to no avail. My other Rust repos works fine, only this ORT one has some problem.