[Bugfix] fix npu get kv_item_lens in PD separation when use ASCEND_US…#15852
Merged
iforgetmyname merged 3 commits intosgl-project:mainfrom Mar 23, 2026
Merged
[Bugfix] fix npu get kv_item_lens in PD separation when use ASCEND_US…#15852iforgetmyname merged 3 commits intosgl-project:mainfrom
iforgetmyname merged 3 commits intosgl-project:mainfrom
Conversation
…E_FIA Co-authored-by: ZhengdQin <zhengdqin@gmail.com>
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Collaborator
|
/tag-and-rerun-ci |
Talantan1102
pushed a commit
to randgun/sglang
that referenced
this pull request
Mar 13, 2026
iforgetmyname
approved these changes
Mar 20, 2026
Collaborator
|
this pr only affects npu and npu ci have all passed |
0-693
pushed a commit
to 0-693/sglang
that referenced
this pull request
Mar 25, 2026
sgl-project#15852) Co-authored-by: ZhengdQin <zhengdqin@gmail.com>
JustinTong0323
pushed a commit
to JustinTong0323/sglang
that referenced
this pull request
Apr 7, 2026
sgl-project#15852) Co-authored-by: ZhengdQin <zhengdqin@gmail.com>
yhyang201
pushed a commit
to yhyang201/sglang
that referenced
this pull request
Apr 22, 2026
sgl-project#15852) Co-authored-by: ZhengdQin <zhengdqin@gmail.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
Original
k_buffershape is(layer_num, size // page_size + 1, page_size, head_num, head_dim),when enable
ASCEND_USE_FIAk_buffershape is(layer_num, (size // page_size + 1) * page_size, 1, head_num, head_dim).The element size of
self.get_key_buffer(i)[0]indef get_contiguous_buf_infos():original is
page_size * head_num * head_dim,when enable
ASCEND_USE_FIAis1 * head_num * head_dim.So when enable
ASCEND_USE_FIA, The calculation of kv_item_lens requires the addition of* page_size.Modifications
Fix kv_item_lens for FIA, in order to compute data size in PD transfer cases.
Accuracy Tests
Benchmarking and Profiling
Checklist