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
I am aware that I can create and register an allocator to the active environment so that my session does not create it's own allocator, but rather uses the already attached allocator.
After registering with the above code I should be able to reuse this allocator with multiple sessions (Note: How would I go about doing this with C++ API ? I am not able to find any docs on this)
My problem is I would like to use this allocator to allocate tensors before loading an ONNX file. As far as I can tell there is no option to do this right ?
To reproduce
Usage of the C++ API.
Urgency
No response
Platform
Windows
OS Version
Winows and Linux
ONNX Runtime Installation
Built from Source
ONNX Runtime Version or Commit ID
1.17
ONNX Runtime API
C++
Architecture
X64
Execution Provider
Default CPU, CUDA, TensorRT
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered:
There is no explicit API to get cuda allocator from Env. Current allocator API is associated with session.
You can take a look at OrtValue or Ort::Value, which need not associate with session, and it can be used to create tensor. Then you can bind the tensors with inputs/outputs of one or mutliple sessions.
Describe the issue
I am aware that I can create and register an allocator to the active environment so that my session does not create it's own allocator, but rather uses the already attached allocator.
After registering with the above code I should be able to reuse this allocator with multiple sessions (Note: How would I go about doing this with C++ API ? I am not able to find any docs on this)
My problem is I would like to use this allocator to allocate tensors before loading an ONNX file. As far as I can tell there is no option to do this right ?
To reproduce
Usage of the C++ API.
Urgency
No response
Platform
Windows
OS Version
Winows and Linux
ONNX Runtime Installation
Built from Source
ONNX Runtime Version or Commit ID
1.17
ONNX Runtime API
C++
Architecture
X64
Execution Provider
Default CPU, CUDA, TensorRT
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: