Skip to content

fix: MI355X (gfx950) + Ionic RDMA support for MoRI EP#1

Open
raviguptaamd wants to merge 26 commits into
fix/pr209-review-cleanupfrom
mori-mi355x-ionic-fixes
Open

fix: MI355X (gfx950) + Ionic RDMA support for MoRI EP#1
raviguptaamd wants to merge 26 commits into
fix/pr209-review-cleanupfrom
mori-mi355x-ionic-fixes

Conversation

@raviguptaamd

Copy link
Copy Markdown
Owner

Summary

Adapt vLLM disaggregated inference scripts for AMD Instinct MI355X (gfx950) clusters with Pensando Ionic RDMA NICs. These changes are tested on a 2-node SLURM cluster (mia1-p02) and are intended to be merged into PR ROCm#143 (fix/pr209-review-cleanup).

Changes

  • DeepSeek-V3 model support: Added DeepSeek-V3 and DeepSeek-V3-5layer to MORI_EP_VALID_MODELS
  • IP resolution fix: Use default-route interface (ip route + ip addr) instead of hostname -I to avoid unreachable management IPs on multi-homed nodes
  • Ionic RDMA mounts: Add libionic-rdmav34.so, libionic.so bind-mounts for Pensando/Ionic NICs
  • MoRI environment variables: Pass MORI_DISABLE_TOPO, MORI_IB_GID_INDEX, MORI_RDMA_DEVICES, MORI_NUM_QP_PER_PE, MORI_DISABLE_P2P into Docker containers
  • SLURM interactive sessions: Add --jobid=$SLURM_JOB_ID --overlap to srun calls for salloc compatibility
  • Network interface auto-detection: Auto-detect GLOO_SOCKET_IFNAME and NCCL_SOCKET_IFNAME instead of hardcoding eth0
  • Volume mounts: Add /it-share for shared model storage
  • MODEL_PATH bypass: Skip multi-node path check when MODEL_PATH is pre-set externally
  • Memory utilization: Reduce --gpu-memory-utilization from 0.8 to 0.7 for MoRI EP

Known blocker

MoRI EP hits a VM_L2_PROTECTION_FAULT on MI355X during rocshmem's symmetric memory initialization (hipDeviceMallocUncached). This is a rocshmem/HIP runtime issue, not a script issue — these script changes are independently correct and needed for Ionic RDMA + MI355X support.

Files changed

File Lines
scripts/vllm_dissag/run_xPyD_models.slurm +28 / -11
scripts/vllm_dissag/vllm_disagg_mori_ep.sh +13 / -3
scripts/vllm_dissag/vllm_disagg_server.sh +3 / -2

Test plan

  • Verified scripts launch correctly on MI355X 2-node cluster
  • Verified IP resolution uses correct interface (eno0)
  • Verified Ionic RDMA libraries are mounted into containers
  • Verified MoRI env vars are passed through to containers
  • DeepSeek-V3 model loads successfully with MoRI EP path
  • End-to-end MoRI inference blocked by upstream rocshmem issue

Made with Cursor

lcskrishna and others added 26 commits April 11, 2026 02:37
…scripts

Dockerfile:
- Fix sed pattern to avoid corrupting https URLs (s/http/https -> s|http://|https://|)
- Replace silent `|| true` on vLLM build with logged warning
- Remove commented-out dead code (old base image, CMAKE_PREFIX_PATH, git checkout)
- Use consistent absolute path for versions.txt, add comment documenting base image dependency
- Fix trailing whitespace on multiple lines
- Combine version-tracking RUN layers into single layer
- Move py-spy and flask installs from runtime into Dockerfile

Slurm script (run_xPyD_models.slurm):
- Require explicit DOCKER_IMAGE_NAME instead of defaulting to stale image
- Remove unreachable empty-string check
- Remove duplicate NUM_NODES echo

MoRI EP script (vllm_disagg_mori_ep.sh):
- Refactor 4 near-identical vllm serve blocks into shared functions
  (setup_mori_env, build_kv_transfer_config, launch_vllm_worker,
   wait_for_proxy_and_cleanup, print_node_info), eliminating ~150 lines
- Extract hardcoded ports into named variables at top of script
- Fix typo "untill" -> "until"
- Fix --gpu_memory_utilization to --gpu-memory-utilization for consistency
- Remove commented-out compilation-config lines
- Add graceful kill with `kill ... 2>/dev/null || true`

Server script (vllm_disagg_server.sh):
- Add comments noting DeepSeek-R1 shares architecture with V3

Made-with: Cursor
etcd is not needed for the MoRI EP disaggregation path. Remove:
- etcd, etcd-server, etcd-client apt packages
- etcd v3.6.0-rc.5 binary download and PATH entry
- etcd-cpp-apiv3 source build

Made-with: Cursor
Remove etcd from both Dockerfile and vllm_disagg_server.sh:
- Dockerfile: remove etcd/etcd-server/etcd-client apt packages, etcd binary
  download, and etcd-cpp-apiv3 source build
- vllm_disagg_server.sh: remove ETCD Server Setup section (start_etcd,
  etcdctl health/status checks, barrier waits) and etcd_pid kill at exit

Fix spelling typos:
- "untill" -> "until" in vllm_disagg_server.sh and sglang_disagg_server.sh
- "Dissagerated" -> "Disaggregated" in vllm_dissag/README.MD
- "Disaggerated" -> "Disaggregated" in sglang_disagg/README.MD
- "disggregation" -> "disaggregation" in README.md

Note: the directory name scripts/vllm_dissag/ is also misspelled (should be
vllm_disagg) but renaming it is a larger refactor best done in a separate PR.

Made-with: Cursor
Port DeepEP server script and dispatch logic from MAD-private PR #208.
Three run modes now available via RUN_MORI/RUN_DEEPEP flags with mutual
exclusion. Adds host RDMA library bind-mounts, docker pull, and
DeepEP env var passthrough to the slurm launcher. Updates README with
all three modes, node topology, and DeepEP configuration reference.

Made-with: Cursor
Expose BENCHMARK_ITR, BENCHMARK_CON, and BENCHMARK_COMBINATIONS as
environment variables passed through slurm -> Docker -> benchmark
script, matching sglang's pattern. Add a small warmup run before the
main sweep to stabilize results.

Made-with: Cursor
Refactors all three server scripts and the Slurm launcher to run the
proxy/router on the same node as the Prefill master (rank 0), reducing
the required node count from xP+yD+1 to xP+yD.

Key changes:
- NUM_NODES = xP + yD (was xP + yD + 1)
- SBATCH defaults: -N 2 -n 2 (was -N 3 -n 3)
- Rank 0 now runs both prefill vLLM serve and proxy/router
- ROUTER_PORT defaults to 8001 (avoids collision with SERVER_PORT=2584)
- IP array indexing shifted: prefill at [0..xP-1], decode at [xP..end]
- DP start ranks adjusted: prefill = NODE_RANK*8, decode = (NODE_RANK-xP)*8
- Log file names updated: prefill_NODE0.log, decode_NODE{xP}.log

Made-with: Cursor
…script

Replace hard-fail checks with auto-detection via ibstat (matching the
DeepEP script pattern) so the script works without external env vars.

Made-with: Cursor
Kill stale listeners on the barrier port before starting the
socket_barrier, matching the pattern already used in the DeepEP
script. Prevents 'Address already in use' errors after failed runs.

Made-with: Cursor
…ript

The vLLM version in the Docker image does not support this flag,
causing 'unrecognized arguments' errors on startup.

Made-with: Cursor
…decode-url

The current vllm-router API uses --prefill and --decode (without -url
suffix and without /v1 path). Matches the DeepEP script's pattern.

Made-with: Cursor
Port 8001 is occupied by a system service on the cluster nodes,
causing 'Address already in use' errors when the co-located proxy
tries to bind. Use 18001 which is available.

Made-with: Cursor
- Update model lists in top-level README and vllm_dissag README to
  match VALID_MODELS in Slurm (add DeepSeek-R1, DeepSeek-V3-5layer,
  use correct amd- prefix)
- Add DeepSeek-V3-5layer config to MODEL_*_CONFIGS and MODEL_ENVS
  in vllm_disagg_server.sh (was falling back to --tp-size 4)
- Fix Docker build path in vllm_dissag README
- Document MoRI-specific ports (20005/10001) and PROXY_TYPE scope
- Add barrier port cleanup for ports 5000 and 2222 in Slurm launcher
- Fix unset $prompts variable in benchmark_xPyD.sh echo
- Remove duplicate HSA_ENABLE_SDMA=1 lines in vllm_disagg_server.sh

Made-with: Cursor
Use dirname of the script to cd into the correct directory before
setting NIXL_REPO_DIR=$(pwd). Falls back to SLURM_SUBMIT_DIR if
dirname fails. Validates that all required server scripts exist,
giving a clear error message if the directory is wrong.

Made-with: Cursor
…k docs

- Fix UCX_NET_DEVICES: auto-detected value was being overridden by
  hardcoded mlx5_0:1 in all vllm serve commands; now uses the
  auto-detected value consistently (matching DeepEP script behavior)
- Fix exit 0 on MODEL_NAME error path to exit 1
- Remove dead code: ORIGINAL_MODEL_PATH, timestamp, BENCHMARK_FILE,
  SELECTED_NODELIST_STR, duplicate SLURM echo block, no-op sed,
  commented-out trap, duplicate ls NIXL_COOKBOOK_PATH
- Remove README self-reference line
- Add BENCHMARK_ITR/CON/COMBINATIONS documentation to README

Made-with: Cursor
Slurm copies the batch script to /var/spool/slurmd/, so dirname $0
resolves to the spool path instead of the original directory. Use
SLURM_SUBMIT_DIR (always set by Slurm to the sbatch invocation dir)
as the primary source, falling back to dirname for non-Slurm runs.

Made-with: Cursor
Adapt vLLM disaggregated inference scripts for AMD Instinct MI355X
clusters with Pensando Ionic RDMA NICs:

- Add DeepSeek-V3/V3-5layer to MORI_EP_VALID_MODELS
- Auto-detect default-route interface for IP resolution instead of
  hostname -I (fixes multi-homed nodes where eno1 is unreachable)
- Add Ionic RDMA library bind-mounts (libionic-rdmav34.so, libionic.so)
- Pass MoRI env vars (MORI_DISABLE_TOPO, MORI_IB_GID_INDEX,
  MORI_RDMA_DEVICES, MORI_NUM_QP_PER_PE, MORI_DISABLE_P2P)
- Add --jobid/--overlap flags for srun in interactive salloc sessions
- Auto-detect GLOO_SOCKET_IFNAME and NCCL_SOCKET_IFNAME (was hardcoded
  to eth0)
- Add /it-share volume mount for shared model storage
- Skip multi-node model path check when MODEL_PATH is pre-set
- Reduce gpu-memory-utilization to 0.7 for MoRI EP

Made-with: Cursor
@raviguptaamd raviguptaamd force-pushed the fix/pr209-review-cleanup branch 4 times, most recently from b31ef10 to be9e3fc Compare April 15, 2026 07:35
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.

2 participants