Skip to content

[CI] Add a unified-memory rerun test group - #40147

Merged
ch-wan merged 1 commit into
sgl-project:mainfrom
ch-wan:cheng/ci-unified-memory-test-group
Sep 18, 2026
Merged

ch-wan merged 1 commit into
sgl-project:mainfrom
ch-wan:cheng/ci-unified-memory-test-group

Conversation

@ch-wan

@ch-wan ch-wan commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

The unified memory pool's tests sit in a dozen directories. The allocator and pool units are under unit/mem_cache/, but so are the PD move gate (unit/disaggregation/), the prefill adder and scheduler init (unit/managers/), the pool configurator (unit/model_executor/), three server-arg gates (unit/server_args/), the page-major and Kimi-Linear e2e runs, and three PD disaggregation e2e cases.

There is currently no way to ask for "the unified memory tests". In practice a change to the allocator gets rerun by directory, and the rest is found later or not at all — I hit exactly this while reviewing #39477: after touching UnifiedMLATokenToKVPool I reran unit/mem_cache/ and missed the MLA views, GPU parity, and handout-zeroing tests that cover the same class.

Modifications

scripts/ci/rerun_test_groups.json already supports a named cross-directory file set alongside the directory-derived groups (resolve_test_group_specs checks the manifest first, then falls back to test/registered/<name>/). This adds a unified-memory group with the 44 files that either

  • import sglang.srt.mem_cache.unified_memory_pool or an allocator.unified_* module,
  • launch a server with --enable-unified-memory, or
  • set enable_unified_memory=True.

/rerun-group unified-memory now expands to all of them.

Three files that match on text are deliberately excluded:

File Why out
unit/layers/attention/test_linear_attn_config.py exercises the enable_unified_memory=False branch
unit/layers/test_mamba_state_scatter_triton.py only names the pool in prose
radix_cache/unified_radix_tree/test_unified_radix_cache_kl_mamba.py belongs to the unified radix tree, a different subsystem sharing the prefix

Test plan

No test accompanies the manifest, deliberately. resolve_test_group_specs already refuses a group whose files have moved and names each missing path, test_rust_server_group covers that code path, and the group dispatches rather than gates — a stale entry makes one command report an error, it cannot turn a run green.

Verified against the real resolver (not just the JSON):

unified-memory: 44 specs, err=None
rust-server:     4 specs, err=None        # unchanged
unknown group:   rejected, and the new name appears in "Known groups"

python -m pytest test/registered/unit/tools/test_slash_command_handler.py → 4 passed. pre-commit clean.

Notes for reviewers

No CI wiring changes — this only affects what /rerun-group expands to, so nothing runs differently until someone asks for it.

The group spans four lanes by design: 30 CPU units (~5 min total), 4 GPU units, and 10 e2e cases, two of which are 900–1200s PD runs. If that is too coarse for a single command, the natural split is unified-memory for the units and unified-memory-e2e for the server-backed ones — happy to do that instead.

🤖 Generated with Claude Code


CI States

Latest PR Test (Base): ✅ Run #35326318975
Latest PR Test (Extra): ❌ Run #35326318915
Latest PR Test (AMD ROCm 10): ❌ Run #35326319628

The unified memory pool's tests sit in a dozen directories -- allocator and
pool units under `unit/mem_cache/`, but also the PD move gate, the prefill
adder, the pool configurator, the server-arg gates, the page-major and
Kimi-Linear e2e runs, and three PD disaggregation e2e cases. There is no way
to ask for "the unified memory tests", so a change to the allocator gets
rerun by directory and the rest is found later, or not at all.

`scripts/ci/rerun_test_groups.json` already supports a named cross-directory
file set next to the directory-derived groups, so this adds `unified-memory`
with the 44 files that either import the pool/allocator modules, launch a
server with `--enable-unified-memory`, or set `enable_unified_memory=True`.
`/rerun-group unified-memory` now expands to all of them.

Three files that match on text are deliberately out: `test_linear_attn_config`
exercises the `enable_unified_memory=False` branch, `test_mamba_state_scatter_triton`
only names the pool in prose, and `test_unified_radix_cache_kl_mamba` belongs
to the unified *radix tree*, a different subsystem that shares the prefix.

No test accompanies the manifest: `resolve_test_group_specs` already refuses a
group whose files have moved and names each missing path, `test_rust_server_group`
covers that code path, and the group dispatches rather than gates -- a stale
entry makes one command report an error, it cannot turn a run green.

Verified against the real resolver: 44 specs, no error, `rust-server`
unchanged, and an unknown group still rejected with the new name listed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ch-wan
ch-wan force-pushed the cheng/ci-unified-memory-test-group branch from 49e22b7 to 5bd5278 Compare September 18, 2026 08:49
@ch-wan

ch-wan commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator Author

/rerun-group unified-memory

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Results for /rerun-group unified-memory:

🚀 1-gpu-h100 (5 tests): ❌ View workflow run

cd test/ && python3 registered/attention/test_gemma4_unified_swa_virtual_ids.py
cd test/ && python3 registered/attention/test_unified_memory_deterministic.py
cd test/ && python3 registered/e2e/models/test_inkling_unified.py
cd test/ && python3 registered/page_major/test_page_major_gpt_oss.py
cd test/ && python3 registered/page_major/test_page_major_qwen_hybrid.py

🚀 2-gpu-h100 (4 tests): ❌ View workflow run

cd test/ && python3 registered/disaggregation/test_disaggregation_unified_memory.py
cd test/ && python3 registered/e2e/disaggregation/test_disaggregation_unified_memory_swa.py
cd test/ && python3 registered/e2e/disaggregation/test_disaggregation_unified_memory_tri.py
cd test/ && python3 registered/e2e/models/test_kimi_linear_models.py

🚀 4-gpu-h100 (1 test): ❌ View workflow run

cd test/ && python3 registered/e2e/models/test_kimi_linear_unified_memory.py

🚀 4-gpu-b200 (1 test): ❌ View workflow run

cd test/ && python3 registered/e2e/models/test_kimi_linear_unified_memory_dcp_blackwell.py

🚀 ubuntu-latest (31 tests): ✅ View workflow run

cd test/ && python3 registered/unit/disaggregation/test_unified_memory_move_gate.py
cd test/ && python3 registered/unit/layers/attention/test_kv_translate_ownership.py
cd test/ && python3 registered/unit/managers/test_prefill_adder.py
cd test/ && python3 registered/unit/managers/test_scheduler_init_req_max_new_tokens.py
cd test/ && python3 registered/unit/mem_cache/test_dsv4_unified_fp8_pool.py
cd test/ && python3 registered/unit/mem_cache/test_flashkda_strided_state_access.py
cd test/ && python3 registered/unit/mem_cache/test_full_loc_fast_path.py
cd test/ && python3 registered/unit/mem_cache/test_hisparse_allocator.py
cd test/ && python3 registered/unit/mem_cache/test_hisparse_max_token_pool_size.py
cd test/ && python3 registered/unit/mem_cache/test_kda_fused_decode_strided_state.py
cd test/ && python3 registered/unit/mem_cache/test_kv_index_translator.py
cd test/ && python3 registered/unit/mem_cache/test_multi_ended_allocator.py
cd test/ && python3 registered/unit/mem_cache/test_pd_envelope_transfer_layout.py
cd test/ && python3 registered/unit/mem_cache/test_prefill_memory_budget.py
cd test/ && python3 registered/unit/mem_cache/test_swa_locked_full_recover_unified.py
cd test/ && python3 registered/unit/mem_cache/test_unified_byte_accounting.py
cd test/ && python3 registered/unit/mem_cache/test_unified_byte_budget_sizing.py
cd test/ && python3 registered/unit/mem_cache/test_unified_capacity_memo.py
cd test/ && python3 registered/unit/mem_cache/test_unified_free_no_host_sync.py
cd test/ && python3 registered/unit/mem_cache/test_unified_mamba_views.py
cd test/ && python3 registered/unit/mem_cache/test_unified_mha_views.py
cd test/ && python3 registered/unit/mem_cache/test_unified_mla_views.py
cd test/ && python3 registered/unit/mem_cache/test_unified_npool_sweep.py
cd test/ && python3 registered/unit/mem_cache/test_unified_radix_allocation_eviction.py
cd test/ && python3 registered/unit/mem_cache/test_unified_swa_shared_virtual_ids.py
cd test/ && python3 registered/unit/mem_cache/test_unified_tri_pool.py
cd test/ && python3 registered/unit/model_executor/test_pool_configurator.py
cd test/ && python3 registered/unit/server_args/test_page_major_backend_allowlist.py
cd test/ && python3 registered/unit/server_args/test_unified_prefill_cuda_graph_gate.py
cd test/ && python3 registered/unit/server_args/test_unified_tbo_gate.py
cd test/ && python3 registered/unit/test_model_overrides.py

🚀 1-gpu-5090 (2 tests): ✅ View workflow run

cd test/ && python3 registered/unit/mem_cache/test_unified_handout_zeroing.py
cd test/ && python3 registered/unit/mem_cache/test_unified_mla_gpu_parity.py

@ch-wan
ch-wan merged commit bbfcda4 into sgl-project:main Sep 18, 2026
116 of 123 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant