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

Support __dlpack__ for OrtValues #22061

Open
justinchuby opened this issue Sep 11, 2024 · 0 comments
Open

Support __dlpack__ for OrtValues #22061

justinchuby opened this issue Sep 11, 2024 · 0 comments
Labels
api issues related to all other APIs: C, C++, Python, etc.

Comments

@justinchuby
Copy link
Contributor

justinchuby commented Sep 11, 2024

When users get the ort values and do stuff to them, what the experience will be: Currently they will call .numpy() and ortvalue_from_numpy() and some io binding if the tensor is on cuda. With __dlpack__ users can simply call torch.from_dlpack(ort_value) to get the cuda tensor in pytorch (and similar methods in other frameworks). No io binding setups needed.

Related: #15963

cc @yuslepukhin

@justinchuby justinchuby added the api issues related to all other APIs: C, C++, Python, etc. label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api issues related to all other APIs: C, C++, Python, etc.
Projects
None yet
Development

No branches or pull requests

1 participant