Repository navigation
[NPU] Support Kimi-K3 DCP with shared compact communication #40825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
qybnb
wants to merge
34
commits into
sgl-project:main
Choose a base branch
from
qybnb:feature/kimi-k3-npu-dcp-reuse
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,059
−160
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
ea41a99
[NPU] Support Kimi-K3 decode context parallelism
qybnb 16f8c1c
[NPU] Add a group-local HCCL buffer for DCP
qybnb 49d0647
fix(ci): address NPU DCP lint failures
qybnb 0fcf4d7
refactor(npu): isolate Kimi-K3 DCP metadata
qybnb 4cc040a
refactor(npu): use standard HCCL buffer for DCP
qybnb 5051451
perf(npu): compact Kimi-K3 DCP state exchange
qybnb 72de60d
refactor(npu): reuse shared DCP metadata and graph buffers
qybnb 6c8b249
docs: keep local DCP notes out of the PR
invalid-email-address 0003011
fix(npu): restore slice-based DCP prefix metadata
qybnb 8e8d8a5
refactor(npu): remove redundant DCP pool sharding flag
qybnb 57f995f
refactor(npu): preserve original MLA KV split ordering
qybnb 8a43e00
refactor(npu): preserve MLA KV read index dtype
qybnb 7ab7d9c
refactor(npu): use scalar dummy for DCP write remapping
qybnb 724c787
refactor(npu): reuse shared Triton DCP KV writer
qybnb 58060ec
refactor(npu): simplify DCP FIA metadata and graph padding
qybnb ac5ebfe
merge: integrate main into Kimi-K3 NPU DCP
qybnb 2d965e1
test(npu): align DCP kernel test with CI taxonomy
qybnb 70fc82f
refactor(npu): keep MLA KV reads in native cache dtype
qybnb 02068ed
fix(dcp): tolerate full-attn backends without dcp_use_packed_kv
qybnb 7b2b108
merge: integrate latest main with Kimi-K3 NPU DCP
qybnb b49fc9c
refactor(npu): isolate dense MLA DCP metadata from DSA
qybnb cbb7cfb
fix(npu): allow K3 DCP startup and exclude CUDA output gate JIT
qybnb 0224a7b
chore: remove NPU DCP regression test changes from PR
qybnb ee4d5bf
refactor(npu): keep upstream DSA metadata logic inline
qybnb 840a35f
refactor(npu): simplify dense MLA DCP predicates
qybnb cbc00ae
Merge branch 'main' into feature/kimi-k3-npu-dcp-reuse
qybnb 1670159
test(npu): cover page and token DCP retraction layouts
qybnb 3e6b38e
refactor(npu): clarify DCP routing and explicit MLA cache writes
qybnb 73031a7
refactor(npu): restore existing MLA cache-write ownership
qybnb 9531c10
Merge branch 'main' into feature/kimi-k3-npu-dcp-reuse
qybnb 677eabe
test(npu): sync graph runner mocks with current runtime APIs
qybnb 45e5b7e
Merge main and reconcile NPU graph test mocks
qybnb 6f40e5f
Merge main and preserve NPU DCP write-index ownership
qybnb 096434d
refactor(dcp): restore upstream LSE merge behavior
qybnb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
防止 NPU 误调用 CUDA 专用的 MLA output gate 融合算子。
原来通过以下条件判断能否使用 CUDA 算子:
x.is_cuda and gate.is_cuda
但当前 NPU 环境加载的 transfer_to_npu 兼容层会把 Tensor.is_cuda 映射成 Tensor.is_npu。所以 NPU 张量也可能通过这个判断,然后尝试调用 nvcc 编译 CUDA,导致启动报错。
参考pr36406