[ExecuTorch][WebGPU] Port pow.Tensor_Scalar#21162
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21162
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: ❌ 6 New Failures, 1 Unrelated FailureAs of commit 0761783 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
pow.Tensor_Scalar(tensor ^ scalar-exponent) on the shared unary helper: the exponent rides theminuniform slot, exactly likeleaky_relu's slope.output[idx] = pow(input[idx], exponent).Key changes:
runtime/ops/unary/pow_scalar.wgsl(+ generated_wgsl.h) —pow(input[idx], params.minimum).runtime/ops/unary/Activations.cpp—pow_scalar_impl(args[in, exponent, out]; exponent read via the sharedget_val_or_infinto the min slot), registeredaten.pow.Tensor_Scalar. Inherits the shared helper's fp32 int-guard + resize hook (the exponent is re-applied on resize).Note: WGSL
powreturns NaN for a negative base at any exponent (matching the reference GPUpow); the suite uses a positive base.Differential Revision: D112257604