-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix a memleak in RunAsync python #17326
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.
This version of Run where the output values need to be released is not documented in the header. I looked at the header file and it wasn't evident to me if fetches
need to be released. Let's take this opportunity to document the 2 newly introduced Run functions.
Documented both c/cxx API accordingly. |
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.
When I said documentation in my previous comment, I was referring to inference_session.h file. See this. None of these newly introduced functions are documented. It's not clear if the user needs to release any parameters or not.
Also, to keep life simple, is it possible to use vector<unique_ptr<OrtValue>>
in AsyncResource?
- It won't work
Because the "run" API we are calling requires an array of OrtValues* (could be null) as outputs, when "run" API returns, the array will be filled with allocated OrtValue*, a vector of unique_ptr does not fit in.
Release ort value outputs that are created and released from ort::run(...). --------- Co-authored-by: Randy Shuai <rashuai@microsoft.com>
Release ort value outputs that are created and released from ort::run(...). --------- Co-authored-by: Randy Shuai <rashuai@microsoft.com>
Release ort value outputs that are created and released from ort::run(...).