Repository navigation
Lower static FP32 matmul to existing matrix kernels - #24454
JakeStevens wants to merge 1 commit into
Conversation
Summary: ## Ulterior Motive Unblock matrix multiplication in native Swin and Swin V2 execution. ## Rationale **What**: Lower supported static FP32 `matmul` operations to existing `mm` and `bmm` kernels. **Why**: The CPU execution plan has kernels for those operations but cannot select a kernel for the generic `matmul` nodes in these graphs. ## Details - Rewrite rank-two matrices and matched rank-three batches directly to `mm` or `bmm`. - For higher-rank or broadcasted batches, copy the expanded operands, flatten batch dimensions, run `bmm`, and restore the original output shape and value ID. - Validate operand types, contraction, broadcasting and output metadata; reject vector and empty-matrix cases explicitly. - Allocate the executable's buffer slots after lowering has added intermediate values. - Leave alias functionalization and its view-to-copy mappings unchanged. Authored with AI using Metamate on agentcloud. Differential Revision: D129095332
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24454
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 2 Unclassified FailuresAs of commit 975a85b with merge base 822cb60 ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@JakeStevens has exported this pull request. If you are a Meta employee, you can view the originating Diff in D129095332. |
This PR needs a
|
Summary:
Ulterior Motive
Unblock matrix multiplication in native Swin and Swin V2 execution.
Rationale
What: Lower supported static FP32
matmuloperations to existingmmandbmmkernels.Why: The CPU execution plan has kernels for those operations but cannot select a kernel for the generic
matmulnodes in these graphs.Details
mmorbmm.bmm, and restore the original output shape and value ID.Authored with AI using Metamate on agentcloud.
Differential Revision: D129095332