New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offering the option to use an existing wgpu device and queue in session initialisation #123
Comments
Have you considered the risk of conflict between several concurrent pipelines? To return the result of inference, we need to change and maintain the Have you tried the alternatives with several |
One long-term feature I'd like to see is having wonnx expose its input |
Honestly, I'm not sure. My plan is to integrate it into a Bevy application, which uses wgpu behind the scenes, and I figured I'd need to crowbar it in somehow. I'll see if I can give it a shot at some point and see how it works out.
This would also be very nice to have, for similar reasons. For example - one of the applications I have in mind is using ResNet/CLIP/similar to automatically classify models by rendering them to a texture and then running inference on the texture. Avoiding the unnecessary CPU copy would be superb. |
So, defining the input as a I think that the general consensus would be to limit I am personally all in for a minimal |
Is your feature request related to a problem? Please describe.
Currently, the API for creating wonnx
Session
s requests the device and queue for you, and does not let you pass in your own. I'm looking at using wonnx as part of an existing wgpu context, and would like to reuse the resources I already have initialised.Describe the solution you'd like
I'd like variants of the
Session
constructors, or a minor rearrangement of the API, so that users can pass in existing device and queue instances.Describe alternatives you've considered
Trying to instantiate the session anyway. I'm not entirely sure what would happen if you request the device twice, and it may end up using the wrong device if the host application has explicitly chosen another device to run wgpu operations on.
Additional context
I am also not sure if this is a supported use-case to begin with (embedding wonnx into an existing wgpu application). Are there any potential issues with doing so?
The text was updated successfully, but these errors were encountered: