-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[WebGPU EP] Add environment variable to dump shader code to a file, move shader key validation to nightly build #28674
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
Open
edgchen1
wants to merge
7
commits into
main
Choose a base branch
from
edgchen1/webgpu_ep_dump_shader_code
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+118
−18
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
cddcdb1
add env var to dump shader code to file
edgchen1 51fc1dd
update ci build to dump shaders to file
edgchen1 2beda33
fix ProgramManager::Build call
edgchen1 fa0cf84
make verbose logging the default behavior if shader_dump_fn_ is not set
edgchen1 adbee93
add webgpu nightly pipeline
edgchen1 69bf55b
revert changes to windows_webgpu.yml
edgchen1 be0836f
testing - add push trigger to nightly pipeline
edgchen1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| name: Nightly ONNX Runtime WebGPU Builds | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 9 * * *' # Daily at 09:00 UTC | ||
| workflow_dispatch: | ||
| # TODO remove the `push` trigger - only for testing | ||
| push: | ||
| branches: | ||
| - edgchen1/webgpu_ep_dump_shader_code | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| webgpu_shader_key_validation: | ||
| runs-on: [ | ||
| "self-hosted", | ||
| "1ES.Pool=onnxruntime-github-Win2022-GPU-A10", | ||
| "JobId=webgpu_shader_validation-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" | ||
| ] | ||
| timeout-minutes: 90 | ||
| env: | ||
| ALLOW_RELEASED_ONNX_OPSET_ONLY: "0" | ||
| ONNXRUNTIME_TEST_GPU_DEVICE_ID: "0" | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| submodules: none | ||
|
|
||
| - name: Setup Python 3.12 | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.12" | ||
| architecture: x64 | ||
|
|
||
| - name: Locate vcvarsall and Setup Env | ||
| uses: ./.github/actions/locate-vcvarsall-and-setup-env | ||
| with: | ||
| architecture: x64 | ||
|
|
||
| - name: Install python modules | ||
| run: python -m pip install -r tools\ci_build\github\windows\python\requirements.txt | ||
| shell: cmd | ||
| working-directory: ${{ github.workspace }} | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: "20.x" | ||
|
|
||
| - name: Build and Test | ||
| shell: pwsh | ||
| run: | | ||
| $env:ORT_WEBGPU_EP_SHADER_DUMP_FILE = "${{ github.workspace }}\RelWithDebInfo\RelWithDebInfo\shader_dump.log" | ||
|
|
||
| python.exe ${{ github.workspace }}\tools\ci_build\build.py ` | ||
| --config RelWithDebInfo ` | ||
| --build_dir ${{ github.workspace }} ` | ||
| --use_binskim_compliant_compile_flags ` | ||
| --cmake_generator "Visual Studio 17 2022" ` | ||
| --build_shared_lib ` | ||
| --use_webgpu ` | ||
| --wgsl_template static ` | ||
| --cmake_extra_defines onnxruntime_BUILD_DAWN_SHARED_LIBRARY=ON ` | ||
| --update ` | ||
| --build --parallel ` | ||
| --test | ||
|
|
||
| - name: Check log file | ||
| shell: cmd | ||
| run: | | ||
| dir ${{ github.workspace }}\RelWithDebInfo\RelWithDebInfo\shader_dump.log | ||
|
|
||
| - name: Validate shader keys | ||
| uses: ./.github/actions/webgpu-validate-shader-key | ||
| with: | ||
| log_file_path: ${{ github.workspace }}\RelWithDebInfo\RelWithDebInfo\shader_dump.log | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
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.
TODO remove this