-
Notifications
You must be signed in to change notification settings - Fork 3k
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
RunAsync C/CXX API #16613
RunAsync C/CXX API #16613
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will users turn on this feature? By configuring num inter op threads? Should we've a session option to turn on async runs? Not all sessions require it and for those that don't creating an inter-op threadpool is waste of resources.
Reminder to add documentation.
Let's stick with intra op thread pool to avoid all those. |
Also, a reminder that the documentation should call out that the callback is going to be executed in one of the intra op threadpool threads. |
Is there a design document for this? In my book running async requires a huge number of changes. |
Would this be good enough?
|
I have to agree with you... My understanding is that, this PR is just a change to introduce the async API, which does not have a real "async" implementation. The major value of this PR is for reviewing the interface. The implementation does not work in ort-web anyway. |
No, it does not target ort-web, at least not for now. The target of the PR is to make RunAsync work for desktop and mobile for 1.16, specifically, run session in separate thread and invoke callback. For web cases, the API might migrate with a different behavior in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Implement RunAsync API - the session will run in a thread of intra-op thread pool.