Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes data mismatch and performance issues in the fused QK concat cache MLA kernel on ROCm 6.4.1, where ck_tile::bf16_t is represented as unsigned short causing type conversion problems.
Key changes:
- Introduces explicit float conversions for all RoPE (Rotary Position Embedding) rotation operations to ensure consistent numeric behavior across different type representations
- Replaces
buffer_o.template set_raw()calls withbuffer_o.template set()to address performance degradation in ROCm 6.4.1 - Updates copyright year to 2026
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Author
|
test more cases, for kernel fuse_qk_rope_concat_and_cache_mla_kernel_opt, buffer_o.template set_raw -> buffer_o.template set will cause about 8%-10% perfmance drop. But the performance of using set_raw interface in rocm6.4.1 is bad. This kernel is used for k=512 rope=64 and token>=256 head>=4. |
Contributor
Author
valarLip
approved these changes
Jan 12, 2026
zhuyuhua-v
pushed a commit
that referenced
this pull request
Jan 14, 2026
* fix fuse_qk_rope_concat_and_cache_mla in rocm-6.4.1 * update * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * update format * revert set interface change * use gmem in opus.h to replace ck_tile::buffer_view --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
valarLip
pushed a commit
that referenced
this pull request
Mar 18, 2026
* fix fuse_qk_rope_concat_and_cache_mla in rocm-6.4.1 * update * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * update format * revert set interface change * use gmem in opus.h to replace ck_tile::buffer_view --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
valarLip
pushed a commit
that referenced
this pull request
Mar 18, 2026
* fix fuse_qk_rope_concat_and_cache_mla in rocm-6.4.1 * update * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * update format * revert set interface change * use gmem in opus.h to replace ck_tile::buffer_view --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
report error when running in docker rocm6.4.1
Technical Details
I used set_raw replaced the set interface as i found it will cause 2 buffer_store_dwordx2 previously. This problem is fixed in Rocm7.x
Test Plan
python op_tests/test_concat_cache_mla.py -c fused_qk -hd 16 -k 512 -t 1 -kvd auto -qd auto
Test Result
Submission Checklist