mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[PR #465] Add Elasticity Support via NIXL Integration #587
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepEP#587
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepEP/pull/465
Author: @itayalroy
Created: 10/22/2025
Status: 🔄 Open
Base:
main← Head:nixl_ep📝 Commits (1)
1f10174Add Elasticity Support via NIXL Integration📊 Changes
27 files changed (+2377 additions, -335 deletions)
View changed files
➕
NIXL_README.md(+100 -0)📝
csrc/config.hpp(+0 -6)📝
csrc/deep_ep.cpp(+786 -91)📝
csrc/deep_ep.hpp(+158 -1)📝
csrc/kernels/api.cuh(+107 -15)📝
csrc/kernels/buffer.cuh(+2 -0)📝
csrc/kernels/configs.cuh(+0 -6)📝
csrc/kernels/internode.cu(+335 -74)📝
csrc/kernels/internode_ll.cu(+94 -43)➕
csrc/kernels/log.cuh(+22 -0)📝
csrc/kernels/runtime.cu(+5 -52)📝
csrc/kernels/utils.cuh(+33 -0)📝
deep_ep/buffer.py(+98 -2)➕
scripts/build.sh(+13 -0)➕
scripts/reset_etcd.sh(+7 -0)➕
scripts/set_env.sh(+85 -0)📝
setup.py(+69 -36)➕
tests/elastic/double_expansion.json(+5 -0)➕
tests/elastic/elastic.py(+298 -0)➕
tests/elastic/expansion_contraction.json(+5 -0)...and 7 more files
📄 Description
Add Elasticity Support to DeepEP via NIXL Integration
Summary
This PR adds elastic scaling capabilities to DeepEP, enabling dynamic addition and removal of processes (ranks) during runtime on demand, without affecting the existing connections. This is achieved by integrating NVIDIA Inference Xfer Library (NIXL), a high-performance communication library that utilizes RDMA and NVLink transports and supports dynamic rank management.
Note: Currently, this PR replaces NVSHMEM calls with NIXL calls. However, we would like to discuss the best way to enable support for multiple communication libraries.
Included in this PR:
✅ Integrated NIXL with DeepEP (low-latency & internode modes), tested with DeepEP's original benchmark
✅ Tested with TRT-LLM, vLLM and SGLANG
✅ Introduced new buffer APIs for elastic addition/removal of ranks
✅ Extended DeepEP's benchmark to add/remove ranks in runtime
Next Steps
⬜ Support multiple calls to
update_memory_buffers()for elastic allocation/deallocation of GPU memory⬜ Integrate DeepEP's failure detection with remove_ranks API
⬜ Support elasticity in intranode kernels
New Buffer Initialization Pattern:
New Buffer APIs:
nixl_buffer(rank_id, low_latency_mode, low_latency_nvlink_backend, explicitly_destroy): Initialize the NIXL communication bufferupdate_memory_buffers(num_ranks, num_experts_per_rank, num_nvl_bytes, num_rdma_bytes): Prepare buffers for up tonum_ranksranks andnum_experts_per_rankexpertsconnect_ranks(remote_ranks): Establish NIXL connections to new peers (can be called multiple times)remove_ranks(remote_ranks): Clean up connections to departing peersTesting
New elastic test suite in
tests/elastic/:Example Plan (
expansion_contraction.json):This plan defines three phases:
Performance Testing
All benchmarks were conducted on 2 NVIDIA EOS cluster nodes (8× H100 GPUs and 8× CX7 NICs per node, InfiniBand interconnect), totaling 16 ranks.
Low-Latency Kernels (128 tokens, hidden = 7168, top-k = 8, 16 ranks, 32 experts):
Internode Kernels (4096 tokens, hidden = 7168, top-k = 8, 16 ranks, 256 experts):
Example Launch
Refer to NIXL_README.md for detailed instructions on how to run the elastic test suite.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.