[compile] fuse rope and cache insertion for mla#38646
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces fusion for MLA (Multi-Head Latent Attention) RoPE and KV cache updates. It adds a new custom operator fused_rope_and_unified_mla_kv_cache_update, implements a pattern matcher for this fusion, and updates the RopeKVCacheFusionPass to handle MLA layers and FlashInfer chains. Additionally, platform checks for KV cache fusion were broadened from ROCm-only to all CUDA-like platforms. Feedback was provided regarding the consistency of the return value when the KV cache is empty.
bfb3a37 to
ed16288
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54bfeb5f6c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Hi @ZJY0516, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
|
This pull request has merge conflicts that must be resolved before it can be |
Purpose
add a compilation pass for rope and cache insertion in mla
Test Plan
Test Result
TODO
perf test
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.