Repository navigation
multinode: ATOM backend and atomesh router (provided + generated P/D) - #650
Open
zhaoan12-prc wants to merge 4 commits into
Open
zhaoan12-prc wants to merge 4 commits into
zhaoan12-prc wants to merge 4 commits into
Conversation
A Hyperloom node_state.json with backend=atom was refused at the first check (engine_facts knew only sglang and vllm), and an ATOM P/D pair could not have been profiled or torn down. This lets the DeepSeek-R1 1P1D case in ATOM's own pd_disaggregation_guide.md (two nodes, TP8/TP8, Mooncake, atomesh in front) go through the provided-mode path. Recognising ATOM: - engine_facts: an ATOM command's HTTP port is --server-port (8000 when absent); --port is the engine's internal port and never the HTTP port. The PD role is read from --kv-transfer-config like vllm's. - structural flags the command owns now include --server-port and --port. - teardown and health: atom.entrypoints.openai_server, the ATOM::<name> process titles ATOM gives its engine children (setproctitle), and `atomesh launch`; a defunct ATOM:: child counts as a dead engine. - SW_PACKAGES: ranks must agree on the atom version. - replicas of one role may differ in their HTTP port. Profiling ATOM engines: - ATOM writes <dir>/rank_<N>/<name>.pt.trace.json.gz (dp<D>_tp<N> under DP) and names no rank in the file, so the gate reads the rank from the directory and looks one level down. - /start_profile takes no body: its directory is fixed at launch. Under PD each role gets <profile>/<role>/ at launch (both engines would otherwise write rank_0/ into one directory); the wait for the traces looks one directory deeper. ATOM_PROFILER_MORE=1 under PROFILE=1. generated mode (adapters/atom.sh dist/pd hooks) is not added: Hyperloom hands over provided commands. Tests: AtomProvidedSpecTest, AtomDeepseekR1CaseTest (the guide's commands, at the mn and node_state levels), AtomTraceLayoutTest, AtomProfileDirTest, AtomProfileLaunchTest, and PdProfileWindowTest, which runs multinode.sh's real pd_disagg profile window against two fake engines (ATOM: no request body, traces found one directory down, gate passes; sglang: unchanged; an engine launched without a profiler is named). All of them fail on the previous code except the sglang and the rejected-window cases, which guard the existing behaviour.
adapters/atom.sh gains adapter_pd_mode / adapter_pd_args / adapter_pd_lb_launch, so a pd_disagg launch with no launch_command renders ATOM engines (Mooncake kv-transfer-config with the node's own IP as proxy_ip, the pd bootstrap port as handshake_port) and an `atomesh launch --pd-disaggregation` router, with the flags of ATOM's pd_disaggregation_guide.md. tp_span stays refused: ATOM's server has no --nnodes. mn.py exports GEAK_NODE_IP in the rank head and gives the generated rank its per-role profile dir, as the provided path already does.
adapters/atom.sh asks ATOM's profiler for shapes without Python stacks or memory, the same env mn.py sets on a provided launch, so both modes write the same traces. Drops two assertions on patterns main no longer has. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The standalone "ATOM engines and the atomesh router" section is split into the sections that already cover each topic for sglang and vLLM: how a backend runs on several nodes, what check reads from a launch command, the version check, the environment reference and the trace gate. Docs only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the ATOM backend to the multinode serving path that #530 introduced. ATOM P/D engines behind the atomesh router now run through the existing multinode lifecycle (check → launch → supervise → profile → teardown) in both provided and generated modes. The multinode phases and control flow are unchanged; single-node behaviour is unchanged.
Before this PR the multinode path accepted only sglang / vLLM engines and the sglang router: an ATOM
launch_commandwas refused byengine_facts, atomesh was never started, and ATOM's multinode traces were not found.Split out of #648 (now draft). The AgentX side of the ATOM work is in the follow-up PR, which builds on this one.
What changes
mn.py)--kv-transfer-config, and the HTTP port from--server-port(--portis the engine's internal port).--prefill/--decodeURLs with the engines, like the sglang router.atomesh launch,ATOM::engine children and theatompackage.adapters/atom.sh): renders each role's Mooncake--kv-transfer-configand startsatomesh launch --pd-disaggregation, as in ATOM'spd_disaggregation_guide.md.multinode.sh,mn_traces.py)/start_profileis sent without a body; both engines are stopped at once; the window is capped atATOM_PROFILE_WINDOW_MAX_SEC(default 6 s, as on one node).rank_<N>/and the rank is read from the directory.docs/multi_node.md.Testing
test_mn.pyandinterface/test_run_e2e_multinode.pypass, including real launcher shell against fake HTTP engines for the profile window.DeepSeek-R1-0528, fixed-length (ISL/OSL 1024/1024, conc 128, 1280 prompts), full GEAK e2e run, Director
validated_win:Accuracy: gsm8k 5-shot 0.9538 (reference 0.9553 ± 0.02).
The two AgentX workloads in the follow-up PR also run on this multinode path.
Known limitations