Repository navigation
[XPU] Fix XPU CI breaks from #41105 (KDA chunk_offsets) and #42588 (int4 test tp_group) - #43334
Merged
mingfeima merged 3 commits intoOct 10, 2026
Merged
Conversation
sgl-project#41105 added a chunk_offsets argument to the generic chunk_gated_delta_rule_fwd_h and made chunk_kda_fwd pass it. On XPU, kda.py imports the XPU override from hardware_backend/xpu/kernels/fla, whose signature was not updated, so every chunk_kda call on XPU raises: TypeError: chunk_gated_delta_rule_fwd_h() got an unexpected keyword argument 'chunk_offsets' Mirror the generic change: accept chunk_offsets and only derive it via prepare_chunk_offsets when the caller does not pass one.
mingfeima
approved these changes
Oct 9, 2026
sgl-project#42588 made GPTQXPULinearKernel read tp_size from layer.tp_group instead of get_parallel(). The test still faked TP via get_parallel().override(), so the bare LinearBase fell back to tp_group=None (tp_size=1): - test_gptq_act_order_rejects_split_group_shard failed: the tp_size=2 subtest no longer got the "--tp-size 1" hint. - test_gptq_group_aligned_shard_allows_tensor_parallel kept passing but silently ran at TP=1 instead of TP=2. Set layer.tp_group to a stub with world_size=tp_size in both places and drop the now-unused get_parallel import.
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
#41105 added a
chunk_offsetsargument to the genericfla/chunk_delta_h.py::chunk_gated_delta_rule_fwd_hand madechunk_kda_fwdpasschunk_offsets=chunk_offsets. On XPU,kda.pyimports the XPU override instead:That override's signature was not updated, so every
chunk_kdacall on XPU fails:This breaks
test/registered/xpu/test_kda_track_state_xpu.pyonmain, and because the error isn't retried, the XPU suite stops there (16/38 files run): https://github.com/sgl-project/sglang/actions/runs/37893946145/job/113701033110#41105's own XPU job failed at "Checkout code" (infra), so this wasn't caught before merge.
Modifications
Mirror the generic change in the XPU
chunk_gated_delta_rule_fwd_h: acceptchunk_offsets, and only derive it withprepare_chunk_offsetswhen the caller doesn't pass one. Behaviour is unchanged whenchunk_offsetsisNone.Notes
Independent of #43306 (int4 dense test fix); both are needed for a green XPU suite on
main.cc @yuan-luo
CI States
Latest PR Test (Base): ✅ Run #37914967355
Latest PR Test (Extra): ❌ Run #37914966853
Latest PR Test (AMD ROCm 10): ❌ Run #37914967151