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

What if I am not using pyo3==0.18.3? #867

Closed
nleroy917 opened this issue Apr 18, 2024 · 4 comments
Closed

What if I am not using pyo3==0.18.3? #867

nleroy917 opened this issue Apr 18, 2024 · 4 comments

Comments

@nleroy917
Copy link

Hello!

Thank you so much for all the work here! I have a quick question about the extension module.. pyo3-tch. My use case is that I just want to return Python-native torch tensors from a pyo3-built python package/library.

I tried adding pyo3-tch="0.15.0" to my Cargo.toml, but that conflicts a lot with my requirement for pyo3 which I have pinned to 0.21.0 for another crate rust-numpy.

I'm wondering if you have advice here? I'm pretty new to Rust, still learning a lot and getting my bearings so any help is super appreciated!

@LaurentMazare
Copy link
Owner

Ah that's a good point, I just made #868 to update to pyo3 0.21 and it seems to work all well based on some simple testing.
I won't do a specific release on crates.io for this as pytorch 2.3 is only a couple days away and the PR to support it in tch-rs is already done, so once this is out I'll release version 0.16 for all the crates which will include this pyo3 update.

@nleroy917
Copy link
Author

Hey, thanks so much! Not that I anticipate it occurring soon, but wondering what happens if I need to bump my pyo3 in the future?

@LaurentMazare
Copy link
Owner

We don't have a good story for supporting all combinations of pyo3 and tch. One point to note is that pyo3-tch is really small so you can just embed a copy of it in your code if you need some tweaks like this.

@nleroy917
Copy link
Author

Gotcha! Thanks so much for the insight.

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

2 participants