Skip to content

Hardware generalization: recipes declare what they need, one card runs on any GPU - #317

Open
Cemberk wants to merge 361 commits into
ROCm:developfrom
Cemberk:hw-generalization
Open

Cemberk wants to merge 361 commits into
ROCm:developfrom
Cemberk:hw-generalization

Conversation

@Cemberk

@Cemberk Cemberk commented Nov 19, 2026

Copy link
Copy Markdown

Stacked on #300 (DI refactor) and #295 (image specs). Until they merge, this diff includes them.
Review from commit 3be2b6f on: 30 commits, plus the merge of #295.

What this PR adds on top of #300

In #300 a recipe was a set of hand-written engine flags for one GPU, and a card could run only where its GPU_ARCHS / skip_gpu_arch allowed. GPU count, NIC family, rails, GID and GPU arch were hard-coded in cluster.sh, the connectors and the .env files. This PR turns those facts into data the launchers check and use. One card can then run on whatever GPU it lands on.

  1. Recipes say what each role needs, and the launcher checks it (3be2b6f, 36e5028, 7fab1ad, 215c94a)
  • compat/rocm.yaml gains a capability catalog:
    • formats;
    • accelerators: gfx942, gfx950, CDNA 5;
    • kernels per @, meaning the formats each engine build runs and converts on each GPU;
    • engine arguments.
  • Recipes in models.yaml gain roles: (prefill, decode, colocated). For each role they give weight, activation and KV formats, an optional per-role checkpoint, and weight placement.
  • New gate cluster_check_recipe runs in all three launchers after the GPU gate:
    • It resolves each role against the GPU and the image's own build (MAD_PIN_SET from the card's PINS).
    • It refuses with the unmet need, e.g. FP4 activations on gfx942.
    • It adds the arguments the flags lack, for example the int4 conversion on gfx942 or the KV-cache dtype. These reach the engines as MAD_ROLE_ENGINE_ARGS_.
    • A role with its own checkpoint serves it under the model's served name.
    • RECIPE_CHECK=0 skips the gate. Recipes without roles behave as before.
  • Every evidenced vLLM and SGLang recipe now declares its roles. A test checks every card: its recipe must resolve on exactly the GPUs the card runs on.
  1. One recipe, a variant per GPU, sized from the GPU (e4cb1dc, 45fbae7, 4d76ce1, 4c5ee26)
  • New scripts/common/recipe/models.py is the single recipe reader. It adds:
    • variants: per accelerator or platform, plus default_arch;
    • alias: recipes;
    • memory: {fraction: 0.1}, which sizes a value from the GPU's memory.
  • The launcher detects the GPU and applies that GPU's variant. It writes the job's resolved recipe to MAD_RECIPE_FILE so every container runs the same one.
  • The two Kimi-K3-MXFP4 recipes are now one recipe with gfx942 and gfx950 variants. The effective recipes are identical to before.
  • requires: {min_gpu_memory_gb} and accuracy: records are new.
  1. No GPU count, NIC family, arch or site in code (bfacd8b, 90088d1, 33c30ff, 2890d35)
  • The catalog now also describes:
    • platforms: mi300x-oam-8, mi325x-oam-8, mi355x-ubb-8, mi455x-helios-tray;
    • fabrics: cx7, ainic, thor2, with detection rules;
    • scale-up fabrics;
    • example site profiles (MAD_CLUSTER, or MAD_CLUSTER_FILE kept outside the repo).
  • The changes in code:
    • cluster.sh takes the fabric from platform/fabric.py (the case blocks are removed) and GPUS_PER_NODE from the platform.
    • cluster_verify_platform refuses nodes that don't match the named platform.
    • The connectors and the SGLang MoRI env read MAD_FABRIC_* from the launcher instead of one site's literal rails, GID and interface.
    • MORI_GPU_ARCHS=gfx942 is removed from the .env files.
  • Every value MAD derives is only a default: a value passed through config wins, and config.resolved.json records where it came from. passthrough_assert.sh covers each one.
  1. Topology spec v2 (230e511, c7a25ab)
  • New in the spec:
    • pools sized in GPUs on a platform, plus compute partitions;
    • role kinds: draft, encoder, embedding, kv_cache;
    • kv_format checked at the prefill→decode handoff;
    • a replicas parallel mode;
    • placement (same_domain / spread_domains), checked against scale-up domains.
  • Scheduler hints: --segment on SLURM; pod affinity on Kubernetes through k8s/submit.py.
  • v1 specs resolve exactly as before.
  1. Best-known configuration is the default run (8cb6b8b, af17152, 162b48b)
  • New perf/model.py: a roofline model and a layout search. --emit-spec writes the best layout as a v2 topology spec.
  • New perf/registry.py with record, best and promote.
  • perf/best_known.jsonl records are laid over the recipe by default, the same way in STANDALONE and madengine runs:
    • MAD_BEST_CONFIG=0 runs the recipe as written.
    • Config still wins.
    • The file ships empty, so today's runs are unchanged.
  1. New serving types and benchmarks (2b4d651, 1bab2a6, 7733d13, 88b72dc, 20ae121, 5189e82)
  • Speculative decoding (speculative:) and multi-LoRA (lora:) as role needs, mapped to each engine's flags.
  • REPLICAS=1 runs independent servers per node behind replica_router.py.
  • An embedding role.
  • New benchmarks: BENCHMARK_SCRIPT=accuracy, embeddings, lora.
  • serving_types.yaml lists what is runnable. A test holds it to what the launchers accept.
  1. Bring-up and submit-side checks (186b6f2, 8a1b430, a7ae3c2)
  • pins.py validate refuses pin sets for unknown GPUs.
  • recipe.py bringup --arch cdna5 reports what a new GPU still lacks.
  • recipe/precheck.py lets a submitter (madengine) refuse a recipe before it queues.
  • New doc on adding an accelerator, NIC, site, format or serving type as data.
  1. GPU-agnostic cards and end-to-end examples (855a843, 7fd810e)
  • 5 cards tagged any_gpu, for Kimi-K3 colocated and disaggregated. On gfx942 they run the same engine commands as their MI300X-named twins. The GPU-named cards are unchanged.
  • scripts/common/workloads/: a library of inherited workload layers (defaults:) for base, serving shapes, benchmarks and model families.
  • 8 e2e_example cards built on it: DeepSeek-V3 MTP and disaggregated quantization, Kimi-K3 NIAH and on Helios, Llama-405B TP8×PP2, Qwen3 replicas with LoRA, Qwen3 embeddings, and DeepSeek-R1 on SGLang. Documented in docs/e2e-examples.md.
  1. MAD runs a card's workload file without madengine (15024f7)
  • config/workload.py (standard library and PyYAML) reads MAD_CONFIG / mad-config.yaml. The launchers apply it at submit level, and k8s/submit.py uses it when madengine is absent.
  • A test checks that madengine's reader gives the identical environment.

Fixes found along the way:

  • In config_apply_recipe, a quoted python3 -c body dropped the recipe layer whenever a best-known record matched. check_srun_quotes now checks python3 -c bodies too.
  • The recipe check could add the same injected arguments twice. Fixed.
  • Launcher model allow-lists now follow recipe aliases.

Changes to existing cards' runs

  • The engine commands are unchanged for all 55 cards in all 5 dispatch modes.
  • The goldens change only in forwarded env:
    • -e MAD_FABRIC_* with the same values as the old literals;
    • -e MAD_RECIPE_FILE on the Kimi-K3-MXFP4 cards;
    • -e GPUS_PER_NODE on SGLang;
    • the duplicate MORI_GPU_ARCHS is removed.

Testing (offline; real-cluster runs follow)

  • Unit tests pass: recipe, topology, config, k8s, perf, pins, accuracy, replicas, embeddings, LoRA, workload.
  • Launcher assert suites pass: config layers 38, recipe check 29, platform 15, passthrough 15, and the rest.
  • Snapshots: 55 cards × 5 dispatch modes, 0 differ.
  • E2E examples pass on each target GPU, and they pass without madengine installed.
  • Pipeline path equivalence, STANDALONE vs MADENGINE: SLURM 67 cards and Kubernetes 67 × 2, both 0 mismatches.

Cemberk and others added 30 commits October 6, 2026 03:48
benchmarks-and-results documents STEP_TIMEOUT as the sweep's base per-cell
timeout, but run_xPyD_models.slurm never passed it to docker run, so a
submit-time value was dropped and every cell kept the 1800 s default. Cells
that queue behind a KV-bounded batch (many waves of long requests) need more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
benchmark_long_context.sh used its own rule, NUM_PROMPTS_FACTOR x concurrency with
a hard minimum of 16, and ignored BENCHMARK_PROMPTS_PER_CON / BENCHMARK_MIN_PROMPTS.
A run that set the sweep to 10 x concurrency (a fixed number of waves per cell)
still measured its 100k/1k cells at 4 x, so one run used two prompt rules.

NUM_PROMPTS_FACTOR now defaults to BENCHMARK_PROMPTS_PER_CON and the minimum to
BENCHMARK_MIN_PROMPTS; with neither set the defaults are unchanged (4, 16), and
NUM_PROMPTS_FACTOR still wins when given. bench_model_name_assert evaluates the
harness's own lines under each setting (5 new cases).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a preemptible partition, 5 of 12 vLLM disagg jobs failed because one GPU on one
node already held 40-67 GB when the job started: vLLM refused to start ("Free memory
on device cuda:5 (151.62/191.98 GiB) on startup is less than desired GPU memory
utilization") minutes in, or a server hung until the 4000 s start-up timeout, and
nothing said which node or what held the memory. The same nodes recurred.

vllm_disagg.sh now checks every GPU's used VRAM (sysfs, readable in the container)
before the container barrier. Above GPU_CLEAN_MAX_USED_GIB (default 4) the node
fails at once, naming the node, the GPU with its PCI address and the amount, prints
the existing GPU snapshot with the holding processes, and the peers stop through the
abort file. GPU_CLEAN_CHECK=0 skips it; both are forwarded by the batch script.

tests/gpu_clean_assert.sh runs the real functions against a fake /sys/class/drm
(10 cases); run_all.sh now runs every offline suite. Docs: vllm-disagg.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e container

Decode servers on both the TP and the wideEP path died mid-run of GPU faults
("Memory access fault by GPU node-6 ... Reason: Unknown" on 4 GPUs at once;
"HSA_STATUS_ERROR_MEMORY_APERTURE_VIOLATION" at c=512), and the logs said nothing
more: no kernel, no address, and the GPU core dump fails in the container
("GPU coredump: execvp failed"). Each server in vllm_disagg.sh now runs a watcher
that, once its log shows a fault, saves the kernel's amdgpu lines from dmesg (the
faulting engine, address and process; the container is privileged) and the GPU
memory snapshot to gpu_fault_NODE<n>.log.

run_xPyD_models.slurm passed only a fixed list of variables to docker run, so a
benchmark request's own env vars (ROCM_AITER_FA, HSA_NO_SCRATCH_RECLAIM) and debug
switches could not reach vLLM. CONTAINER_ENV lists further names; each becomes a
bare `-e NAME`, so values are taken from the batch environment unchanged.

tests/fault_capture_assert.sh (11 cases) runs the real code with a stub dmesg and a
fake sysfs; run_all.sh runs it. Docs: vllm-disagg.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b9fb740 started the watcher with this script's output still attached. The container
runs `vllm_disagg.sh 2>&1 | tee ...`, and tee only ends when every holder of the
pipe closes it, so after the sweep finished the watcher kept the container -- and
the SLURM job -- running until the wall clock: two debug jobs whose cells had passed
ran to their 4-hour limit.

The watcher now runs with stdin/stdout/stderr redirected (its notice goes to the
node's proxy log), its pid is recorded, and an EXIT trap kills every watcher when
the script ends. fault_capture_assert checks that the output pipe closes as soon as
the script exits and that the watcher is gone; against b9fb740 the pipe check fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… job

AITER builds each JIT module under a lock file in the persistent per-node cache
(/mnt/m2m_nobackup/$USER/vllm_jit_cache/<image>/aiter_jit/build/lock_<module>) and
every other worker waits for its holder. A job killed mid-build -- on a
preemptible partition that is routine -- leaves the lock, and the next job on the
node waits on it forever: all 8 decode workers sat on
lock_module_gemm_a8w8_blockscale ("waiting for baton release") with nobody
building, until the 4000 s start-up timeout failed the job.

Both launchers (run_xPyD_models.slurm, run_multinode.slurm share the cache code)
now remove those locks on each node before the container starts, saying which and
when they were left. On the default per-node cache every lock is stale at that
point (jobs are exclusive, nothing of ours runs yet); on a caller-set JIT_CACHE_HOST,
which may be shared, only locks older than JIT_LOCK_STALE_MIN (60) minutes go.
Compiled modules are kept.

tests/jit_lock_assert.sh runs both launchers' lines against a fake cache (13
cases, including that the two copies match); run_all.sh runs it. Docs updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…check passes

e73b30d removed stale AITER build locks from the batch script, on the host, as the
job's user. The locks are created by the container's root user, so on the cluster
that failed: "rm: cannot remove .../aiter_jit/build/lock_module_rmsnorm:
Permission denied". The cleanup (_clear_stale_jit_locks) now runs in the container,
before any server starts -- in vllm_disagg.sh and in vllm_multinode's
serve_colocated.sh, the same function in both -- and the batch scripts only pass
JIT_CACHE_HOST / JIT_LOCK_STALE_MIN in. Behaviour is otherwise unchanged: every lock
on the default per-node cache, only old ones on a caller-set (maybe shared) cache.

The pre-start GPU check printed nothing when it passed, so a job log could not show
whether it ran. It now prints "[gpu-check] <node>: N GPUs idle before start (most
used: X GiB ...)".

Tests: jit_lock_assert rewritten for the container function (18), gpu_clean_assert
+1. All offline suites pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On crs-spur, SGLang 0.5.20 (with MoRI v1.2.3, the pair that registers GPU memory on
the AINIC nodes) still failed to start:
- prefill: "unrecognized arguments: --prefill-round-robin-balance". e0f870b's gate
  looked for the flag's name in server_args.py; 0.5.20 still names it there but no
  longer accepts it.
- decode: "ambiguous option: --cuda-graph-bs could match --cuda-graph-bs-decode,
  --cuda-graph-bs-prefill". The recipes in models.yaml pass --cuda-graph-bs.
and the launcher then waited out its 4000 s timeout for servers that had exited.

sglang_compat.sh, sourced by both disagg launchers (MoRI and Mooncake), reads what
the installed sglang accepts from `python3 -m sglang.launch_server --help`, once:
--prefill-round-robin-balance only where accepted; --cuda-graph-bs passed as
--cuda-graph-bs-decode (the graphs it sized) where it was split; everything
unchanged if --help cannot be read. The MoRI launcher's fatal-start pattern now
includes argparse's "<prog>: error: ..." so a rejected command line fails the job
at once.

tests/prr_flag_assert.sh rewritten around fake 0.5.12/0.5.20 installs with real
argparse parsers (15 cases). Docs: sglang-disagg.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On crs-spur (MI355X, AINIC), SGLang 0.5.20 + MoRI-IO prefill died mid-run with
"Memory access fault by GPU node-3 ... Reason: Unknown" and "Fatal Python error:
Aborted" -- the same fault class as the vLLM MoRIIO decode faults on MI300X/CX7 --
and the SGLang launcher had nothing more to show. It now runs the vLLM launcher's
watcher, unchanged: after every server launch (both prefill paths and decode) it waits
for a fault in that server's log, then saves the kernel's amdgpu lines from dmesg and
the GPU memory snapshot to gpu_fault_NODE<n>.log, with its output kept off the
launcher's pipe and an EXIT trap that stops it.

tests/fault_capture_assert.sh (6 cases): the copy matches vllm_disagg.sh's, every
launch starts a watcher, a fault is captured with the kernel record, and the pipe closes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… MoRI v1.2.3 on gfx950

The Dockerfile always built the MI300X stack: sglang 0.5.12 (mi30x base) with MoRI
158c7e8. That MoRI registers GPU memory with ibv_reg_mr only, so on MI355X nodes with
AMD AINIC and no GPU peer-memory module (crs-spur) prefill aborted at registration
("errno 22"), and every working image there had to be built by hand with
BASE_DOCKER=rocm/sgl-dev:v0.5.20-rocm720-mi35x-20260924 INSTALL_MORI=0.

The stack now follows MAD_SYSTEM_GPU_ARCHITECTURE, which madengine and the CI already
pass: gfx942 keeps exactly the current base and pinned MoRI; gfx950 uses the sglang
0.5.20 MI355X base with its own MoRI v1.2.3 (dma-buf fallback), the pair that registers
on AINIC. BASE_DOCKER still overrides the base; INSTALL_MORI defaults to auto (1 on
gfx942, 0 elsewhere) and 1/0 still force it. The launchers already adapt to 0.5.20's
options (b9eddd2).

Checked with stand-in base images under BuildKit (Docker 29): default and gfx942 pick
the gfx942 stage with MoRI installed; gfx950 picks the gfx950 stage without; a
BASE_DOCKER override and INSTALL_MORI=1 are honoured. Docs: sglang-disagg.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jobs passed the pre-start GPU check with every GPU at 0 GiB, then failed a
minute later with "Free memory on device cuda:6 (147.57/191.98 GiB) on
startup is less than desired", and no log said what held the memory. The
container cannot tell: the kernel's per-process GPU records use host pids.

gpu_mem_trace.sh samples them from the host for the first 15 minutes of
each node's run: every GPU's total, and each holder's command line,
container and GiB per GPU, numbered as vLLM's cuda:<n>. It writes a sample
only when it changes, into LOG_PATH/gpu_mem_trace_<job>_NODE<rank>.log.
GPU_MEM_TRACE=0 turns it off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ter one

AITER builds a JIT module under two locks: its own, build/lock_<module>,
and torch's extension builder's, build/<module>/build/lock. A job killed
mid-build on 2026-10-09 left the inner one for module_rmsnorm on a node,
and on 2026-10-18 every decode worker there waited on it for 40 minutes
("waiting for baton release at .../module_rmsnorm/build/lock") with
nothing building. The cleanup before the servers start removed only the
outer locks. It now removes both, with the same age rule for a cache the
caller set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vLLM renames its workers ("VLLM::Worker_TP3") and the kernel then pads the
command line with spaces, which pushed each holder's GPU amounts 150
columns to the right in the trace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… master

A C3 job (2 prefill + 2 decode nodes, EP16) sat 70 minutes in start-up: one
decode worker on the second decode node failed ("Free memory on device
cuda:4 ... less than desired", "WorkerProc failed to start"), and the
other 15 EP ranks waited for it at MoRI's barrier. The start-up wait
watched only the master's log, and the pattern for a dead server had no
line that a data-parallel engine on a second node prints.

The wait now checks every prefill and decode log of the job for a dead
server, and the pattern includes vLLM's "WorkerProc failed to start" and
"WorkerProc initialization failed".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The case that adds a holder mid-trace changed it 1.5 s into a 3 s trace.
Each sample forks several tools, so on a loaded machine the sampler's last
iteration started after the change only sometimes, and the test failed 2
of 3 runs. Change at 0.5 s and trace for 5 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…read

The MoRIIO connector reads qp_per_transfer, num_workers and post_batch_size
only from kv_connector_extra_config. It logs VLLM_MORIIO_QP_PER_TRANSFER /
_NUM_WORKERS / _POST_BATCH_SIZE in the environment as "deprecated and
ignored" — checked in the vLLM of all three disagg images (shared, GLM-5.1
094820b5, Kimi-K3 862bfd8) and in the Kimi-K3 ref 206fffe. So the 2 QPs and
4 workers in moriio.env, the 4/4 defaults in moriio.sh and the values in
three recipes never took effect: every run, including 656 connector starts
in our DeepSeek-R1 runs and the standalone launcher the Kimi-K3 recipe was
tuned with, used the connector's defaults of 1 / 1 / -1.

The launcher now puts each of the three into kv_connector_extra_config when
its variable is set, as an integer, and forwards VLLM_MORIIO_POST_BATCH_SIZE
like the other two. The values that never took effect are removed from
moriio.env, moriio.sh and models.yaml, so the default config stays exactly
what the validated runs used. Docs and argv_assert cover it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For a multi-node slurm_multi job madengine records results only from the
card's multiple_results CSV, or from performance: lines, which these
launchers don't print. 17 of the 20 vllm_dissag cards and all 18
sglang_disagg cards declared none, so a madengine run of them recorded no
result at all: not SUCCESS, not FAILURE.

Every vllm_dissag and sglang_disagg card now declares
perf_<MODEL_NAME>.csv. The vllm_dissag launcher already publishes that file
into the job directory; the sglang_disagg launcher now does too, before its
FAILURE-row check, so failed cells reach madengine as well. argv_assert
checks all three catalogs (vllm_multinode's way-4 card takes MODEL_NAME from
its mad-config) and both launchers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The image's vLLM (raviguptaamd/vllm 862bfd8, 2026-08-11) predates four
fixes for requests sharing a decode batch (KDA state zeroed on recycle,
de-aliased KDA state index, MoRI-EP dispatch trimmed to valid tokens, all
KV group transfers awaited), which are in 206fffe (2026-09-13) with the
gfx942 int4-SiTU restore and the MoRI combine() fix. The single-request NIAH
cards don't show it. Moving to 206fffe also moves the base image, MoRI and
AITER, so it is left for a change with its own validation; the docs and the
Dockerfile say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It imported madengine from /home/madengine/src and read the cards from
/tmp/madtest/MAD_pr242, so it only worked on the machine it was written on.
It now finds this repo from its own location and imports madengine as
installed, or from MADENGINE_SRC. The partition is a placeholder, since
nothing is submitted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
madengine gives every Kubernetes pod imagePullSecrets dockerhub-rocm unless
k8s.secrets.image_pull_secret_names says otherwise, so a slurm_multi card
deployed through madengine and through submit.py differed in that one field.
submit.py now applies the same default; an explicit list, including [],
still wins. The fabric test's layouts are named after their NICs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It was added to find what took GPU memory between the pre-start check and
vLLM's start-up. It showed no process holding that memory: the driver's
free-memory figure was wrong on those nodes. As a diagnostic it should not run a
sampler on every node of every job, so it is off unless GPU_MEM_TRACE=1, and the
docs say what an empty trace means.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The docs' introduction said MAD is never run directly, but every multinode card
can be submitted with sbatch, run inside salloc, or submitted to Kubernetes with
scripts/common/k8s/submit.py. It now points to both. The sbatch section also
says where a direct run's results land and how its exit status is decided.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
benchmark/kimi_k3/mi300x/README.md and scripts/common/README.md only said their
content had moved to docs/. Neither existed on develop, so no old link needs
them. The links and comments that pointed to them now point to docs/kimi-k3.md
and docs/multinode-running.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
benchmark/kimi_k3/mi300x/README.md and scripts/common/README.md only said their
content had moved to docs/. Neither existed on develop, so no old link needs
them. The links and comments that pointed to them now point to docs/kimi-k3.md
and docs/multinode-running.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l PR

Verbatim copy of the consolidated AMD Dockerfile from the internal review,
added here only so the image_spec work below has a base to diff against.
It is dropped on rebase once the upstream sync of that PR lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cluster.sh exported PP_SIZE=1 when it was unset, and the colocated launcher
sources cluster.sh before it computes PP_SIZE=${PP_SIZE:-${NUM_NODES}}. So
that default never applied: a plain 2-node sbatch with no PP_SIZE got PP=1
and failed the TP*PP == GPUs check (8x1 != 16). The model cards were not hit
because they set PP_SIZE=2 themselves.

Nothing else reads PP_SIZE (parse_to_csv.py only records it when set, and
only the colocated container receives it), so cluster.sh no longer supplies
it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
benchmark_niah.py moved its max_tokens default to 8192 so reasoning models
are not cut off mid-trace, but benchmark_niah.sh still passed
NIAH_MAXTOK=${NIAH_MAXTOK:-2048}. No card sets it, so every run stayed at 2048.
The wrapper no longer sets it; a value passed by the caller still reaches the
script through the environment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The three launchers each ended the job their own way, and two of them lost
information doing it:

- vllm_dissag never read the status of its main srun, and the container
  command piped the run script through tee without pipefail. A node whose
  server died still ended the job COMPLETED whenever a CSV existed.
- sglang_disagg exited on a node's failure before publishing perf.csv, so
  madengine never saw the cells that had passed.

cluster_job_verdict (cluster.sh) is now the one ending: it publishes
perf.csv as perf_<MODEL_NAME>.csv in the job directory, then fails the job
when a node's container exited non-zero, when there are no results (unless
none were required, SGLang's SKIP_BENCHMARK=1), or when any row is FAILURE.
The vLLM disagg container command now keeps the run script's status
(set -o pipefail), and its srun status is passed to the verdict.

argv_assert.sh checked for the old copy line; it now checks that each
launcher calls the verdict with that destination.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ntainers

- Exit status: the srun body ended with `rm -f` of its env file, so srun
  always saw 0, and inside the container serve_colocated.sh was piped through
  tee without pipefail. The body now returns docker's status, the container
  command sets pipefail, and the job ends with cluster_job_verdict.
- Teardown: the trap that stops the containers was installed after the
  blocking srun returned, so a cancel during the run -- the case it exists
  for -- left the containers holding the GPUs. It is installed before srun,
  which now runs in the background so a TERM is handled when it lands.
- Barrier port: the body freed port 2223 with `fuser -k`, killing whatever
  another job on a shared node had listening there. The port is now one per
  job (20000 + job id mod 9000), passed as CONTAINER_BARRIER_PORT.
- Env: only COLOCATED_FORWARD_ENV names reached the container. Fabric
  settings now follow the SGLang launcher's rule (everything the caller
  passed; on ainic / thor2 also what cluster.sh derived), and with a MoRI
  all2all backend connectors/moriio.env is forwarded as the disagg launcher
  does it: a submit-time value wins, MORI_GPU_ARCHS follows the detected GPU.

common/tests/launcher_verdict_assert.sh runs the launcher against stand-in
srun / docker and checks each of these, plus cluster_job_verdict itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cemberk and others added 19 commits November 24, 2026 15:57
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aders say MAD patch

verify.py imported the pins module that the move to compat/ removed, so
nothing checked that upstream + carried patches == the validated fork
trees. It now reads every source build in compat/rocm.yaml that carries
patches and a fork_commit, checks each patch's recorded sha256, and
applies them to the upstream commit (all five builds: upstream + patches
== fork). --offline does the checks that need no network, and the
offline suite runs it. The patch headers no longer call themselves
pin-set patches; their recorded sha256 values follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vllm-mori121 and vllm-glm51 give a base for gfx942 only, so on an MI355X
host madengine's detected arch made the build fail. These cards now say
so (skip_gpu_arch: gfx950), as the Kimi-K3 MI300X cards already do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The harness sets USER=t, but the disagg launchers take USER_NAME from
whoami, so the cases recorded USER_NAME=root and every case differed for
a non-root user. stubs/whoami answers the harness user; cases
re-recorded (USER_NAME=t).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… of waiting until wall time

Under spur-array and k8s-indexed, rank 0 waited for every rank's run
status with no limit, and only an abort file ended the wait. A task
killed by SIGKILL, OOM, preemption, eviction or a lost node publishes
neither. Each rank now keeps a heartbeat counter while its step runs
(detached, so a node program's bare wait does not wait for it; it stops
when its task's shell is gone); rank 0 ends the run with the rank's name
once a missing rank's counter has not changed for
MAD_RENDEZVOUS_HEARTBEAT_TIMEOUT (default 300 s), timed on its own clock
so clock skew between nodes does not matter. dispatch_assert covers a
killed rank and a rank that runs longer than the timeout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at exists

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With MAD_GPU_ARCH unset (a failed probe), the gate only warned, and a
recipe with variants then got its default variant: an any_gpu Kimi-K3
card on an MI355X ran the gfx942 int4 conversion. The gate now refuses
when the model's recipe (through its aliases) has different settings per
GPU, saying to set MAD_GPU_ARCH or RECIPE_CHECK=0; a recipe without
variants, or an alias that pins its arch, warns and runs as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…every current GPU

The e2e_example cards carried vllm_disagg / sglang_disagg /
vllm_multinode, so --tags sweeps picked them up (and built and submitted
the Helios demo, which every GPU that exists refuses). They keep
e2e_example, reproduction or demo, and any_gpu; the Helios card skips
gfx942 and gfx950.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the harness's)

cluster_socket_ifname takes the site's interface when CLUSTER_SYSFS_NET
has it, else the host's default-route interface, so on a host with only
eth0 the guide's two site-profile tests failed. The harness now gives
every run an interface tree with the catalog's names (eth0, eno0, fenic0)
and an ip stand-in with one fixed default route. Cases unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y the GPU that runs

With neither MAD_ENGINE_BUILD nor MAD_IMAGE_COMPONENTS, roles resolved
against the first catalog build that fits, with only a note; it is now a
WARN that the image that runs may be another. min_gpu_memory_gb was
compared with the largest product of the arch (an MI300X passed a 200 GB
requirement as an MI325X); it now uses the platform's product, else the
probed MAD_GPU_MEMORY_BYTES, else the smallest product.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ROCm#242-ROCm#300 review fixes. cluster.sh keeps this branch's site profiles
with the site-defaults note; moriio.sh's MoRI-IO TP path stops on a bad
kv config and keeps GPUS_PER_NODE. Cases re-recorded: container labels,
USER_NAME from the whoami stand-in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Qwen3-32B SGLang example no longer sets USE_CX7_NICS=1: the card it
reproduces is back on develop's value, and the example inherits it like
the card. argv_assert's bad-kv-config check passes the fabric env as the
other cells do (connectors here require MAD_FABRIC_*).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With WIDE_EP=1 the pyt_vllm_disagg_nixl_deepseek-* cards resolve to
rixl + DeepEP (DeepSeek is wide-EP only), but their perf rows were
labelled nixl because the parser looked only at RUN_DEEPEP. The parser
now labels the EP backend the run resolved (WIDE_EP + EP_BACKEND), and
the three cards carry the deepep tag beside nixl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… differed there)

node_rdma_mounts mounts the host's libibverbs/libmlx5/... when present,
so on a machine with rdma-core installed (the GitHub runner) 13 cases
differed. Where it looks is now a parameter (CLUSTER_RDMA_LIBDIR,
CLUSTER_RDMA_CONFDIR; default the real paths), as CLUSTER_SYSFS_IB is,
and the harness points both at an empty directory. Cases unchanged;
with a fake library tree the mount appears, so the parameter is honoured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Cemberk

Cemberk commented Nov 30, 2026

Copy link
Copy Markdown
Author

Thanks. The blocker is fixed (3db853f), both suggestions are done (4542c95 tags, 336d004 host network), and so are the two recipe.py notes (e32bfb3). The review fixes from #242–#300 are merged in (08bbcc7, with f22a153: the Qwen3-32B SGLang example follows its card back to develop's USE_CX7_NICS). The PR description is updated (no MAD_PIN_SET/PINS/pins.py; images come from image specs, and MAD_IMAGE_COMPONENTS carries the image's builds).

recipe.py:290 and :373: Both done in e32bfb3:

  • When no build reaches the run, the note is now WARN: the image's own build is unknown (…): resolves with <build>…; the image that runs may be another.
  • min_gpu_memory_gb uses the platform's product, else the probed MAD_GPU_MEMORY_BYTES when the run has it, else the smallest product of the arch.
  • test_recipe.py covers all three, and the build warning.

Cemberk and others added 6 commits December 1, 2026 13:43
…tegration

ROCm#313 moves multi-node MoRI-IO from router flags to peer hosts in the
connector config. Its multi-node path is taken as is; TP-within-EP
(EP_TP_SIZE>1, Kimi-K3) keeps its validated pod-host list and
--moriio-dp-size router path, and gets no remote_hosts. The master keeps
the api-server-count clamp and the TP-within-EP offload world, and gains
develop's --enable-scale-out. argv_assert: both sides' tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings develop's ROCm#313. Its peer hosts in kv_connector_extra_config apply
where the multi-node layout does (DeepSeek-V4, or MORIIO_MULTINODE=1),
as develop's earlier layout did here; other cards keep master-node
ranks (their images predate vLLM #65098, which the keys need). The
connector config keeps the opt-in transfer tuning and read_mode;
masters gain --enable-scale-out and keep the kv-config exit. Develop's
2P2D peer-host tests opt in with MORIIO_MULTINODE=1, and one more holds
DeepSeek-V3's default layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings develop's ROCm#313 (through ROCm#242 and ROCm#299). The per-node body lives
in node.sh here, so ROCm#313's MORI_PROXY_PING_PORT forward is added there;
the connector config keeps this branch's router address and gains the
peer hosts; the forward checks read node.sh too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings develop's ROCm#313 through ROCm#242, ROCm#299 and ROCm#300.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fabric env

Connectors here require MAD_FABRIC_* from the launcher; _argv_node and
_argv_so (from ROCm#313) now pass it as the other helpers do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d forwarded ping port

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings December 1, 2026 15:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The benchmark wrappers discard Python exit statuses, allowing a harness failure after partial success to leave an incomplete run that still passes.

5 open issues
What changed in this PR

This PR builds on the dispatcher and image-spec work in #300 and #295 to make MAD inference workloads portable across GPU platforms. Recipes describe model requirements, while shared configuration supplies hardware, serving topology, and benchmark settings.

Changes:

  • Adds declarative image stacks, platform profiles, recipe checks, and topology examples.
  • Introduces reusable workload layers, replica serving, and accuracy, embedding, and LoRA benchmarks.
  • Expands offline validation, launcher diagnostics, and documentation.
File Description
tools/​validation/​model_config_validator.py Validates image-spec references and component selections.
scripts/​vllm/​models.json Adds an image-spec-backed vLLM card.
scripts/​vllm/​image_spec.yaml Defines the opt-in vLLM stack.
scripts/​vllm_multinode/​workloads/​e2e/​qwen3-embedding-replicas.yaml Demonstrates embedding replicas.
scripts/​vllm_multinode/​workloads/​e2e/​qwen3-32b-replicas-lora.yaml Demonstrates replica serving with LoRA.
scripts/​vllm_multinode/​tests/​test_replicas.py Tests replica routing and GPU assignments.
scripts/​vllm_multinode/​mad-config.kimi-k3.yaml Expresses Kimi-K3 settings as layered configuration.
scripts/​vllm_dissag/​workloads/​e2e/​llama-405b-disagg.yaml Adds a Llama NIXL workload example.
scripts/​vllm_dissag/​workloads/​e2e/​kimi-k3-helios.yaml Demonstrates Helios placement requirements.
scripts/​vllm_dissag/​workloads/​e2e/​kimi-k3-disagg-niah.yaml Adds GPU-adaptive Kimi-K3 retrieval benchmarking.
scripts/​vllm_dissag/​workloads/​e2e/​deepseek-v4-pro-validate.yaml Defines DeepSeek-V4-Pro validation settings.
scripts/​vllm_dissag/​workloads/​e2e/​deepseek-v4-flash-validate.yaml Defines DeepSeek-V4-Flash validation settings.
scripts/​vllm_dissag/​workloads/​e2e/​deepseek-v3-mtp.yaml Demonstrates speculative decoding configuration.
scripts/​vllm_dissag/​workloads/​e2e/​deepseek-v3-dq.yaml Demonstrates per-role quantized checkpoints.
scripts/​vllm_dissag/​workloads/​e2e/​best_known.example.jsonl Provides an illustrative configuration record.
scripts/​vllm_dissag/​tests/​test_lora.py Tests LoRA requests and result parsing.
scripts/​vllm_dissag/​tests/​test_embeddings.py Tests embedding responses and result parsing.
scripts/​vllm_dissag/​tests/​test_accuracy.py Tests accuracy scoring and failure reporting.
scripts/​vllm_dissag/​tests/​run_all.sh Expands the shell assertion suite.
scripts/​vllm_dissag/​tests/​gpu_clean_assert.sh Tests pre-launch GPU memory checks.
scripts/​vllm_dissag/​tests/​gate_check.sh Covers DeepSeek tensor-parallel admission.
scripts/​vllm_dissag/​tests/​drive_cell.sh Forwards additional benchmark and diagnostic settings.
scripts/​vllm_dissag/​tests/​bench_model_name_assert.sh Checks served names and prompt-count settings.
scripts/​vllm_dissag/​run_wideep.sh Clarifies the DeepSeek-V4 image error message.
scripts/​vllm_dissag/​replica_router.py Adds round-robin HTTP replica routing.
scripts/​vllm_dissag/​parallelism.sh Requires an explicit GPU count.
scripts/​vllm_dissag/​niah_score.py Corrects the live harness name in a comment.
scripts/​vllm_dissag/​gpu_mem_trace.sh Adds host-side GPU memory diagnostics.
scripts/​vllm_dissag/​connectors/​rixl.env Removes the fixed MoRI GPU architecture.
scripts/​vllm_dissag/​connectors/​moriio.env Removes fixed architecture and unused transfer defaults.
scripts/​vllm_dissag/​benchmark_xPyD.sh Fixes model naming, parser paths, and prompt controls.
scripts/​vllm_dissag/​benchmark_niah.sh Selects the appropriate NIAH harness and served name.
scripts/​vllm_dissag/​benchmark_lora.sh Adds the LoRA benchmark wrapper.
scripts/​vllm_dissag/​benchmark_lora.py Measures requests across LoRA adapters.
scripts/​vllm_dissag/​benchmark_long_context.sh Adds configurable prompt counts and CSV publication.
scripts/​vllm_dissag/​benchmark_embeddings.sh Adds the embedding benchmark wrapper.
scripts/​vllm_dissag/​benchmark_embeddings.py Measures embedding throughput and latency.
scripts/​vllm_dissag/​benchmark_agentic.sh Publishes agentic results to performance CSV.
scripts/​vllm_dissag/​benchmark_accuracy.sh Adds the accuracy benchmark wrapper.
scripts/​vllm_dissag/​benchmark_accuracy.py Scores task sets through a chat endpoint.
scripts/​vllm_dissag/​accuracy_tasks/​arith_smoke.jsonl Supplies arithmetic smoke-test tasks.
scripts/​sglang_disagg/​workloads/​e2e/​qwen3-32b-sglang.yaml Adds a Qwen MoRI-IO workload example.
scripts/​sglang_disagg/​workloads/​e2e/​deepseek-r1-sglang.yaml Adds a DeepSeek-R1 expert-parallel example.
scripts/​sglang_disagg/​tests/​mori_env_assert.sh Tests connector defaults and override precedence.
scripts/​sglang_disagg/​tests/​forward_env_assert.sh Checks forwarded fabric and GPU settings.
scripts/​sglang_disagg/​tests/​fault_capture_assert.sh Tests GPU fault capture.
scripts/​sglang_disagg/​socket_barrier.py Adds timeout, abort-file, and bind-failure handling.
scripts/​sglang_disagg/​sglang_compat.sh Adapts flags to installed SGLang options.
scripts/​sglang_disagg/​set_env_vars.sh Removes the legacy environment script.
scripts/​sglang_disagg/​models.yaml Declares role formats and updates graph sizes.
scripts/​sglang_disagg/​connectors/​mori.env Centralizes in-container MoRI defaults.
scripts/​sglang_disagg/​benchmark_xPyD.sh Fixes iteration expansion and prompt-count logging.
scripts/​sglang_disagg/​benchmark_agentic.sh Publishes agentic results to performance CSV.
scripts/​large-ep-benchmark/​models.json Adds explicit node and scheduler resources.
scripts/​kvcache_transfer_bench/​models.json Adds an image-spec-backed transfer benchmark.
scripts/​kvcache_transfer_bench/​image_spec.yaml Defines pinned transfer-backend builds.
scripts/​dummy/​models.json Adds a minimal image-spec example.
scripts/​common/​workloads/​serve/​vllm-disagg-wide-ep.yaml Defines reusable vLLM wide-EP settings.
scripts/​common/​workloads/​serve/​vllm-disagg-nixl.yaml Defines reusable NIXL serving settings.
scripts/​common/​workloads/​serve/​sglang-disagg-mori-io.yaml Defines SGLang MoRI-IO serving settings.
scripts/​common/​workloads/​serve/​sglang-disagg-dp-ep.yaml Defines SGLang data/expert-parallel settings.
scripts/​common/​workloads/​serve/​replicas.yaml Defines independent replica settings.
scripts/​common/​workloads/​family/​kimi-k3.yaml Shares Kimi-K3 storage requirements.
scripts/​common/​workloads/​family/​deepseek-v4.yaml Shares DeepSeek-V4 runtime and benchmark settings.
scripts/​common/​workloads/​family/​deepseek-v3.yaml Shares DeepSeek-V3 serving defaults.
scripts/​common/​workloads/​bench/​validate.yaml Selects the combined validation sequence.
scripts/​common/​workloads/​bench/​sweep.yaml Selects throughput sweeps.
scripts/​common/​workloads/​bench/​niah.yaml Defines retrieval benchmark settings.
scripts/​common/​workloads/​bench/​lora.yaml Defines LoRA benchmark settings.
scripts/​common/​workloads/​bench/​embeddings.yaml Defines embedding benchmark settings.
scripts/​common/​workloads/​bench/​accuracy.yaml Defines accuracy benchmark settings.
scripts/​common/​workloads/​base.yaml Enables recipe checks and best-known defaults.
scripts/​common/​verify_both_paths_generate.py Checks standalone and madengine launcher generation.
scripts/​common/​topology/​tests/​test_serving_types.py Checks serving examples against launcher support.
scripts/​common/​topology/​specs/​vllm_disagg_2p2d_wide_ep_tp2.json Defines a four-node wide-EP layout.
scripts/​common/​topology/​specs/​vllm_disagg_2p2d_wide_ep_tp2_router_node.json Adds a dedicated-router layout.
scripts/​common/​topology/​specs/​vllm_colocated_2n_tp8_pp2.json Defines a two-node pipeline-parallel layout.
scripts/​common/​topology/​specs/​v2/​speculative_draft.json Illustrates a separate draft-model pool.
scripts/​common/​topology/​specs/​v2/​multimodal_encoder.json Illustrates encoder disaggregation.
scripts/​common/​topology/​specs/​v2/​mi355x_cpx_multitenant.json Illustrates partitioned multi-tenant serving.
scripts/​common/​topology/​specs/​v2/​hetero_prefill_decode.json Illustrates heterogeneous role platforms.
scripts/​common/​topology/​specs/​v2/​helios_wide_ep72.json Defines rack-scale expert-parallel pools.
scripts/​common/​topology/​specs/​v2/​helios_tp8_server.json Defines a server spanning two Helios trays.
scripts/​common/​topology/​specs/​v2/​embedding_server.json Defines an embedding replica topology.
scripts/​common/​topology/​specs/​sglang_disagg_1p2d_dp_ep.json Defines SGLang data/expert-parallel pools.
scripts/​common/​topology/​specs/​sglang_disagg_1p1d_tp8_router_node.json Defines SGLang serving with a dedicated router.
scripts/​common/​topology/​apply.sh Applies topology settings to launcher environments.
scripts/​common/​tests/​test_check_srun_quotes.py Tests shell and embedded-Python quoting checks.
scripts/​common/​tests/​snapshot/​stubs/​whoami Makes snapshot user identity deterministic.
scripts/​common/​tests/​snapshot/​stubs/​srun Simulates ordered per-node execution.
scripts/​common/​tests/​snapshot/​stubs/​scontrol Simulates scheduler hostname expansion.
scripts/​common/​tests/​snapshot/​stubs/​rocm-smi Stubs AMD GPU management calls.
scripts/​common/​tests/​snapshot/​stubs/​nvidia-smi Stubs NVIDIA GPU management calls.
scripts/​common/​tests/​snapshot/​stubs/​ip Supplies deterministic network information.
scripts/​common/​tests/​snapshot/​stubs/​hostname Supplies deterministic node addresses.
scripts/​common/​tests/​snapshot/​stubs/​fuser Stubs process-cleanup calls.
scripts/​common/​tests/​snapshot/​stubs/​docker Records container arguments and simulates results.
scripts/​common/​tests/​snapshot/​stubs/​amd-smi Stubs AMD management calls.
scripts/​common/​tests/​snapshot/​cases/​vllm_dissag/​pyt_e2e_deepseek-v3_dq.json Records an unsupported-recipe rejection.
scripts/​common/​tests/​run_offline.sh Collects offline checks into one entry point.
scripts/​common/​tests/​platform_assert.sh Tests platform verification and site profiles.
scripts/​common/​tests/​passthrough_assert.sh Tests explicit configuration precedence.
scripts/​common/​tests/​launcher_lib_assert.sh Tests node selection, execution, and verdicts.
scripts/​common/​serving_types.yaml Catalogs serving types and implementation support.
scripts/​common/​recipe/​precheck.py Adds submit-side recipe compatibility checks.
scripts/​common/​platform/​platform.py Resolves platform and site defaults.
scripts/​common/​perf/​models.yaml Supplies performance-model architecture data.
scripts/​common/​perf/​best_known.jsonl Defines the initially empty best-known registry.
scripts/​common/​k8s/​tests/​test_shim.py Tests Kubernetes command shims.
scripts/​common/​config/​tests/​test_recipe_layer.py Tests recipe-layer precedence through launchers.
scripts/​common/​config/​advise.py Advises on recipe and card generalization.
scripts/​common/​check_gpu_arch_declarations.py Checks card and recipe architecture consistency.
scripts/​common/​check_continuations.py Detects comments that break shell continuations.
README.md Documents declarative image specifications.
models.json Retains the empty root registry.
docker/​sglang_disagg_inference.ubuntu.amd.Dockerfile Removes the Dockerfile replaced by an image spec.
docker/​patches/​aiter/​gqa64.patch Carries the gfx942 attention fallback patch.
compat/​sites/​README.md Documents external site profiles.
compat/​sites/​example-slurm-mi355x-ainic.yaml Adds an MI355X/AINIC site example.
compat/​sites/​example-slurm-mi300x-cx7.yaml Adds an MI300X/CX7 site example.
compat/​images/​vllm-per-gpu.yaml Composes GPU-specific vLLM stacks.
compat/​images/​vllm-mori121.yaml Defines the MoRI 1.2.1 inference stack.
compat/​images/​vllm-kimi-k3.yaml Defines the dual-architecture Kimi-K3 stack.
compat/​images/​vllm-glm51.yaml Defines the patched GLM-5.1 stack.
compat/​images/​vllm-dsv4.yaml Defines the DeepSeek-V4 image stack.
compat/​images/​sglang-disagg.yaml Defines architecture-specific SGLang images.
compat/​images/​README.md Documents shared image-spec composition.
compat/​images/​di-vllm.yaml Defines common vLLM image prerequisites.
benchmark/​kimi_k3/​README.md Links MI300X users to multinode recipes.
AGENTS.md Documents image specs as Dockerfile alternatives.
.gitignore Tracks fixtures and ignores generated image files.
.github/​workflows/​mad-validate.yml Adds offline launcher validation to CI.
.dockerignore Excludes Python caches from build contexts.
.claude/​skills/​mad-generate-dockerfile/​SKILL.md Updates documented image reference sources.
.claude/​skills/​mad-generate-dockerfile/​scripts/​render_dockerfile.py Reads default base images from image specs.

Review effort: Balanced

Comment on lines +25 to +30
python3 "${DIR}/benchmark_accuracy.py" 2>&1 | tee -a "${LOG}"

python3 "${DIR}/parse_to_csv.py" "${LOG}" --accuracy \
--perf-csv "/run_logs/${SLURM_JOB_ID}/perf.csv" \
--model-name "${MODEL_NAME}" 2>&1 | tee -a "${LOG}"
echo "accuracy results -> ${LOG}"
Comment on lines +40 to +41
if env.get("MAD_IMAGE_COMPONENTS"):
argv += ["--image-components", env["MAD_IMAGE_COMPONENTS"]]
done
[ -f docker/patches/verify.py ] && run "docker/patches/verify.py --offline" python3 docker/patches/verify.py --offline
[ -f scripts/vllm_dissag/tests/run_all.sh ] && run "vllm_dissag offline suites" bash scripts/vllm_dissag/tests/run_all.sh
for d in scripts/common/*/tests; do
Comment on lines +17 to +22
_sgl_options() {
if [ -z "${_SGL_HELP+x}" ]; then
_SGL_HELP="$(python3 -m sglang.launch_server --help 2>/dev/null)"
fi
printf '%s' "$_SGL_HELP"
}
Comment on lines +352 to +354
if not isinstance(spec, (str, dict)):
self.errors.append(f"image_spec must be an object or a ${{...}} reference, got {type(spec).__name__}")
return
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.

3 participants