-
Notifications
You must be signed in to change notification settings - Fork 120
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
allow setting runtime handles #997
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guschmue
reviewed
Oct 18, 2024
Lgtm. |
fs-eire
changed the title
[WIP] allow setting runtime handles
allow setting runtime handles
Oct 19, 2024
RyanUnderhill
requested changes
Oct 19, 2024
fs-eire
commented
Oct 21, 2024
fs-eire
commented
Oct 21, 2024
fs-eire
commented
Oct 21, 2024
close this. replaced by #1002 |
fs-eire
added a commit
that referenced
this pull request
Oct 24, 2024
This PR is an alternative way of #997 to implement allowing users to set runtime handles. The basic idea is to create a JSON string representing the `Config` class from the `RuntimeSettings`, and the `Config` class will merge them. Currently this PR is not working because of the following: - The existing JSON parser does not support multiple entries in `provider_options` The following JSON will fail to parse. ```json { "model": { "decoder": { "session_options": { "provider_options": [ { "webgpu": { } }, { "dml": {} } ] }, }, }, } ``` - When trying to specify JSON overlay, two "webgpu" items does not merge. genai_config.json: ```json { "model": { "decoder": { "session_options": { "provider_options": [ { "webgpu": { "abc": "123" } } ] }, }, }, } ``` generated overlay config: ``` { "model": { "decoder": { "session_options": { "provider_options": [ { "webgpu": { "dawnProcTable": "12345678" } } ] } } } } ``` Result: ![image](https://github.com/user-attachments/assets/adf649bd-8d7b-4b2e-a8f8-6141d04eb7ee) This PR depends on a code change to the Config class to support the expected parsing behaviors. --------- Co-authored-by: Ryan Hill <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sometimes we need to set runtime data (which cannot be written in a config file) into ORT's session options. This change introduces this RuntimeSettings type, together with internal implementation and C-API, C++-API.