-
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
[WIP] WebGPU EP [skip ci] #21904
Closed
Closed
[WIP] WebGPU EP [skip ci] #21904
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
skottmckay
reviewed
Aug 30, 2024
Co-authored-by: Yulong Wang <[email protected]>
### Description This change allows to set EP option "forceCpuNodeNames" in which includes a list of node names that will always be running on CPU. Usage example: ```diff opt.executionProviders[0] = { name: "webgpu", validationMode: 'wgpuOnly', storageBufferCacheMode: 'bucket', + // force node "/model/embed_tokens/Gather" to be put on CPU + forceCpuNodeNames: "/model/embed_tokens/Gather" }; ```
### Description <!-- Describe your changes. --> ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
@fs-eire on this branch is it already possible to test in nodejs, compiling in my side? |
### Description
Yes. Just do build with flags |
The MacOS device on CI is an Apple Paravirtual device, which may not support TimestampQuery. In this PR, If TimestampQuery is not supported, a warning is printed to not block profiling cpu data.
### Description introduce this build flag --use_external_dawn to allow specifying Dawn as an external dependency. When it is specified, `dawn::native` is excluded from build of onnxruntime, and passing in dawn proc table is required. I didn't find a good way to run the test. Currently I need to build with the following flags: ```sh C:\code\onnxruntime>build --use_webgpu --use_external_dawn --skip_tests --target onnxruntime_webgpu_external_dawn_test ``` And run the test using: ```sh # run test that passing dawn proc table. expect session to initialize successfully C:\code\onnxruntime\build\Windows\Debug\Debug>onnxruntime_webgpu_external_dawn_test.exe # run test that does not pass proc table. expect exception to throw. C:\code\onnxruntime\build\Windows\Debug\Debug>onnxruntime_webgpu_external_dawn_test.exe --no_proc_table ```
Most part of this working branch is already merged into main, or in review. Close this draft. future PRs can target main branch directly. |
ishwar-raut1
pushed a commit
to ishwar-raut1/onnxruntime
that referenced
this pull request
Nov 19, 2024
This change introduces the WebGPU EP into ONNX Runtime. To make the PR as simple as possible, this PR excluded the following: - C API changes for WebGPU EP - actual implementation of WebGPU EP. Currently in this PR, WebGPU is a stub implementation that does not register any kernel. - Python IO Binding update - Node.js IO Binding update This PR now contains only 43 file changes (while the working branch contains 130+) and hopefully this makes it easier to review. There is going to be separated PRs for each mentioned above. Current working branch: microsoft#21904
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.
Description
For code review purpose only. Offer a place for discussion.
see also:
prerequisite:
related changes:
TODO items
Graph CaptureWebGPU resources tracking (mainly for buffers)Global hanlders( unhandled exceptions and device lost )