deepseek-ai / DeepEP-Ascend
git clone https://github.com/deepseek-ai/DeepEP-Ascend.git
A high-performance communication library for machine learning training and inference on Huawei Ascend NPUs.
+1
stars, 24h · #16,476
+~14
stars, 7 days · #9,943
+269
stars, 30 days · #3,015
269
★ total · +5% this week
44
forks · 6 open issues
Star history (as recorded here)
LanguageC++
License—
Created2026-09-30 (23d ago)
Last push23d ago
Watchers1
OwnerOrganization
Links
README excerpt
# DeepEP-Ascend **(中文介绍)**DeepEP-Ascend 是面向华为昇腾 NPU 的高性能机器学习训练与推理通信库,提供 MoE dispatch/combine 的专家并行(EP)all-to-all 操作,支持 FP8 dispatch 和延迟 epilogue。此外还提供流水线并行(PP)、面向上下文并行和数据并行(CP/DP)的 Bucket 集合通信,以及 Engram 远端内存访问等通信原语(开发中)。其公开 buffer API 与 NVIDIA 版 DeepEP 对齐。Ascend C 内核使用 HCCL/HCOMM、UBMEM 和 URMA 完成通信,并通过 DeepJIT 在运行时编译。 **(English introduction)** DeepEP-Ascend is a high-performance communication library for machine learning training and inference on Huawei Ascend NPUs. It provides expert-parallel (EP) all-to-all operations for MoE dispatch and combine, including FP8 dispatch and deferred epilogues. It also offers communication primitives (work in progress) for pipeline parallelism (PP), context and data parallelism through Bucket collectives (CP/DP), and remote memory access through Engram. Its public buffer APIs are aligned with the NVIDIA version of DeepEP. Ascend C kernels use HCCL/HCOMM, UBMEM and URMA, and are compiled at runtime through DeepJIT. ## Performance Measured on Ascend 950DT NPUs with CANN 9.2.0 and the manually configured PoC HDK described under Recommended HDK and firmware. All measurements use netlayer 1, the supernode's external Clos network. The following runs use 16,384 tokens/rank capacity, hidden size 7168, top-6 routing over 256 experts, 32 AI cores / 64 AIVs, expert alignment 128 and no bias. Dispatch uses FP8 with row-major scales; combine uses BF16. Each rank uses 10 warmups and 50 samples with cache flushing. | EP size | Dispatch (GB/s) | Combine (GB/s) | | --- | ---: | ---: | | EP8 | 373–375 | 345–347 | | EP16 | 348–352 | 338–341 | | EP32 | 335–340 | 320–324 | | EP64 | 323–327 | 294–298 | | EP128 | 313–320 | 272–278 | Bandwidth ranges cover all ranks, using timings that include issue and drain but exclude final epilogues. Sustained dispatch reaches roughly 90–95% of the physical payload bandwidth limit for EP sizes up to 32. Larger EP sizes and combine remain under optimization; combine has additional local reduction overhead and HBM contention with URMA. Huawei firmware improvements are also planned to reduce this contention. ## Quick start ### Requirements - Linux on an Ascend host with supported NPU drivers and firmware. - Ascend 950 (A5) with UBMEM connectivity and UBC_CTP/URMA channels between the participating ranks. - An even number of ranks for multi-rank communication. - CANN with Ascend C, the Bisheng compiler, HCCL and HCOMM headers/libraries. - Python 3.10 or newer, a matching PyTorch/`torch_npu` installation, and NumPy for the tests. - A C++20 compiler and standard library supporting `std::format`. The validated stack is Ascend 950DT, CANN 9.2.0, Python 3.12, PyTorch 2.13.0+cpu and torch_npu 2.13.0rc1, with the PoC HDK configuration described below. Kernel support on other Ascend generations or CANN versions has not been established by these measurements. Installation builds the host extension; device kernels are compiled on first use. Keep the CANN toolkit and Bisheng available at runtime. Set `ASCEND_HOME