Skip to content

ATOM P2: ship MI325X lab-validated configs and drop engine-blocked models - #381

Merged
hnimra-amd merged 36 commits into
mainfrom
hnimrama/atom_p2
Sep 9, 2026
Merged

hnimra-amd merged 36 commits into
mainfrom
hnimrama/atom_p2

Conversation

@hnimra-amd

@hnimra-amd hnimra-amd commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

This is the ATOM P2 slice for cvs run atom. I aligned the suite with how we actually run on MI325X (family mi3xx config stems, platform mi325x thresholds, models mounted at /models), then cut stems that could not finish /health in lab so we do not ship configs we know will fail.

Shipped ATOM JSON is MI325X-only on purpose; MI300X / MI355X stems come later.

Merged current main (merge commit, not a rebase). For cvs/lib/report/cell_build.py I kept main.

Shipped ATOM stems

  • Native: DeepSeek R1 FP8 (single + distributed), Qwen3.5-397B FP8 single
  • Parity in the atom suite (serving schema): atom_vllm R1 FP8 + GPT-OSS 120B MXFP4; atom_sglang R1 FP8 (single + distributed)

Every shipped ATOM config has enforce_thresholds: falsecoverage, not a gate. Native ATOM still injects --enforce-eager (except DeepSeek V4), so we do not FAIL pytest on throughput numbers that were not taken under that flag. Threshold JSON is still present for reports.

Not in this PR (failed /health in lab; not listed in ATOM docs)

  • Native GPT-OSS MXFP4 (AITER MoE)
  • GPT-OSS atom_sglang (aiter / gfx942 on the SGLang image)
  • GLM-5.1 native (Triton compile abort)
  • MiniMax-M3 (aiter JIT gap; ATOM-vLLM processor gap)
  • Mistral Large 3 ATOM (native Hugging Face AutoConfig needs model_type; vLLM 0.23 still dies in MistralCommonPixtralProcessor at init)
  • Native DeepSeek V4 Pro (rc3 loaded deepseek_v4 as v3 then LLVM abort; atom-dev /health never confirmed). Same bar as Mistral: stem waits. cvs run vllm V4 JSON under inference/vllm/ is a different suite.

Runtime / suite fixes that unblocked lab runs

  • Infer gpu_arch from the config filename
  • Convert serving-schema configs at collection time so pytest parametrization works
  • Launch vLLM as python3 -m vllm.entrypoints.cli.main (no vllm console script on ATOM images)
  • Fail warmup immediately on safetensors / engine-core / ModuleNotFoundError
  • Smoke JSON and HTML table fixes for thinking models and non-float metrics

Test plan

  • Lab: R1 FP8 native, Qwen FP8 native, GPT-OSS atom_vllm on MI325X
  • Confirm native GPT-OSS, SGLang GPT-OSS, GLM-5.1, MiniMax, ATOM Mistral, native V4 Pro do not belong in this PR
  • make fmt-check lint ut on the branch

Comment thread docs/how-to/run-atom-benchmarks.rst Outdated
Comment thread docs/reference/configuration-files/configure-config.rst Outdated

@cijohnson cijohnson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think you need to rebase your branch from main

Comment thread cvs/input/config_file/inference/atom/mi3xx_atom_minimax-m3_threshold.json Outdated
Comment thread cvs/input/config_file/inference/atom/mi35x_atom_glm-5.1_single.json
@hnimra-amd
hnimra-amd marked this pull request as draft September 1, 2026 20:59
…s only.

Use platform-specific mi325x stems (lab-validated on MI325X), aligned threshold cell keys (PP=, bare metrics), and Sphinx docs without local inference markdown drafts.
Rename ATOM variant JSON files to mi3xx family stems while keeping platform-specific mi325x threshold files. Run ruff format on atom_config_loader and its unit tests to satisfy CI fmt-check.
@hnimra-amd
hnimra-amd marked this pull request as ready for review September 1, 2026 21:34
Drop redundant gpu_arch from shipped mi3xx configs; load_variant derives it from the {gpu}_atom_* stem with optional JSON override.
Extend schema v2 stems with perf, vllm, and sglang profiles including acc_warmup and accuracy suites, rename and align mi325x threshold files per profile, and update the config loader, unit tests, and how-to docs.
Export METRIC_UNITS for the atom run-deck profile, register --config_profile on the pytest CLI, and fix the invalid BrokenPipeError filterwarnings entry for pytest 9.
MiniMax and MiMo need block-size 128 and compile-disabled startup flags on openai_server; atom_orch now defaults enforce-eager for native atom driver. Remove GLM 5.1 ATOM variant files that fail on rc3 in lab.
Add atom_serving_config bridge and rename parity configs to atom_vllm/atom_sglang stems under the atom suite.
Re-add W2 mi3xx_atom_vllm_gpt-oss-120b_mxfp4_single with thresholds and pass platform/long_context_accuracy through the serving bridge.
Restore W2 mi3xx_atom_sglang_gpt-oss-120b_mxfp4_single with mi325x thresholds in the unified serving schema.
Convert sweeps/runs configs at pytest collection time so inference parametrization runs, and ship mi3xx native V4 Pro single-node stems for 112 lab validation.
Required by AtomVariantConfig validation; add loader unit test for the W5 longctx stem.
ROCm atom images expose vLLM as a Python package without a vllm console script on PATH; use python3 -m vllm.entrypoints.cli.main for serve and bench.
Use in-container /models for HF_HUB_CACHE and changeme-models-mount:/models:ro so lab nodes can bind it-share without hardcoding /home/models.
prj2 rc3 loaded the tree as v3 and LLVM-aborted; atom-dev was never grepped green. Same bar as Mistral: do not ship a known-red config.
An empty prefix made startswith always true, so structured-output checks skipped JSON validation for all models.
Skip the book JSON check only when the served model id matches a reasoning marker, not because the body looks like thinking.
Eager stays only when the variant JSON sets it. Drop the unused DeepSeek V4 helper.

@solaiys solaiys left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review: blocking issues

Shipped native / vLLM-parity stems load and the serving-schema conversion matches the packaged vLLM JSON. Native ATOM no longer auto-injects --enforce-eager (covered by unit tests); vLLM parity configs still set it in serve_args. enforce_thresholds: false is consistent with record-only P2.

One blocker on the shipped SGLang distributed stem: container launch will crash before docker runs.

🔴 SGLang distributed container.runtime.args.env crashes Docker launch

serving_to_atom_variant_raw copies the serving container block through unchanged, including runtime.args.env. DockerRuntime._build_runtime_args then does for key, value in env_vars on that dict, which raises ValueError: too many values to unpack while building docker run.

I reproduced the unpack crash on the dict from mi3xx_atom_sglang_deepseek-r1_fp8_distributed.json. Native/vLLM stems do not hit this because they put env on roles.server.env / server_params.env only.

Even if that loop were fixed to .items(), the values ("<changeme> rdma0,...", "<changeme> eno0") must not be passed as docker -e — ATOM already strips NCCL_IB_HCA / socket IFNAME from roles.server.env and discovers fabric at runtime.

Fix: after lifting container.runtime.args.env into roles.server.env (already done), drop env from a deep-copied container runtime.args so it never reaches DockerRuntime. Move keepers (SGLANG_USE_AITER, NCCL_IB_GID_INDEX, NCCL_DEBUG) to server_params.env and delete the placeholder NCCL device/IFNAME entries. Add a unit test that loads the distributed SGLang JSON and asserts variant.container.runtime.args has no env.

Comment thread cvs/lib/inference/atom/atom_serving_config.py
Lift keepers onto server_params.env, drop placeholder NCCL device/IFNAME docker -e values, and treat empty runs as the full sweeps list.

@amd-droy amd-droy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good to me. Thanks Humna.

@solaiys solaiys left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The SGLang distributed Docker-env crash is addressed on 65fb746:

  • serving_to_atom_variant_raw deep-copies the container block, lifts env, then pops runtime.args.env so DockerRuntime never unpacks that dict
  • keepers (SGLANG_USE_AITER, NCCL_IB_GID_INDEX, NCCL_DEBUG) are on server_params.env; placeholder NCCL HCA/IFNAME docker -e values and hca_id_prefix are gone
  • test_load_atom_sglang_distributed_drops_container_runtime_env covers the launch invariant; empty runs: [] expands to the 16 sweep cells

LGTM from my side.

Please also get approval from Ignatious (@cijohnson) before merging — his earlier CHANGES_REQUESTED is still on the PR.

Comment thread cvs/input/config_file/inference/atom/mi3xx_atom_deepseek-r1_fp8_distributed.json Outdated
Comment thread cvs/input/config_file/inference/atom/mi3xx_atom_deepseek-r1_fp8_distributed.json Outdated
Comment thread cvs/input/config_file/inference/atom/mi3xx_atom_deepseek-r1_fp8_distributed.json Outdated
Comment thread cvs/input/config_file/inference/atom/mi3xx_atom_deepseek-r1_fp8_distributed.json Outdated
"sweep": {
"_comment": "Combo-key runs of ISL, OSL, TP, PP, and CONC, comma-separated. Each listed run must exist in the threshold JSON. If this field is empty, every run in the threshold JSON is used.",
"runs": []
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

After sweeps {}
why do we need sweep { } with runs[ ] list ?
any reason?
we can have direct runs[ ] list itself right?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed. Dropped the extra sweep wrapper. Sweeps holds the catalog and runs is a top level list. Empty runs means all sweeps cells.

@hnimra-amd
hnimra-amd merged commit 9af87c7 into main Sep 9, 2026
2 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.

4 participants