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
According to this WinML documentation, the NuGet WinML solution conveniently provides "Direct access to the onnxruntime.dll".
However, all ONNXRuntime functionality requires creation of an Ort::Env environment instance as its first order of business, which apparently can only be created once per process.
So, for example, if I have WinML inference tasks running in thread A, I am unable to, say, lookup ONNX input/output tensor names/dimension through the ONNXRuntime API in thread B—or vice versa— given that I'm neither able to reference WinML's internal Ort::Env (or can I?), nor can I pass my own Ort::Env instance to WinML constructors (or can I?). Attempting to use separate instances anyway results in the following error—either thrown by WinML or my side, depending simply on which side creates their instance first:
Only one instance of LoggingManager created with InstanceType::Default can exist at any point in time.
One solution would be for WinML to provide a way to get/set this instance. Another would be for ONNXRuntime to loosen the one-per-process restriction in some way. (For now I can work around this issue by spawning separate processes for ONNX lookup from thread B, but obviously that's rather ugly and inefficient.)
The text was updated successfully, but these errors were encountered:
According to this WinML documentation, the NuGet WinML solution conveniently provides "Direct access to the onnxruntime.dll".
However, all ONNXRuntime functionality requires creation of an
Ort::Env
environment instance as its first order of business, which apparently can only be created once per process.So, for example, if I have WinML inference tasks running in thread A, I am unable to, say, lookup ONNX input/output tensor names/dimension through the ONNXRuntime API in thread B—or vice versa— given that I'm neither able to reference WinML's internal
Ort::Env
(or can I?), nor can I pass my ownOrt::Env
instance to WinML constructors (or can I?). Attempting to use separate instances anyway results in the following error—either thrown by WinML or my side, depending simply on which side creates their instance first:Only one instance of LoggingManager created with InstanceType::Default can exist at any point in time.
One solution would be for WinML to provide a way to get/set this instance. Another would be for ONNXRuntime to loosen the one-per-process restriction in some way. (For now I can work around this issue by spawning separate processes for ONNX lookup from thread B, but obviously that's rather ugly and inefficient.)
The text was updated successfully, but these errors were encountered: