Skip to content

[XPU] Fix XPU CI breaks from #41105 (KDA chunk_offsets) and #42588 (int4 test tp_group) - #43334

Merged
mingfeima merged 3 commits into
sgl-project:mainfrom
arathi-hlab:fix/xpu-kda-chunk-offsets
Oct 10, 2026
Merged

mingfeima merged 3 commits into
sgl-project:mainfrom
arathi-hlab:fix/xpu-kda-chunk-offsets

Conversation

@arathi-hlab

@arathi-hlab arathi-hlab commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

#41105 added a chunk_offsets argument to the generic fla/chunk_delta_h.py::chunk_gated_delta_rule_fwd_h and made chunk_kda_fwd pass chunk_offsets=chunk_offsets. On XPU, kda.py imports the XPU override instead:

if is_intel:
    from sglang.srt.hardware_backend.xpu.kernels.fla.chunk_delta_h import chunk_gated_delta_rule_fwd_h

That override's signature was not updated, so every chunk_kda call on XPU fails:

File ".../sglang/kernels/ops/attention/fla/kda.py", line 1235, in chunk_kda_fwd
    h, v_new = chunk_gated_delta_rule_fwd_h(
TypeError: chunk_gated_delta_rule_fwd_h() got an unexpected keyword argument 'chunk_offsets'

This breaks test/registered/xpu/test_kda_track_state_xpu.py on main, 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: accept chunk_offsets, and only derive it with prepare_chunk_offsets when the caller doesn't pass one. Behaviour is unchanged when chunk_offsets is None.

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

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.
@arathi-hlab arathi-hlab added the run-ci CI: run the baseline test suite on this PR label 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.
@arathi-hlab arathi-hlab changed the title [XPU] Accept chunk_offsets in the XPU chunk_gated_delta_rule_fwd_h [XPU] Fix XPU CI breaks from #41105 (KDA chunk_offsets) and #42588 (int4 test tp_group) Oct 9, 2026
@mingfeima
mingfeima merged commit 8cf4d73 into sgl-project:main Oct 10, 2026
203 of 244 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants