Support __dlpack__
for OrtValues
#22061
Labels
api
issues related to all other APIs: C, C++, Python, etc.
__dlpack__
for OrtValues
#22061
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 calltorch.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
The text was updated successfully, but these errors were encountered: