Repository navigation
[Test][UMBP] Restore a Mamba2 hybrid end to end through UMBP - #64656
AndreasKaratzas wants to merge 18 commits into
Conversation
Add embedded runtime contract tests, MORI GPU integration, token-level restore coverage, reusable test helpers, user documentation, and AMD CI wiring. Signed-off-by: CharlesWu <Charles.Wu@amd.com> Co-authored-by: Yichao Zhu <Yichao.Zhu@amd.com> Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit d61f813) (cherry picked from commit 967175e) (cherry picked from commit 68cef07)
Move the scheduler factory fix into the embedded test slice so its lookup instance matches the workers at this PR head. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: CharlesWu <Charles.Wu@amd.com>
The TP2 x PP2 native roundtrip launches four ranks. Use the existing mi355_4 pool and request four GPUs for this integration step. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: CharlesWu <Charles.Wu@amd.com>
Install gRPC and Protobuf dependencies in both ROCm image bases, request BUILD_UMBP=ON, and reject silently disabled builds through the CMake cache. Check UMBPClient and four visible GPUs before running the integration suite so a missing native backend cannot turn module skips into a green job. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: CharlesWu <Charles.Wu@amd.com>
Keep the added embedded unit and GPU integration tests independent of Buildkite's long TMPDIR, including multiprocess workers and token restore. Share the existing short directory fixture across connector test suites. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: CharlesWu <Charles.Wu@amd.com>
Remove the module-wide ROCm/MORI skip from the CPU contract suite so the four regressions merged with the embedded implementation continue to run. All 52 cases pass without MORI; native GPU tests retain their own guards. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: CharlesWu <Charles.Wu@amd.com>
Run the integration suite with the image's pytest instead of a separate virtualenv. Fail collection when MORI lacks UMBPClient and fail the TP2 x PP2 round-trip when fewer than four GPUs are visible, so a misconfigured image or agent still cannot pass through skips. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: CharlesWu <Charles.Wu@amd.com>
Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
- Docker: install gRPC/Protobuf build deps only in build_mori; final gets the runtime libs and a UMBPClient import check; drop no-op BUILD_UMBP. - CI: single-GPU integration group in test_areas and test-amd.yaml, with complete source dependencies. - Tests: drop tautological and fake-only tests, use a fake-clock fixture for timeouts, move the hybrid-tail restore into the unit suite with a non-periodic fill, rewrite the e2e restore with vllm_runner and an external-hit assertion, and gate on ROCm + UMBP via pytestmark. - Accuracy: add a ROCm-gated UMBP GSM8K row that asserts the reload. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
…eduler - e2e: under VLLM_BATCH_INVARIANT=1 a UMBP restore must reproduce the cold run's tokens and logprobs, for a batch ending mid-block and for a restore that extends a shorter GPU prefix hit, with exact external-hit counts. - unit: an object evicted between lookup and load must fail or recompute per kv_load_failure_policy through the real Scheduler, for one and two KV cache groups, and never leave a stale prefix-cache hit. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
|
This pull request has merge conflicts that must be resolved before it can be |
Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Andreas Karatzas <akaratza@amd.com>
charxwu
left a comment
There was a problem hiding this comment.
Tested on MI350X (gfx950) with vLLM built from 687c0ca (MORI 1.2.3.post1 with UMBP, VLLM_WORKER_MULTIPROC_METHOD=spawn):
pytest -v -s -rs v1/kv_connector/umbp_integration: 5 passed.... test_mori_token_e2e.py -k hybrid: 10/10 passed, about 95 s each.- Zeroing the restored Mamba blocks after the UMBP load fails both cases at the first generated token (70 vs 198, 319 vs 198), while the cached-token and external-hit asserts still pass.
LGTM once rebased.
|
Thanks @charxwu for testing it, including the zeroed-Mamba check! |
|
/ci run |
|
✅ Triggered Buildkite CI #99386 for commit |
tjtanaa
left a comment
There was a problem hiding this comment.
Lgtm. Nice. We have such a small model for testing.
|
/ci run |
|
✅ Triggered Buildkite CI #99869 for commit ℹ️ This PR is 2 commits behind upstream |
PR Pundit review(Testing PR Pundit Code Review agent. Not all comments may be relevant. This is a one-time automated pass: please address what is useful, no need to request a re-review. Please reply to each point, whether it applies or not: we harvest these replies, and both kinds are enormously helpful for tuning the agent. Reach out to @peymanr for suggestions.)
1. 🟠 Should fix: Hybrid test cannot catch an align-mode checkpointing bug consistent across both paths: this PR uses the GPU hit, not the cold run, as oracle
Who is affected: Only test coverage: CI runs of the ROCm+MORI UMBP integration test on the granite-4.0-h-350m hybrid. Checked against the code by an independent pass. Shared from a pilot of PR Pundit, an agentic code reviewer that builds and tests the change and reads the project's past reviews. Reviewed at |
|
This pull request has merge conflicts that must be resolved before it can be |
test_mori_token_e2e.py, run through embedded UMBP.No hybrid model restores through UMBP end to end today. The Nemotron-H GSM8K row never gets a prefix hit because its 1088-token hybrid block is longer than the prompts, so the Mamba boundary-state handoff is only covered with fake runtimes. Mamba hybrids have no batch-invariant kernels, so a cold run can't be the reference, and prompts go one at a time because async load timing changes the batch layout and batched hybrid outputs aren't bitwise stable. On MI350X with MORI v1.2.3.post1 built with UMBP,
pytest -v -s -rs v1/kv_connector/umbp_integration/test_mori_token_e2e.py -k hybridpassed 10/10 in a loop and the whole file gave 3 passed, but every case fails once the restored Mamba pages are zeroed after the load. The MI355 UMBP integration group already runs this directory, so CI is unchanged. No open UMBP PR (#61795-#61798, #63002, #59276) restores a hybrid end to end, though #63830 and #63670 rework Mamba align mode and may need this test adjusted if they land first.AI assistance (Claude Code) was used to draft this change. Every line was reviewed by the submitter.