Skip to content

[ExecuTorch][WebGPU] Port pow (aten.pow.Tensor_Tensor)#21160

Merged
meta-codesync[bot] merged 2 commits into
gh/JCNTH/120/basefrom
gh/JCNTH/120/head
Jul 24, 2026
Merged

[ExecuTorch][WebGPU] Port pow (aten.pow.Tensor_Tensor)#21160
meta-codesync[bot] merged 2 commits into
gh/JCNTH/120/basefrom
gh/JCNTH/120/head

Conversation

@JCNTH

@JCNTH JCNTH commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Ports pow.Tensor_Tensor with NumPy broadcasting, mirroring the sibling mul op + Vulkan binary_op_buffer (per-tensor TensorMeta uniforms; size-1 input dims clamped and the flat output index relinearized; equal-shape fast path).

Key changes:

  • runtime/ops/pow/{BinaryOp.cpp, binary_pow.wgsl} (+ generated _wgsl.h) — pow_impl (args [in1, in2, out]); broadcast TensorMeta path + dual-operand resize hook; fail-loud int guard (fp32-only backend).

Note: WGSL pow(x, y) is undefined for x < 0, exact parity with the Vulkan GLSL pow.

Co-authored-with: Claude Code.
@exported-using-ghexport

Differential Revision: D112257673

Differential Revision: D112257673

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21160

Note: Links to docs will display an error until the docs builds have been completed.

❌ 46 New Failures, 2 Unrelated Failures

As of commit be9b673 with merge base 4a26c64 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

  • pull / unittest / windows / windows-job (gh) (matched win rule in flaky-rules.json)
    Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under 'C:\actions-runner\_work\executorch\executorch\test-infra\.github\actions\teardown-windows'. Did you forget to run actions/checkout before running your local action?
  • pull / unittest-editable / windows / windows-job (gh) (matched win rule in flaky-rules.json)
    Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under 'C:\actions-runner\_work\executorch\executorch\test-infra\.github\actions\teardown-windows'. Did you forget to run actions/checkout before running your local action?

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 22, 2026
This was referenced Jul 22, 2026

@psiddh psiddh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving full WebGPU stack

[ghstack-poisoned]
@meta-codesync
meta-codesync Bot merged commit b3e5b01 into gh/JCNTH/120/base Jul 24, 2026
141 of 192 checks passed
@meta-codesync
meta-codesync Bot deleted the gh/JCNTH/120/head branch July 24, 2026 07:05
@meta-codesync
meta-codesync Bot temporarily deployed to cherry-pick-bot July 24, 2026 07:05 Inactive
JCNTH added a commit that referenced this pull request Jul 24, 2026
Pull Request resolved: #21160

Ports `pow.Tensor_Tensor` with NumPy broadcasting, mirroring the sibling `mul` op + Vulkan `binary_op_buffer` (per-tensor `TensorMeta` uniforms; size-1 input dims clamped and the flat output index relinearized; equal-shape fast path).

Key changes:
- `runtime/ops/pow/{BinaryOp.cpp, binary_pow.wgsl}` (+ generated `_wgsl.h`) — `pow_impl` (args `[in1, in2, out]`); broadcast `TensorMeta` path + dual-operand resize hook; fail-loud int guard (fp32-only backend).

Note: WGSL `pow(x, y)` is undefined for `x < 0`, exact parity with the Vulkan GLSL `pow`.

Co-authored-with: Claude Code.
ghstack-source-id: 406360857
@exported-using-ghexport

Differential Revision: [D112257673](https://our.internmc.facebook.com/intern/diff/D112257673/)
JCNTH added a commit that referenced this pull request Jul 24, 2026
Pull Request resolved: #21160

Ports `pow.Tensor_Tensor` with NumPy broadcasting, mirroring the sibling `mul` op + Vulkan `binary_op_buffer` (per-tensor `TensorMeta` uniforms; size-1 input dims clamped and the flat output index relinearized; equal-shape fast path).

Key changes:
- `runtime/ops/pow/{BinaryOp.cpp, binary_pow.wgsl}` (+ generated `_wgsl.h`) — `pow_impl` (args `[in1, in2, out]`); broadcast `TensorMeta` path + dual-operand resize hook; fail-loud int guard (fp32-only backend).

Note: WGSL `pow(x, y)` is undefined for `x < 0`, exact parity with the Vulkan GLSL `pow`.

Co-authored-with: Claude Code.
ghstack-source-id: 406360857
@exported-using-ghexport

Differential Revision: [D112257673](https://our.internmc.facebook.com/intern/diff/D112257673/)
JCNTH added a commit that referenced this pull request Jul 24, 2026
Pull Request resolved: #21160

Ports `pow.Tensor_Tensor` with NumPy broadcasting, mirroring the sibling `mul` op + Vulkan `binary_op_buffer` (per-tensor `TensorMeta` uniforms; size-1 input dims clamped and the flat output index relinearized; equal-shape fast path).

Key changes:
- `runtime/ops/pow/{BinaryOp.cpp, binary_pow.wgsl}` (+ generated `_wgsl.h`) — `pow_impl` (args `[in1, in2, out]`); broadcast `TensorMeta` path + dual-operand resize hook; fail-loud int guard (fp32-only backend).

Note: WGSL `pow(x, y)` is undefined for `x < 0`, exact parity with the Vulkan GLSL `pow`.

Co-authored-with: Claude Code.
ghstack-source-id: 406360857
@exported-using-ghexport

Differential Revision: [D112257673](https://our.internmc.facebook.com/intern/diff/D112257673/)
JCNTH added a commit that referenced this pull request Jul 24, 2026
Pull Request resolved: #21160

Ports `pow.Tensor_Tensor` with NumPy broadcasting, mirroring the sibling `mul` op + Vulkan `binary_op_buffer` (per-tensor `TensorMeta` uniforms; size-1 input dims clamped and the flat output index relinearized; equal-shape fast path).

Key changes:
- `runtime/ops/pow/{BinaryOp.cpp, binary_pow.wgsl}` (+ generated `_wgsl.h`) — `pow_impl` (args `[in1, in2, out]`); broadcast `TensorMeta` path + dual-operand resize hook; fail-loud int guard (fp32-only backend).

Note: WGSL `pow(x, y)` is undefined for `x < 0`, exact parity with the Vulkan GLSL `pow`.

Co-authored-with: Claude Code.
ghstack-source-id: 406360857
@exported-using-ghexport

Differential Revision: [D112257673](https://our.internmc.facebook.com/intern/diff/D112257673/)
JCNTH added a commit that referenced this pull request Jul 24, 2026
Pull Request resolved: #21160

Ports `pow.Tensor_Tensor` with NumPy broadcasting, mirroring the sibling `mul` op + Vulkan `binary_op_buffer` (per-tensor `TensorMeta` uniforms; size-1 input dims clamped and the flat output index relinearized; equal-shape fast path).

Key changes:
- `runtime/ops/pow/{BinaryOp.cpp, binary_pow.wgsl}` (+ generated `_wgsl.h`) — `pow_impl` (args `[in1, in2, out]`); broadcast `TensorMeta` path + dual-operand resize hook; fail-loud int guard (fp32-only backend).

Note: WGSL `pow(x, y)` is undefined for `x < 0`, exact parity with the Vulkan GLSL `pow`.

Co-authored-with: Claude Code.
ghstack-source-id: 406360857
@exported-using-ghexport

Differential Revision: [D112257673](https://our.internmc.facebook.com/intern/diff/D112257673/)
JCNTH added a commit that referenced this pull request Jul 24, 2026
Pull Request resolved: #21160

Ports `pow.Tensor_Tensor` with NumPy broadcasting, mirroring the sibling `mul` op + Vulkan `binary_op_buffer` (per-tensor `TensorMeta` uniforms; size-1 input dims clamped and the flat output index relinearized; equal-shape fast path).

Key changes:
- `runtime/ops/pow/{BinaryOp.cpp, binary_pow.wgsl}` (+ generated `_wgsl.h`) — `pow_impl` (args `[in1, in2, out]`); broadcast `TensorMeta` path + dual-operand resize hook; fail-loud int guard (fp32-only backend).

Note: WGSL `pow(x, y)` is undefined for `x < 0`, exact parity with the Vulkan GLSL `pow`.

Co-authored-with: Claude Code.
ghstack-source-id: 406360857
@exported-using-ghexport

Differential Revision: [D112257673](https://our.internmc.facebook.com/intern/diff/D112257673/)
JCNTH added a commit that referenced this pull request Jul 24, 2026
Pull Request resolved: #21160

Ports `pow.Tensor_Tensor` with NumPy broadcasting, mirroring the sibling `mul` op + Vulkan `binary_op_buffer` (per-tensor `TensorMeta` uniforms; size-1 input dims clamped and the flat output index relinearized; equal-shape fast path).

Key changes:
- `runtime/ops/pow/{BinaryOp.cpp, binary_pow.wgsl}` (+ generated `_wgsl.h`) — `pow_impl` (args `[in1, in2, out]`); broadcast `TensorMeta` path + dual-operand resize hook; fail-loud int guard (fp32-only backend).

Note: WGSL `pow(x, y)` is undefined for `x < 0`, exact parity with the Vulkan GLSL `pow`.

Co-authored-with: Claude Code.
ghstack-source-id: 406360857
@exported-using-ghexport

Differential Revision: [D112257673](https://our.internmc.facebook.com/intern/diff/D112257673/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants