Skip to content

[TRITON] Add Positional Encoding (PE) support to Triton MHA kernels#1203

Merged
vgokhale merged 65 commits into355_wipfrom
cagri/bruno_changes
Oct 16, 2025
Merged

[TRITON] Add Positional Encoding (PE) support to Triton MHA kernels#1203
vgokhale merged 65 commits into355_wipfrom
cagri/bruno_changes

Conversation

@cagrikymk
Copy link
Copy Markdown
Contributor

This PR replicates the PR to the main for the WIP branch to be used in vllm

Reference PR for more information: #1184

azaidy and others added 30 commits October 14, 2025 19:16
The tests are working fine with an older Triton compiler (from Aug-13,
commit a9d79a6f3be95ddfa1ac4097470477eb3c71a151).
…nels

Targeting only `mha_onekernel_bwd` implementation for now.
* fix `do` shape in test
* fix unbound local variable in kernel
Please uncomment `@pytest.mark.skip` to run PE tests.
It seems `@triton.jit`ed functions can't return `None`.
BLOCK_M2   128 => 32
num_warps    4 =>  8
num_stages   1 =>  3
This reverts commit 68d8e6f23c2ee902d711271ac2d51990955d78e5.
This reverts commit 67cc3cac81caea66ee7bab4ce1a445ac9f25dc29.
@vgokhale vgokhale merged commit caae7a6 into 355_wip Oct 16, 2025
2 of 5 checks passed
@vgokhale vgokhale deleted the cagri/bruno_changes branch October 16, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants