-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Plugin EP API doc updates and misc fixes #26840
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
base: main
Are you sure you want to change the base?
Conversation
…c_and_misc_updates
| /** \brief The ONNX Runtime version the OrtNodeFusionOptions was compiled with. | ||
| * | ||
| * Implementation should set to ORT_API_VERSION. | ||
| * ORT will use this to ensure it does not use members that were not available when the EP library was compiled. | ||
| * | ||
| * \since Version 1.23. | ||
| */ | ||
| uint32_t ort_version_supported; |
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.
Why delete this info?
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.
was trying to make it consistent and I chose the more concise version. alternatively, I could add this info to the other ort_version_supported docs.
| * The created instance must be released with OrtEpApi::ReleaseEpDevice. | ||
| * | ||
| * \note When called from OrtEpFactory::GetSupportedDevices to populate the ep_devices output, ORT will take | ||
| * ownership of the OrtEpDevice instances. |
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 else would it be called? Wondering if the doco should be saying 'release if you don't provide to ORT in GetSupportedDevices'. Or maybe reverse the order of the two statements and remove the \note if we only expect usage in GetSupportedDevices.
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.
hm, the main point I'd like to convey is that CreateEpDevice's output must be released with ReleaseEpDevice.
it just so happens that OrtEpFactory::GetSupportedDevices is the primary place CreateEpDevice is expected to be called, and that ORT will take ownership of the OrtEpDevice on success.
|
|
||
| /** \brief Create an OrtHardwareDevice. | ||
| * | ||
| * The created instance must be released with OrtEpApi::ReleaseHardwareDevice. |
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.
If the OrtEpDevice using this is provided to ORT do we take a copy, or the user needs to keep this valid and not release until EP unload?
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.
AFAIK, we do not copy the OrtHardwareDevice. OrtEpDevice creation just copies the pointer. currently, the user would need to ensure that a created OrtHardwareDevice doesn't get released before OrtEpDevices are done using it.
Description
OrtAllocator.Motivation and Context
Documentation updates and clean up.