[ExecuTorch][WebGPU] Use requiredFeatures instance API on native + emscripten Dawn#20652
[ExecuTorch][WebGPU] Use requiredFeatures instance API on native + emscripten Dawn#20652JulianCloudNTH wants to merge 3 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20652
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 71fde51 with merge base 73c259e ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
SS-JIA
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
…scripten Dawn Pull Request resolved: #20652 **Key the `timedWaitAny` instance setup to the actual Dawn API instead of `__EMSCRIPTEN__`, so native-rig Dawn and emscripten/emdawnwebgpu use the modern `requiredFeatures` path and only the vendored Dawn uses the legacy `capabilities.*` path.** The instance-descriptor setup was guarded by `#if defined(__EMSCRIPTEN__)`, which routed emscripten (emdawnwebgpu, emcc 4.0.19+) through the legacy `capabilities.*` API that no longer exists there. The guard now keys off the API actually present. Key changes: - `WebGPUDevice.cpp` — `#if defined(__EMSCRIPTEN__)` → `#if defined(WEBGPU_DAWN_INSTANCE_CAPABILITIES)`. The legacy `instance_desc.capabilities.*` path is taken only by the buck-vendored Dawn (which defines the macro); native cmake Dawn and emscripten leave it undefined and take the `requiredFeatures` / `WGPUInstanceFeatureName_TimedWaitAny` path. Co-authored-with: Claude Code. ghstack-source-id: 398665683 @exported-using-ghexport Differential Revision: [D110149678](https://our.internmc.facebook.com/intern/diff/D110149678/)
…scripten Dawn Pull Request resolved: #20652 **Key the `timedWaitAny` instance setup to the actual Dawn API instead of `__EMSCRIPTEN__`, so native-rig Dawn and emscripten/emdawnwebgpu use the modern `requiredFeatures` path and only the vendored Dawn uses the legacy `capabilities.*` path.** The instance-descriptor setup was guarded by `#if defined(__EMSCRIPTEN__)`, which routed emscripten (emdawnwebgpu, emcc 4.0.19+) through the legacy `capabilities.*` API that no longer exists there. The guard now keys off the API actually present. Key changes: - `WebGPUDevice.cpp` — `#if defined(__EMSCRIPTEN__)` → `#if defined(WEBGPU_DAWN_INSTANCE_CAPABILITIES)`. The legacy `instance_desc.capabilities.*` path is taken only by the buck-vendored Dawn (which defines the macro); native cmake Dawn and emscripten leave it undefined and take the `requiredFeatures` / `WGPUInstanceFeatureName_TimedWaitAny` path. Co-authored-with: Claude Code. ghstack-source-id: 398665683 @exported-using-ghexport Differential Revision: [D110149678](https://our.internmc.facebook.com/intern/diff/D110149678/)
Stack from ghstack (oldest at bottom):
Key the
timedWaitAnyinstance setup to the actual Dawn API instead of__EMSCRIPTEN__, so native-rig Dawn and emscripten/emdawnwebgpu use the modernrequiredFeaturespath and only the vendored Dawn uses the legacycapabilities.*path.The instance-descriptor setup was guarded by
#if defined(__EMSCRIPTEN__), which routed emscripten (emdawnwebgpu, emcc 4.0.19+) through the legacycapabilities.*API that no longer exists there. The guard now keys off the API actually present.Key changes:
WebGPUDevice.cpp—#if defined(__EMSCRIPTEN__)→#if defined(WEBGPU_DAWN_INSTANCE_CAPABILITIES). The legacyinstance_desc.capabilities.*path is taken only by the buck-vendored Dawn (which defines the macro); native cmake Dawn and emscripten leave it undefined and take therequiredFeatures/WGPUInstanceFeatureName_TimedWaitAnypath.Co-authored-with: Claude Code.
@exported-using-ghexport
Differential Revision: D110149678
Differential Revision: D110149678