You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ONNX Runtime doesn't provide APIs for that. You can grab the pointer to the data with Tensor::data_ptr_mut, cast it to a more concrete data type (in the case of CUDA, this would be a CUDA buffer) and write the data that way.
Yeah I'm actually try to use I/O binding, but couldn't find an example that actually binds input/output.
It's a bit unclear how to use the I/O binding API correctly to reduce copies between CPU & GPU.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently
Tensor::from_array
allocates the value on CPU, is there an equivalent method to allocate the value on GPU device directly?Beta Was this translation helpful? Give feedback.
All reactions