Skip to content

Integrating Large EP Benchmark with madengine - #270

Open
vdar25 wants to merge 6 commits into
ROCm:developfrom
vdar25:vdar/large-ep-bench
Open

vdar25 wants to merge 6 commits into
ROCm:developfrom
vdar25:vdar/large-ep-bench

Conversation

@vdar25

@vdar25 vdar25 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Moves the large EP benchmark onto madengine, refreshes its image, makes it run on any fabric and on MI350X / MI355X, and deprecates DeepEP.

  • madengine: the slurm_multi model cards and parse_ep_to_csv.py already existed but didn't run correctly under madengine.
    • Each card now has a slurm block and distributed.nnodes. The node count used to live only in args (-N 2 -n 2), which madengine passes to the script and the script ignored, so every card ran on one node.
    • run_benchmark.sbatch now runs madengine's image (DOCKER_IMAGE_NAME) instead of a hardcoded one.
    • A failed test now gives a non-zero exit code
    • Logs go to slurm_output/<job_id>/ in the script directory (LOG_PATH overrides it), and perf.csv is copied to slurm_output/perf_csv/results_<job_id>.csv in the submit directory, where madengine collects it.
  • Any fabric: nothing names a particular cluster's hardware. The cards no longer set IBDEVICES=mlx5_0. MoRI matches each GPU to its own NIC from the PCIe topology. MORI_RDMA_DEVICES, MORI_DEVICE_NIC, GLOO_SOCKET_IFNAME and IBDEVICES are forwarded into the containers only when set.
    • GLOO_SOCKET_IFNAME defaults to the device of the IPv4 default route, taken as the word after dev. It used to be the route's last word, which is the metric on routes that have one (... dev fenic0 proto static metric 108 gave interface 108, and every MoRI test died in init_process_group).
  • MI350X / MI355X (gfx950): the low-latency test's fp8 type follows the GPU: fp8_e4m3 (OCP) on gfx95x, fp8_e4m3_fnuz elsewhere. It was always fnuz, for which MoRI has no gfx950 kernels, so that test aborted on MI350X. perf.csv reports the detected GPU arch. The README names the MI35x base for gfx950 builds.
  • Image: docker/large_ep_benchmark.ubuntu.amd.Dockerfile now builds on lmsysorg/sglang:v0.5.20-rocm10-mi30x (lmsysorg/sglang:v0.5.20-rocm10-mi35x for MI350X / MI355X; v0.5.12.post1-rocm720-mi30x also works all via BASE_DOCKER).
    • MoRI is pinned to v1.2.3.post1 (MORI_REF), the same as the KV transfer bench, and gated by INSTALL_MORI.
    • rocSHMEM (develop 62324a88) and DeepEP (main 0f63d3e9) are pinned, but only built with INSTALL_DEEPEP=1; the default is 0.
    • Previously: a rocm/vllm-dev base, MoRI taken from the base image, and rocSHMEM and DeepEP unpinned.
  • DeepEP deprecated: SKIP_DEEPEP now defaults to 1, and the two DeepEP cards (pyt_large_ep_bench_1n, pyt_large_ep_bench_2n) are removed. The three MoRI-only cards (1, 2 and 4 nodes) remain. DeepEP can still be enabled with INSTALL_DEEPEP=1 plus SKIP_DEEPEP=0.
  • README: rewritten in the same layout as the KV transfer bench.

Notes for reviewers

  • MoRI kernel cache cleared after install (rm -rf /root/.mori /tmp/mori_jit_*). On the ROCm 7.2 SGLang base, installing MoRI v1.2.3.post1 leaves lock files in /root/.mori/jit for four EP kernels (ep_internode_v1, ep_internode_v1ll, ep_intranode, ep_async_ll), but not the compiled kernels. MoRI's file lock then waits forever, so any run that needs one of those kernels hangs at startup. It happened in both images built on that base (this one and the KV transfer bench's). vllm_disagg_inference.ubuntu.amd.Dockerfile clears the same cache. The kernels recompile on first use.
  • Known regression: with MoRI v1.2.3.post1, internode low-latency (v1_ll) combine is about 15% slower than with the previous image (MoRI 42e89547): 73.7 → 62–63 GB/s at the best sample, and 61.4 → 53.5 GB/s on average. It's the same on ROCm 10 and ROCm 7.2, so it isn't a ROCm 10 issue. Reported separately. The other three tests are within 5%.
  • Not tested: the 4-node card, internode runs on MI350X (that cluster's Broadcom Thor2 NIC firmware blocks MoRI's internode path), DeepEP opt-in on the new bases (INSTALL_DEEPEP=1 hasn't been built on either one, though DeepEP's internode and low-latency tests did complete on the previous image before the deprecation).

Testing

MI300X (gfx942), RoCE (mlx5), 2 nodes: pyt_large_ep_bench_2n_mori_only through madengine build --use-image and madengine run:

  • Previous image: all 8 perf.csv rows (dispatch and combine, normal and low-latency, each with bandwidth and latency), within 1.5% of a June run on the same cluster. This confirms the madengine wiring separately from the image change.
  • ROCm 10 base (v0.5.20-rocm10-mi30x): all 8 rows on two runs. Seven are within 5% of the previous image; low-latency combine is down 15% (see Notes).
  • ROCm 7.2 base (v0.5.12.post1-rocm720-mi30x): all 8 rows, matching ROCm 10, with the kernel-cache fix. Without it, the run hung at startup.
  • Peak throughput (ROCm 10, best sample): 71–74 GB/s dispatch, about 72 GB/s combine, 69–71 GB/s low-latency dispatch and 62–63 GB/s low-latency combine.

MI350X (gfx950), Broadcom Thor2 RoCE, 1 node: pyt_large_ep_bench_1n_mori_only at this head, image built from this Dockerfile with BASE_DOCKER=lmsysorg/sglang:v0.5.20-rocm10-mi35x, through madengine build --use-image and madengine run: all 8 rows, gpu_architecture gfx950, low-latency test in fp8_e4m3.

Intranode, 8 GPUs, best round Bandwidth (GB/s per rank) Latency (us)
Dispatch, BF16 341.8 909
Combine, BF16 330.8 939
Low-latency dispatch, FP8 301.5 515
Low-latency combine, FP8 194.6 798

vdar25 added 2 commits October 2, 2026 20:58
- Convert the 1-, 2- and 4-node MoRI model cards to madengine's slurm_multi
  launcher (nodes, GPUs and time in each card's slurm block) and drop the
  DeepEP cards.
- Move the image from rocm/vllm-dev to lmsysorg/sglang:v0.5.20-rocm10-mi30x,
  pinning MoRI v1.2.3.post1; rocSHMEM/DeepEP are now optional
  (INSTALL_DEEPEP, deprecated).
- Clear MoRI's JIT cache after install: a half-built cache left by the build
  leaves lock files that hang every later run on ROCm 7.2 images.
- Document setting the Slurm partition at build time via --additional-context.
@vdar25 vdar25 changed the title Vdar/large ep bench Integrating Large EP Benchmark with madengine Oct 2, 2026
vdar25 and others added 4 commits October 26, 2026 17:29
run_ep_bench.sh always ran the MoRI low-latency benchmark with
--dtype fp8_e4m3_fnuz, gfx942's fp8. On gfx950 MoRI has no fnuz kernels
and the run aborts ("Cannot find Symbol with name:
_ZN4mori3moe25EpDispatchIntraNodeKern..."). It now detects the GPU arch
in the container and uses fp8_e4m3 (OCP) on gfx95x, fnuz elsewhere as
before; perf.csv reports the detected arch instead of falling back to
gfx942.

GLOO_SOCKET_IFNAME defaulted to the last word of the IPv4 default route.
That is the device only when the route has no metric; on a node whose
route reads "default via ... dev fenic0 proto static metric 108" Gloo was
told to use interface "108", and every MoRI benchmark died in
init_process_group ("Unable to find address for: 108"). It now takes the
word after "dev", the same device as before on routes without a metric.

The README names the MI35x SGLang base for gfx950 builds.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant