[ExecuTorch][WebGPU] Port minimum (first A2 binary op)#21158
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21158
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: ❌ 7 New Failures, 1 Unrelated FailureAs of commit fc20ccc with merge base 266e0dc ( NEW FAILURES - The following jobs have failed:
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):
Ports the Vulkan delegate's
minimumwith NumPy broadcasting:out = min(in1, in2), mirroring the siblingmulop + Vulkanbinary_op_buffer(3 per-tensorTensorMetauniforms; size-1 input dims clamped and the flat output index relinearized; equal-shape fast path).Key changes:
runtime/ops/minimum/{BinaryOp.cpp, binary_minimum.wgsl}(+ generated_wgsl.h) —minimum_impl(args[in1, in2, out]); broadcastTensorMetapath + dual-operand resize hook (mirrorsmul); fail-loud int guard (the fp32-only backend would otherwise reinterpret int bits as f32).CMakeLists.txt—runtime/ops/minimum/BinaryOp.cppinWEBGPU_SRCS.Note: WGSL
minandtorch.minimumdiffer on NaN, matching the Vulkan reference; the golden uses finite inputs.Differential Revision: D112257607