How to allocate an OrtValue
array directly on GPU (to emulate low-memory conditions)
#24363
Unanswered
vadimkantorov
asked this question in
API Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I assume something like this would work:
onnxruntime.OrtValue.ortvalue_from_numpy(np.zeros((40_000_000_000, ), 'uint8'), device_type='cuda', device_id=0)
But is it possible to bypass the
np.zeros
/np.empty
and directly allocate a GPU tensor using ORT-only API (without resorting totorch
/cupy
/cuda_driver
)?Beta Was this translation helpful? Give feedback.
All reactions