Skip to content

Add an aten.mul.Scalar kernel (#25026) - #25026

Open
psiddh wants to merge 1 commit into
pytorch:mainfrom
psiddh:export-D129036504
Open

psiddh wants to merge 1 commit into
pytorch:mainfrom
psiddh:export-D129036504

Conversation

@psiddh

@psiddh psiddh commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

The WebGPU partitioner delegated aten.mul.Scalar (from the Vulkan op registry), but the WebGPU runtime had no kernel, so programs with SDPA's math decomposition failed to load.
This adds a one-dispatch fp32 mul.Scalar with a resize hook, and the partitioner keeps non-fp32 mul.Scalar on CPU.
Use case: unmodified Hugging Face ESM-2 and BERT-style models (SDPA without a fused kernel), including dynamic sequence length.

Reviewed By: SS-JIA

Differential Revision: D129036504

Copilot AI balanced review requested due to automatic review settings November 13, 2026 06:32
@pytorch-bot

pytorch-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 82 Cancelled Jobs

As of commit 620a852 with merge base 0b776dd (image):

CANCELLED JOBS - The following jobs were cancelled. Please retry:

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

@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 Nov 13, 2026
@meta-codesync

meta-codesync Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@psiddh has exported this pull request. If you are a Meta employee, you can view the originating Diff in D129036504.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@SS-JIA SS-JIA 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.

Review automatically exported from Phabricator review in Meta.

@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.

Summary:
Pull Request resolved: pytorch#25026

The WebGPU partitioner delegated aten.mul.Scalar (from the Vulkan op registry), but the WebGPU runtime had no kernel, so programs with SDPA's math decomposition failed to load.
This adds a one-dispatch fp32 mul.Scalar with a resize hook, and the partitioner keeps non-fp32 mul.Scalar on CPU.
Use case: unmodified Hugging Face ESM-2 and BERT-style models (SDPA without a fused kernel), including dynamic sequence length.

Reviewed By: SS-JIA

Differential Revision: D129036504
@meta-codesync meta-codesync Bot changed the title Add an aten.mul.Scalar kernel Add an aten.mul.Scalar kernel (#25026) Nov 13, 2026

This branch has not been deployed

No deployments
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.

3 participants