Repository navigation
[XPU CI] Optimize PR CI per-file timeouts and fail hanging tests fast - #42048
Merged
mingfeima merged 10 commits intoOct 12, 2026
Merged
Conversation
XPU PR CI ran each file with the default 1200s limit plus 600s on retry, so a silent hang cost up to 30 min before the retry that passes in seconds. - Cap every file at 600s for both attempts (--timeout-per-file 600 --retry-timeout-increase 0). - Add a repeatable `run_suite.py --timeout-override PATH=SECONDS` that caps only the first attempt; the retry keeps the full --timeout-per-file so a slow-but-healthy run still gets a fair second chance. Inert unless passed; only pr-test-xpu.yml passes it. - Override the 7 files seen hanging across 156 recent XPU stage-a jobs, each at ~3x its observed max runtime: file normal hangs timeout xpu/test_xpu_basic.py 21-41s 7 180 kv_canary/test_self_unit_req_to_expected_...py 8-74s 3 120 kernels/ops/kvcache/test_hisparse.py 6-9s 11 120 kv_canary/test_self_unit_plan_input.py 7-11s 6 120 xpu/test_layernorm_xpu.py 7-11s 4 120 e2e/xpu/test_xpu_fp8_linear.py 8-72s 7 240 xpu/test_intel_xpu_backend.py 58-112s 7 360
arathi-hlab
requested review from
Fridge003,
HaiShaw,
Kangyan-Zhou,
bingxche,
ispobock and
merrymercy
as code owners
October 1, 2026 10:53
This was referenced Oct 1, 2026
mingfeima
reviewed
Oct 4, 2026
mingfeima
left a comment
Collaborator
There was a problem hiding this comment.
The separation looks right: XPU-specific timeout values stay in the XPU workflow, while the shared runner behavior is opt-in. The XPU PR job passes at this head.
- python/sglang/test/ci/ci_utils.py:269-273,345-358: Could you add a hardware-independent regression test for a matched first attempt, its retry using the base timeout, and an unmatched file? The passing XPU job did not hit a timeout, so it does not exercise the new retry behavior. Since this is described as a cap,
min(base_timeout, override)would also prevent an override from accidentally extending the first attempt. - test/run_suite.py:440-448: Please reject non-finite values with
math.isfinite(timeout). Bothnanandinfcurrently pass the positivity check and can interfere with timeout handling.
…ite values An override now only shortens the first attempt (min with --timeout-per-file), and --timeout-override rejects nan/inf.
Collaborator
Author
|
@mingfeima Thanks! Addressed in b1de55a:
For the retry path I verified locally with dummy tests (10s base, 2s override): attempt 1 was killed at 2s, the retry got the full 10s, ran 3s (longer than the override) and passed; a non-hanging overridden file passed on attempt 1, and an unmatched file used the base timeout. I kept it out of the suite since it's CI-runner tooling with no existing test harness. |
Collaborator
Author
|
/tag-and-rerun-ci |
1 task done
mingfeima
approved these changes
Oct 12, 2026
Liwansi
added a commit
to Liwansi/sglang_vans
that referenced
this pull request
Oct 13, 2026
…n_allgather * 'main' of https://github.com/sgl-project/sglang: (236 commits) [NPU] Stabilize HiCache and registered CI tests (sgl-project#43308) [Docs] Cookbook: refresh SemiAnalysis AgentX launches (GLM-5.2 B300, DeepSeek-V4.1 GB300) (sgl-project#43799) [Docs] Update GLM-5.3-Flash playground: B300 default, CP8, EP and PD (sgl-project#43802) [DSV4.1][PD][1/N] Support prefill node use cp parallel strategy (sgl-project#40323) [BCG][DSV4-Flash][CP] Support DeepSeek V4 prefill with interleave CP and breakable CUDA graphs (sgl-project#38603) [XPU] Support decode context parallelism (DCP) on Intel XPU (sgl-project#34355) Keep NIXL Mamba checkpoint keys separate by TP rank (sgl-project#43594) Capture KV host transfer buffers (sgl-project#43711) [CI] Move tests that do not need GB300 off the per-PR GB300 suite (sgl-project#43784) [HiCache] Preserve all MTP KV and recurrent state (sgl-project#40223) [HiCache] Support Mamba in buffer-only host memory mode (sgl-project#36345) [PD] Poison the deferred abort ack when a Mooncake send fails (sgl-project#43719) [Perf] Route BF16 mixed-batch decode tails through decode attention (sgl-project#43238) [Fix] Link cuda_ipc JIT against CUDA driver stubs dir (sgl-project#43764) docs: clarify prefill CP terminology and simplify wording (sgl-project#43787) [diffusion][xpu] FLUX.2: enable the bit-exact Triton SwiGLU on XPU (sgl-project#41940) [Fix] Adapt to transformers 5.18 / 5.19 changes (sgl-project#43688) [XPU CI] Optimize PR CI per-file timeouts and fail hanging tests fast (sgl-project#42048) [Deps] Bump FlashInfer to 0.7.1 (sgl-project#43494) docs: sync LMSYS SGLang blog cards (sgl-project#43462) ...
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
XPU PR CI ran each test file with the default 1200s limit plus 600s on retry. Several files intermittently hang right after XPU device init with no output, so each hang burned the full 30 min before a retry that passes in seconds. Across 156 recent XPU stage-a jobs there were 45 such hangs.
Split out of #41857 so that PR only carries the nightly kernel-main/release split.
Modifications
pr-test-xpu.yml: cap every file at 600s for both attempts (--timeout-per-file 600 --retry-timeout-increase 0), and pass per-file overrides for the 7 files seen hanging.run_suite.py: add a repeatable--timeout-override PATH=SECONDS, matched by path suffix. It does nothing unless passed, and onlypr-test-xpu.ymlpasses it.ci_utils.py: an override caps only the first attempt. The retry gets the full--timeout-per-file, so a slow-but-healthy run still gets a fair second chance.Overrides are ~3x each file's observed max passing runtime:
xpu/test_xpu_basic.pykv_canary/test_self_unit_req_to_expected_token_ids_manager.pykernels/ops/kvcache/test_hisparse.pykv_canary/test_self_unit_plan_input.pyxpu/test_layernorm_xpu.pye2e/xpu/test_xpu_fp8_linear.pyxpu/test_intel_xpu_backend.pyA hang on one of these now costs about 3 min (cap + 60s wait + normal retry) instead of about 31 min.
No test file or
register_*_cichange, so other vendors' CI behaviour is unchanged.Testing
run_unittest_fileson dummy tests with a 2s override and a 10s base: attempt 1 was killed at 2s, the retry ran 3s (longer than the override) and passed; a non-hanging overridden file passed on attempt 1.--timeout-overriderejectsx.py,x.py=0,=5,x.py=abc.CI States
Latest PR Test (Base): ❌ Run #38026054009
Latest PR Test (Extra): ❌ Run #38026053877
Latest PR Test (AMD ROCm 10): ❌ Run #38026054002