Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloads libonnxruntime.so.1.17.3 from pyke cache, but tries to load 1.18.1 #234

Closed
zopieux opened this issue Jul 7, 2024 · 8 comments
Closed

Comments

@zopieux
Copy link

zopieux commented Jul 7, 2024

Hi,

# Cargo.toml
[dependencies]
ort = { version = "2.0.0-rc.3", features = ["cuda", "tensorrt"] }
// main.rs
    let session = Session::builder()?
        .with_execution_providers([CUDAExecutionProvider::default().build()])?
        .commit_from_file("test.onnx")?;
$ ls target/debug
libonnxruntime.so ⇒ ~/.cache/ort.pyke.io/dfbin/x86_64-unknown-linux-gnu/74F4EC918F00B6517BC71AA23DEA0E0809694D5FAB10A494A7AE571F06AEA0BD/onnxruntime/lib/libonnxruntime.so
libonnxruntime.so.1.17.3 ⇒ ~/.cache/ort.pyke.io/dfbin/x86_64-unknown-linux-gnu/74F4EC918F00B6517BC71AA23DEA0E0809694D5FAB10A494A7AE571F06AEA0BD/onnxruntime/lib/libonnxruntime.so
libonnxruntime_providers_cuda.so ⇒ ~/.cache/ort.pyke.io/dfbin/x86_64-unknown-linux-gnu/74F4EC918F00B6517BC71AA23DEA0E0809694D5FAB10A494A7AE571F06AEA0BD/onnxruntime/lib/libonnxruntime_providers_cuda.so
libonnxruntime_providers_shared.so ⇒ ~/.cache/ort.pyke.io/dfbin/x86_64-unknown-linux-gnu/74F4EC918F00B6517BC71AA23DEA0E0809694D5FAB10A494A7AE571F06AEA0BD/onnxruntime/lib/libonnxruntime_providers_shared.so
libonnxruntime_providers_tensorrt.so ⇒ ~/.cache/ort.pyke.io/dfbin/x86_64-unknown-linux-gnu/74F4EC918F00B6517BC71AA23DEA0E0809694D5FAB10A494A7AE571F06AEA0BD/onnxruntime/lib/libonnxruntime_providers_tensorrt.so

Note this is 1.17.3.

Running:

$ cargo run
target/debug/test: error while loading shared libraries: libonnxruntime.so.1.18.1: cannot open shared object file: No such file or directory

Which is expected. Am I holding this wrong? My understanding is that the download-binaries would download the correct version from the cache, but it doesn't. Changing to an older 2.0 rc doesn't help, 1.18.1 is also expected.

@isaac-mcfadyen
Copy link

Also having this issue - guessing it might be related to commit 8f8bbfb?

@zopieux
Copy link
Author

zopieux commented Jul 7, 2024

I think this goes deeper: the detection behavior to pick between CUDA 11 and 12 seems to be broken, because regardless of whether I build this in pytorch:2.3.1-cuda11 or pytorch:2.3.1-cuda12, libonnxruntime_providers_cuda.so expects libcublasLt.so.12.

@zopieux
Copy link
Author

zopieux commented Jul 7, 2024

Also having this issue - guessing it might be related to commit 8f8bbfb?

Hm, thanks. The thing I said above is specifically what is documented there and seemingly not happening: 8f8bbfb#diff-d2be1711b3546c95dd42f4622bd1e8a3c46f5e9975d7d36312fa194fe0449895R199

@isaac-mcfadyen
Copy link

isaac-mcfadyen commented Jul 7, 2024

I also just noticed

let versioned_dy = out_dir.join("libonnxruntime.so.1.17.3");
in build.rs... might be related?

EDIT: I can confirm that this is the issue. I pulled the repo locally and modified it to 1.18.1 and it now compiles and works fine.

@zopieux
Copy link
Author

zopieux commented Jul 7, 2024

Ah thanks, couldn't find where that damn version was even referenced. Looks like the issue is indeed in ort-sys.

@zopieux
Copy link
Author

zopieux commented Jul 7, 2024

Impressive turn-around time, just wanted to show some gratitude for that awesome lib. 🚀

@decahedron1
Copy link
Member

Fixed in v2.0.0-rc.4 - cc @isaac-mcfadyen

@isaac-mcfadyen
Copy link

Fixed in v2.0.0-rc.4 - cc @isaac-mcfadyen

Amazing, thank you so much for the quick fix! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants