Skip to content

[ExecuTorch][Vulkan] Add et_vk.linear_dW kernel (dense fp32 weight-grad GEMM)#20939

Merged
meta-codesync[bot] merged 10 commits into
gh/JCNTH/78/basefrom
gh/JCNTH/78/head
Jul 21, 2026
Merged

[ExecuTorch][Vulkan] Add et_vk.linear_dW kernel (dense fp32 weight-grad GEMM)#20939
meta-codesync[bot] merged 10 commits into
gh/JCNTH/78/basefrom
gh/JCNTH/78/head

Conversation

@JCNTH

@JCNTH JCNTH commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Vulkan GLSL kernel + handler for the training custom op et_vk.linear_q4gsw_dw — a dense fp32 GEMM dW[N,K] = d_out^T @ x (contracts over M; NOT quantized despite the name). Mirrors impl/Matmul.cpp add_matmul_tiled_node structure + sizes_ubo for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
@exported-using-ghexport

Differential Revision: D111761779

Differential Revision: D111761779

[ghstack-poisoned]
@JCNTH
JCNTH requested a review from SS-JIA as a code owner July 14, 2026 21:49
@pytorch-bot pytorch-bot Bot added the module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/ label Jul 14, 2026
@pytorch-bot

pytorch-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit f463a79 with merge base 21554e5 (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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.

[ghstack-poisoned]
@meta-codesync
meta-codesync Bot merged commit 723533c into gh/JCNTH/78/base Jul 21, 2026
188 of 189 checks passed
@meta-codesync
meta-codesync Bot deleted the gh/JCNTH/78/head branch July 21, 2026 16:24
@meta-codesync
meta-codesync Bot temporarily deployed to cherry-pick-bot July 21, 2026 16:24 Inactive
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
JCNTH added a commit that referenced this pull request Jul 21, 2026
…ad GEMM)

Pull Request resolved: #20939

Vulkan GLSL kernel + handler for the training custom op `et_vk.linear_q4gsw_dw` — a dense fp32 GEMM `dW[N,K] = d_out^T @ x` (contracts over M; NOT quantized despite the name). Mirrors `impl/Matmul.cpp` `add_matmul_tiled_node` structure + `sizes_ubo` for dynamic shapes; the M-contraction tile math is transcribed from the golden-verified reference. AOT registration already exists under the shared Vulkan partitioner.
ghstack-source-id: 405026089
@exported-using-ghexport

Differential Revision: [D111761779](https://our.internmc.facebook.com/intern/diff/D111761779/)
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 module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants