Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Role-specific environment overrides are dropped at the Slurm Docker boundary, and the new long-context benchmark cards lack machine-readable result exports for MAD collection.
2 open issues
What changed in this PR
Adds GLM-5.3-Flash-MXFP4 serving on gfx942 GPUs to MAD’s vLLM disaggregated workload catalog, building on the FP8 support from #274.
Changes:
- Adds a shared, source-pinned serving image for both checkpoints with build-time fix checks.
- Registers five benchmark variants per checkpoint, with Slurm allowlists and separate checkpoint-directory names.
- Adds per-leg environment settings for MXFP4’s FP8 prefill and 4-bit decode paths, plus documentation and offline checks.
| File | Description |
|---|---|
scripts/vllm_dissag/tests/gate_check.sh |
Extends mirrored connector-gate cases for both checkpoints. |
scripts/vllm_dissag/tests/argv_assert.sh |
Checks launch flags, checkpoint probing, and per-leg environment markers. |
scripts/vllm_dissag/run_xPyD_models.slurm |
Adds model allowlists and checkpoint-directory overrides. |
scripts/vllm_dissag/README.MD |
Documents deployment, checkpoint selection, and benchmark variants. |
scripts/vllm_dissag/models.yaml |
Defines FP8 and MXFP4 serving recipes for gfx942. |
scripts/vllm_dissag/models.json |
Registers ten two-node benchmark cards across both checkpoints. |
scripts/vllm_dissag/connectors/moriio.sh |
Applies optional prefill- and decode-specific environment settings. |
docker/vllm_disagg_inference.glmv53flash.gfx942.ubuntu.amd.Dockerfile |
Builds the pinned gfx942 image and verifies required fixes. |
Review effort: Balanced
| local _leg_env="${PREFILL_EXTRA_ENV:-}" | ||
| [[ "$log_prefix" == "decode" ]] && _leg_env="${DECODE_EXTRA_ENV:-}" |
There was a problem hiding this comment.
| "yD": "1", | ||
| "RUN_MORI": "1", | ||
| "RUN_DEEPEP": "0", | ||
| "BENCHMARK_SCRIPT": "long_context", |
There was a problem hiding this comment.
Fixed in 31208d4: benchmark_long_context.sh writes ${LOG}_CONCURRENCY.csv and perf.csv through parse_to_csv.py, with the sweep's [RUNNING] prompts N isl X osl Y con C header, for both GLM-5.3 cards.
…long-context CSV)
- run_xPyD_models.slurm: forward PREFILL_EXTRA_ENV / DECODE_EXTRA_ENV into the
container with ${VAR+...} so a set-but-empty submit-time override wins over
models.yaml; argv_assert covers both forwards.
- benchmark_long_context.sh: [RUNNING] header uses the parser's
'prompts N isl I osl O con C' form and the runner writes CSV + perf.csv via
parse_to_csv.py (same as benchmark_xPyD.sh). Affects both long_context cards.
- Dockerfile header: build example runs from the repo root with docker/ -f path.
| echo "==== Long-context benchmark complete ====" | tee -a "${LOG}_CONCURRENCY.log" >/dev/null | ||
|
|
||
| # Same CSV export as benchmark_xPyD.sh: the [RUNNING] header above is the parser's cell key. | ||
| python3 $NIXL_COOKBOOK_PATH/parse_to_csv.py ${LOG}_CONCURRENCY.log -o ${LOG}_CONCURRENCY.csv \ |
There was a problem hiding this comment.
Fixed in 215bfe9: parse_to_csv.py takes the last [RUNNING] header before each result block, so a cell that fails before printing a result no longer claims the next one. argv_assert.sh covers the failed c=1 / successful c=8 case; the sweep CSV for an existing log is unchanged.
…long-context CSV)
- run_xPyD_models.slurm: forward PREFILL_EXTRA_ENV / DECODE_EXTRA_ENV into the
container with ${VAR+...} so a set-but-empty submit-time override wins over
models.yaml; argv_assert covers both forwards.
- benchmark_long_context.sh: [RUNNING] header uses the parser's
'prompts N isl I osl O con C' form and the runner writes CSV + perf.csv via
parse_to_csv.py (same as benchmark_xPyD.sh). Affects both long_context cards.
- Dockerfile header: build example runs from the repo root with docker/ -f path.
…ach result under its own cell - connectors/moriio.sh: split PREFILL_/DECODE_EXTRA_ENV with read -ra (no glob expansion); generic comment. - parse_to_csv.py: take the last [RUNNING] header before a result block, so a cell that failed before printing a result no longer claims the next cell's throughput (long-context export, ROCm#316 review). - tests: run the per-leg hook and check what each leg exports; parser regression case. - README: plural wording for the two GLM-5.3 cards.
c98bc1d to
215bfe9
Compare
| [[ "$log_prefix" == "decode" ]] && _leg_env="${DECODE_EXTRA_ENV:-}" | ||
| local _kv _leg_kvs=() | ||
| read -ra _leg_kvs <<<"${_leg_env}" | ||
| for _kv in "${_leg_kvs[@]}"; do export "$_kv"; done |
There was a problem hiding this comment.
Fixed in b76c75c: the hook uses local -x, so the list reaches the vllm serve started inside connector_launch_worker but not the router or benchmark the launcher runs afterwards. The hook test now checks a child started inside the function (gets its leg's list) and the caller (gets nothing); it fails on the previous export.
| "BENCHMARK_SCRIPT": "agentic", | ||
| "AGENTIC_WORKLOAD": "conformance_256k" |
There was a problem hiding this comment.
Not changed here: this lookup is develop's, unchanged by this PR (benchmark_agentic.sh and scripts/common/ are identical to develop), and the same limit applies to the existing DeepSeek agentic cards. A checkout outside the three mounted roots can set AGENTIC_LIB today; mounting scripts/common for all agentic cards fits better in a separate harness PR.
The leg's KEY=VAL list reached the vllm serve started in the function but also stayed exported in the launcher shell, so the router and benchmark on the prefill node inherited it (ROCm#316 review). The hook test now checks a child started inside the function and the caller separately.
…/EP8) Adds GLM-5.3-Flash-FP8 (Glm5NextForConditionalGeneration) disaggregated serving on MI300X / MI325X to the vllm_dissag harness: EP8 prefill (eager) + EP8 decode with MTP on both legs and a FULL_AND_PIECEWISE decode CUDA graph, max-model-len 760000, MoRIIO READ. - docker/vllm_disagg_inference.glmv53flash.gfx942.ubuntu.amd.Dockerfile: self-contained, builds vLLM (raviguptaamd/vllm@98b24865), AITER (raviguptaamd/aiter@6f65fba0, incl. ROCm/aiter#3913), MoRI (ROCm/mori@78b7a5f3) and vllm-router (raviguptaamd/router@9b2146ec, incl. vllm-project/router#313) from pinned commits on a digest-pinned base; no patch overlay; 18 build-time fix checks. - models.yaml / models.json: GLM-5.3-Flash-FP8-gfx942 (sweep, niah, long_context, agentic conformance_256k / conformance_512k). - connectors/moriio.sh: opt-in MORIIO_READ_MODE and ROUTER_PREFILL_POLICY / ROUTER_DECODE_POLICY (no-ops for other models); run_xPyD_models.slurm gate lists. - skills/: MoRIIO NIC setup for Broadcom Thor2 and ConnectX-7. - results/: validation report (NIAH 256K/512K/750K, concurrent NIAH, perf, AgentX on MI325X and MI300X). - README.MD, tests/gate_check.sh, tests/argv_assert.sh. Co-authored-by: Cursor <cursoragent@cursor.com>
madengine slurm_multi sizes #SBATCH --nodes from slurm.nodes or distributed.nnodes (default 1); the card's args "-N 2 -n 2" is only passed to the script. Declare distributed.nnodes=2 on the five GLM-5.3-Flash-FP8-gfx942 cards so a 1P/1D job gets both nodes.
The slurm probed <root>/$MODEL_NAME, but the models.yaml key GLM-5.3-Flash-FP8-gfx942 is not the checkpoint directory (GLM-5.3-Flash-FP8 on NVMe and shared FS), so a run found no weights without a hand-made symlink. Add MODEL_WEIGHTS_NAME (default MODEL_NAME, same name and semantics as cluster.sh in ROCm#242) to the probe, set it on the five GLM-5.3 gfx942 cards, and cover the probe in argv_assert.
madengine selects cards by name or tag, so without the tag `--tags niah` skipped this card.
…o the container A submit-time override was silently dropped and the models.yaml value always won, unlike every other per-model knob. Unset keeps the YAML value.
…; fix README image note The README now lists GLM-5.3-Flash among the models the shared image does not serve, says the router policies can be overridden at submit time, and marks the MI325X Broadcom submit line as the recipe author's.
…4-bit decode) Adds GLM-5.3-Flash-MXFP4-gfx942: the AMD Quark MXFP4 checkpoint on the GLM-5.3 gfx942 image with the FP8 card's flags. gfx942 has no FP4 matrix math; every MXFP4 expert converts exactly to FP8 128x128 blocks at load, so prefill runs routed and shared experts on the FP8 block paths and decode keeps the routed experts 4-bit (FlyDSL W4A16, exact e2m1 decode). - Dockerfile: repin vLLM raviguptaamd/vllm@439eabe5c, AITER raviguptaamd/aiter@11a6be6e, router raviguptaamd/router@076800b; 29 build-time fix markers. The vLLM pin also carries the DSA indexer exact-causal-rows fix (MTP under FULL graphs), which the FP8 card picks up. - connectors/moriio.sh: opt-in per-leg env PREFILL_EXTRA_ENV / DECODE_EXTRA_ENV ("KEY=VAL ..."), exported only on that leg; unset for every other model. - models.yaml: GLM-5.3-Flash-MXFP4-gfx942 = FP8 card + VLLM_ROCM_MXFP4_WEIGHT_ONLY, AITER_FLYDSL_W4_FP4, VLLM_ROCM_MXFP4_DENSE_FP8BLOCK, PREFILL_EXTRA_ENV=VLLM_ROCM_MXFP4_MOE_FP8BLOCK=1. Both GLM-5.3 cards set VLLM_HTTP_TIMEOUT_KEEP_ALIVE=120 (above the router's 50 s idle pool). - models.json: five MXFP4 cards mirroring the FP8 ones (MODEL_WEIGHTS_NAME=GLM-5.3-Flash-MXFP4). - slurm allowlists, README, gate_check / argv_assert (MXFP4 argv == FP8 argv per leg; the MoE FP8-block switch reaches prefill only). Co-authored-by: Ravi Gupta <ravgupta@amd.com>
…d comment The comment stated a matrix count, checkpoint sizes and an MI325X KV-cache gain that this branch did not measure.
…long-context CSV)
- run_xPyD_models.slurm: forward PREFILL_EXTRA_ENV / DECODE_EXTRA_ENV into the
container with ${VAR+...} so a set-but-empty submit-time override wins over
models.yaml; argv_assert covers both forwards.
- benchmark_long_context.sh: [RUNNING] header uses the parser's
'prompts N isl I osl O con C' form and the runner writes CSV + perf.csv via
parse_to_csv.py (same as benchmark_xPyD.sh). Affects both long_context cards.
- Dockerfile header: build example runs from the repo root with docker/ -f path.
…ach result under its own cell - connectors/moriio.sh: split PREFILL_/DECODE_EXTRA_ENV with read -ra (no glob expansion); generic comment. - parse_to_csv.py: take the last [RUNNING] header before a result block, so a cell that failed before printing a result no longer claims the next cell's throughput (long-context export, ROCm#316 review). - tests: run the per-leg hook and check what each leg exports; parser regression case. - README: plural wording for the two GLM-5.3 cards.
The leg's KEY=VAL list reached the vllm serve started in the function but also stayed exported in the launcher shell, so the router and benchmark on the prefill node inherited it (ROCm#316 review). The hook test now checks a child started inside the function and the caller separately.
b76c75c to
dfda933
Compare

Adds GLM-5.3-Flash (
Glm5NextForConditionalGeneration) disaggregated 1P/1D serving on gfx942 (MI300X / MI325X) over MoRIIO to thevllm_dissagharness, as two recipes on one image:GLM-5.3-Flash-FP8-gfx942: the FP8 checkpoint.GLM-5.3-Flash-MXFP4-gfx942: the AMD Quark MXFP4 checkpoint, with the FP8 card's flags.This replaces #274 (the FP8 card) and #288 (the MXFP4 change, here without the hybrid-prefill cards and the docs). Rebased onto develop 55c3c54 (after #302 and #319).
Why MXFP4 works on gfx942. gfx942 has no FP4 matrix math. MXFP4 experts convert to FP8 128x128 blocks at load, so prefill runs routed and shared experts on the FP8 block paths, and decode keeps the routed experts 4-bit (AITER FlyDSL W4A16, exact e2m1 decode). Measured below: 54.33 GiB weights per GPU on prefill and 38.84 GiB on decode, and +30.9% decode KV tokens per GPU versus the FP8 card on the same image. #288 checked the conversion over all 37,152 expert matrices.
Changes
raviguptaamd/vllm@439eabe5c, AITERraviguptaamd/aiter@11a6be6e, routerraviguptaamd/router@076800b(29 build-time fix markers). Prebuilt:rocm/vllm-dev:vllm-glm53flash-mad288-mxfp4-src(digest786eae0c). The Dockerfile is byte-identical to the one that built that image, so it still pins and checks the off-by-default hybrid-prefill code from GLM-5.3-Flash-MXFP4 on gfx942: exact FP8-block prefill, 4-bit decode (stacked on #274) #288 (SP dense-MLP replication, MoRIIO KDA fan-in, routerROUTER_DECODE_DP_PIN). No card here uses it; the hybrid cards can follow as their own PR.models.yaml: the FP8 recipe (MoRIIO READ mode, MTP on both legs,consistent_hashrouting on both legs,VLLM_HTTP_TIMEOUT_KEEP_ALIVE=120above the router's 50 s idle pool). The MXFP4 recipe = FP8 recipe +VLLM_ROCM_MXFP4_WEIGHT_ONLY=1,AITER_FLYDSL_W4_FP4=1,VLLM_ROCM_MXFP4_DENSE_FP8BLOCK=1,PREFILL_EXTRA_ENV=VLLM_ROCM_MXFP4_MOE_FP8BLOCK=1.models.json: five cards per checkpoint (base sweep,_niahwith theniahtag,_long_context, agenticconformance_256k, agenticconformance_512k),distributed.nnodes: 2(without it madengine emits#SBATCH --nodes=1) andMODEL_WEIGHTS_NAME=GLM-5.3-Flash-FP8/GLM-5.3-Flash-MXFP4.run_xPyD_models.slurm: opt-inMODEL_WEIGHTS_NAMEin the weights probe (defaults toMODEL_NAME, same name and semantics as Kimik3 madengine integration #242'scluster.sh), because the recipe keys are not the checkpoint directories; forwardsROUTER_PREFILL_POLICY/ROUTER_DECODE_POLICYandPREFILL_EXTRA_ENV/DECODE_EXTRA_ENV, so a submit-time value overridesmodels.yaml; allowlists.connectors/moriio.sh: opt-in per-leg envPREFILL_EXTRA_ENV/DECODE_EXTRA_ENV(KEY=VAL ..., whitespace-separated), visible only to thevllm serveof that leg; unset for every other model.benchmark_long_context.shwritesperf.csvthroughparse_to_csv.pylike the sweep, with the parser's[RUNNING] prompts <N> isl <ISL> osl <OSL> con <CON>header.tests/argv_assert.sh,tests/gate_check.sh.Other models are unaffected: every change is card-local or opt-in, with the unset defaults asserted.
Validation (this head, dfda933)
Offline.
tests/run_all.sh: gate_check 32/32, argv_assert 87/87. madenginemain(f136880) discovers all 10 cards by name on this tree;--tags niahselects the two_niahcards.Live. OCI, MI300X, 1P/1D, EP8 prefill + EP8 decode, prebuilt image above, this exact commit (git-archive checked by commit id). Each of the 10 cards ran as shipped:
run_xPyD_models.slurmwith the card'senv_vars(not through madengine), one job per card, plus one accuracy job per checkpoint. Every job completed. Jobs preempted by the cluster were rerun from the start; numbers are from the completed run.perf.csvrows_long_context256K/1K and 512K/1K at c=1, c=8: cells / failed /perf.csvrowsconformance_256k, card defaults (c=16, 120 s window): measured requests okconformance_512k, card defaults: measured requests okGSM8K on this image across runs (the first three on pre-rebase commits of this branch, same image and card; the last is this head): FP8 0.9196 / 0.9181 / 0.9189 / 0.9143, MXFP4 0.9090 / 0.9105 / 0.9105 / 0.9105 (flexible). On #274's original pins (vLLM
6a0cb939) the FP8 card scored 0.8431 (job 569569). The image pins move together (vLLM, AITER and the router), so the FP8 change is not isolated to one commit.Base sweep (1024/1024, prompts = 2 x concurrency, one run per card on this head):
An earlier two-run sweep on the same image (pre-rebase commit) gave the same picture: MXFP4 median ITL +5% to +36% and output throughput −15% to −22% at concurrency 8–128, equal at 256 and 512. MXFP4 decode is slower than FP8 at concurrency 8–128 on this image. This sweep never fills the KV cache, so it does not exercise MXFP4's +31% decode KV; the MXFP4 card is for KV-bound serving (long context, many sessions), not short-prompt throughput.
Long context (
_long_contextcard, 2 warm-ups per cell, 16 prompts at c=1, 32 at c=8):Agentic (cards as shipped: harness defaults concurrency 16, 120 s measured window, so these are functional runs, not AgentX submissions, which need a 900 s window). Every measured request succeeded. The harness validator also counts aiperf's cache-warmup drops: those are 1-token requests, and with the
glm45reasoning parser some return no content token, which aiperf rejects (InvalidInferenceResultError, 43–66 per run, all in warmup). That puts the validator's error rate at 10.0–17.0%. Router prefix-cache hit rate was 10.4–16.6% in all four runs, below the validator's 30% hint.NIAH. develop's
benchmark_niah.py(rewritten in #302) prompts GLM with a bare continuation (NIAH_METHOD=product, "... Animals found in the above list: "). On GLM-5.3-Flash some prompts get the answer "1. 2. 3. ..." with no names, scored 0/10. The shipped_niahcard measured:This is the model's response to that prompt, not the disaggregated KV transfer: the same prompts on one node with no KV connector (same image, same harness commit, decode-leg recipe, jobs 587151 FP8 and 587277 MXFP4, the NIAH ladder three times per server) scored 0/10 on all three 2,000-word seeds in 3 of 3 repeats (MXFP4) and on seeds 0 and 2 in 3 of 3 (FP8), with further zeros at 8K–35K that change between repeats. At the first answer token after "1." the model is near a tie between a space (leading to "2.") and the first animal, for example FP8 2,000 words seed 0: ' ' log-prob −1.386 vs ' Elephant' −1.574.
#288's full suite (a different GSM8K eval: 97.32% on both checkpoints on MI325X, NIAH 16K–704K identical, AgentX within 1.2% of FP8) is not remeasured here. Its "4-bit decode step about 3–4% slower" is superseded by the sweeps above for this workload.
Please squash with:
Co-authored-by: ravgupta <ravgupta@amd.com>