[ExecuTorch][WebGPU] Add bitwise_or + logical_or ops (bool)#21230
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21230
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 46 New Failures, 3 Unrelated FailuresAs of commit f11e583 with merge base 266e0dc ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
psiddh
left a comment
There was a problem hiding this comment.
Approving full WebGPU stack
Stack from ghstack (oldest at bottom):
Add
aten.bitwise_or.Tensor+aten.logical_or.defaultto the WebGPU backend — the OR counterpart to the existingbitwise_and/logical_andfamily, closing the last bool-binary parity gap with Vulkan. Both overloads share one handler (logical_or_op); on canonical 0/1 bool bytes the word-wise|over the packedu32buffer equals a per-byte OR. Kernel-only: the Vulkan partitioner already tags both ops (op_registry.pyregister_bool_binary_ops), so no partitioner change.Key changes:
runtime/ops/logical_or/—logical_or.wgsl(t_out = t_a | t_b, bool packed 4/word) +LogicalOr.cpp(one handler; bool-only +numel % 4guards + dynamic-shape resize hook; registers both overloads). Mirrorslogical_and.test/ops/test_logical_or.py+op_tests/cases.py— delegation smoke + op-test golden for both ops (two ~50% masks -> OR ~75% True, which distinguishes OR from an AND mutant).CMakeLists.txt— wirelogical_or/LogicalOr.cpp.Co-authored-with: Claude Code.
Differential Revision: D112483463