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

This commit is contained in:
ashwini rathi
2026-10-10 09:06:24 +08:00
committed by GitHub
parent 66e6b68d82
commit 8cf4d73c84
2 changed files with 12 additions and 11 deletions
@@ -271,6 +271,7 @@ def chunk_gated_delta_rule_fwd_h(
inplace_update: bool = True,
track_state: Optional[torch.Tensor] = None,
track_chunk_idx: Optional[torch.Tensor] = None,
chunk_offsets: Optional[torch.Tensor] = None,
) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
if not inplace_update:
raise NotImplementedError(
@@ -298,11 +299,11 @@ def chunk_gated_delta_rule_fwd_h(
if cu_seqlens is None:
N, NT, chunk_offsets = B, triton.cdiv(T, BT), None
else:
N, NT, chunk_offsets = (
len(cu_seqlens) - 1,
len(chunk_indices),
prepare_chunk_offsets(cu_seqlens, BT),
)
# A caller-built chunk_offsets (CUDA-graph capture) must not go through
# prepare_chunk_offsets: its tensor_cache would replay capture-time values.
N, NT = len(cu_seqlens) - 1, len(chunk_indices)
if chunk_offsets is None:
chunk_offsets = prepare_chunk_offsets(cu_seqlens, BT)
assert K <= 256, "current kernel does not support head dimension larger than 256."
h = k.new_empty(B, NT, H, V, K)