-
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
[WebGPU] Support PIX Capture for WebGPU EP #23192
base: main
Are you sure you want to change the base?
Conversation
PIX Capture tool requires 'present' to end a frame capture. ORT doesn't have rendering work so no 'present' happens. To avoid endless waiting for PIX capture tool, this PR added a blank surface and 'present' on it in each session run. The surface is created in WebGPU ep constructor and closed in WebGPU ep destructor.
@microsoft-github-policy-service agree [company="Microsoft"] |
@microsoft-github-policy-service agree |
@fs-eire Please take another look, thanks! |
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.
Copilot reviewed 1 out of 9 changed files in this pull request and generated no comments.
Files not reviewed (8)
- cmake/CMakeLists.txt: Language not supported
- cmake/external/onnxruntime_external_deps.cmake: Language not supported
- onnxruntime/core/providers/webgpu/webgpu_context.cc: Language not supported
- onnxruntime/core/providers/webgpu/webgpu_context.h: Language not supported
- onnxruntime/core/providers/webgpu/webgpu_execution_provider.cc: Language not supported
- onnxruntime/core/providers/webgpu/webgpu_execution_provider.h: Language not supported
- onnxruntime/core/providers/webgpu/webgpu_provider_factory.cc: Language not supported
- onnxruntime/core/providers/webgpu/webgpu_provider_options.h: Language not supported
lint is not happy |
@guschmue Ok, I thought it was bots error when I see |
Turns out the lintrunner doesn't work correctly because it cannot find clang-format.exe(Maybe due to I have a depot_tools? The error message seems related). However, after I fixed it locally, the lintrunner works. |
@@ -69,6 +71,8 @@ class WebGpuExecutionProvider : public IExecutionProvider { | |||
bool IsGraphCaptured(int graph_annotation_id) const override; | |||
Status ReplayGraph(int graph_annotation_id) override; | |||
|
|||
bool IsPIXCaptureEnabled() const { return enable_pix_capture_; } |
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.
seems unnecessary getter. the only usage is in OnRunEnd() and it's totally OK to just use enable_pix_capture_ there.
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.
Move this one from webgpu ep to webgpu context so that we could check pix enable in onRunEnd to call GeneratePixFrame.
PIX Capture tool requires 'present' to end a frame capture. ORT doesn't have rendering work so no 'present' happens.
To avoid endless waiting for PIX capture tool, this PR added a blank surface and 'present' on it in each session run.
The surface is created in WebGPU ep constructor and closed in WebGPU ep destructor.
Description
Motivation and Context