onnxruntime
89b01b40 - [WebGPU] Scale Dawn pipeline compilation workers with CPU count (#29820)

Commit
82 days ago
[WebGPU] Scale Dawn pipeline compilation workers with CPU count (#29820) ### Description - Update bundled Dawn to tag [`v20260817.213942`](https://github.com/google/dawn/releases/tag/v20260817.213942) (`0b66dc1aa0102b0147962820d372bd2eb3a329b4`). The tag contains the worker-pool API commit [`c3cf2a7`](https://github.com/google/dawn/commit/c3cf2a706bfd4ed7d341a27985e8dfc1a58d9728) plus 76 subsequent Dawn commits. - Add an ORT-specific `dawn::platform::Platform` for the default native bundled-Dawn instance. Its `CreateWorkerTaskPool()` override uses Dawn's default implementation with `max(2, std::thread::hardware_concurrency() / 2)` workers. - Keep the platform alive for the process lifetime because Dawn retains a non-owning pointer. - Link `dawn_platform` for both static and shared bundled-Dawn builds because the custom platform and public worker-pool factory are implemented by that library. - WebAssembly builds, external Dawn builds, and user-provided WebGPU instances keep their existing behavior. ### Motivation and Context Dawn's default worker task pool is limited to two threads. Models with many independent WebGPU pipelines can therefore bottleneck during asynchronous pipeline creation. Scaling the existing Dawn pool to half of the host's logical processors allows more pipeline compilations to proceed in parallel and reduces WebGPU initialization and first-run latency without consuming every CPU thread. The minimum of two also preserves Dawn's current capacity when `hardware_concurrency()` is small or returns zero. The required Dawn API landed upstream in [Allow configuring the default worker task pool](https://dawn-review.googlesource.com/c/dawn/+/330555). This PR consumes it from the subsequent tagged Dawn snapshot; no ORT-local Dawn patch is needed. ### Testing - Built the `onnxruntime` target on Windows RelWithDebInfo with `onnxruntime_BUILD_DAWN_SHARED_LIBRARY=ON`, bundled Dawn, and the WebGPU EP enabled. - The configuration links the ORT custom platform against `dawn_platform` in both static- and shared-Dawn branches. --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Author
Parents
Loading