-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[EP ABI] Add API RegisterExecutionProviderLibraryWithOptions #26906
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6608,6 +6608,24 @@ struct OrtApi { | |
| * \since Version 1.24 | ||
| */ | ||
| ORT_API2_STATUS(KernelInfo_GetConfigEntries, _In_ const OrtKernelInfo* info, _Outptr_ OrtKeyValuePairs** out); | ||
|
|
||
| /** \brief Register an execution provider library with ORT. The provided options are passed to | ||
| * OrtEpFactory::SetEnvironmentOptions after factory creation. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's good to document how the options are passed through. maybe also mention when it would be useful to specify such options. |
||
| * | ||
| * The library must export 'CreateEpFactories' and 'ReleaseEpFactory' functions. | ||
| * See OrtEpApi for more details. | ||
| * | ||
| * \param[in] env The OrtEnv instance to register the library in. | ||
| * \param[in] registration_name The name to register the execution provider library under. | ||
| * \param[in] path The path to the execution provider library. | ||
| * \param[in] options Map of options to pass to each OrtEpFactory via OrtEpFactory::SetEnvironmentOptions. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe mention that this parameter is optional. |
||
| * | ||
| * \snippet{doc} snippets.dox OrtStatus Return Value | ||
| * | ||
| * \since Version 1.24. | ||
adrianlizarraga marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| */ | ||
| ORT_API2_STATUS(RegisterExecutionProviderLibraryWithOptions, _In_ OrtEnv* env, _In_ const char* registration_name, | ||
| _In_ const ORTCHAR_T* path, _In_opt_ const OrtKeyValuePairs* options); | ||
| }; | ||
|
|
||
| /* | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1199,8 +1199,14 @@ struct Env : detail::Base<OrtEnv> { | |
| void ReleaseSharedAllocator(const OrtEpDevice* ep_device, | ||
| OrtDeviceMemoryType mem_type); ///< Wraps OrtApi::ReleaseSharedAllocator | ||
|
|
||
| Env& RegisterExecutionProviderLibrary(const char* registration_name, const std::basic_string<ORTCHAR_T>& path); ///< Wraps OrtApi::RegisterExecutionProviderLibrary | ||
| Env& UnregisterExecutionProviderLibrary(const char* registration_name); ///< Wraps OrtApi::UnregisterExecutionProviderLibrary | ||
| ///< Wraps OrtApi::RegisterExecutionProviderLibrary | ||
| Env& RegisterExecutionProviderLibrary(const char* registration_name, const std::basic_string<ORTCHAR_T>& path); | ||
|
|
||
| ///< Wraps OrtApi::RegisterExecutionProviderLibraryWithOptions | ||
| Env& RegisterExecutionProviderLibraryWithOptions(const char* registration_name, const std::basic_string<ORTCHAR_T>& path, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. one thing that bothered me before is how would it be possible to make them consistent? I guess an argument could be made for making it consistently inconsistent too though... |
||
| const OrtKeyValuePairs* options); | ||
|
|
||
| Env& UnregisterExecutionProviderLibrary(const char* registration_name); ///< Wraps OrtApi::UnregisterExecutionProviderLibrary | ||
|
|
||
| std::vector<ConstEpDevice> GetEpDevices() const; | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.