[PR #292] [MERGED] Explicitly destroy the C++ runtime and release resources. #509

Closed
opened 2026-10-27 21:03:23 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepEP/pull/292
Author: @sphish
Created: 7/10/2025
Status: ✅ Merged
Merged: 7/11/2025
Merged by: @LyricZhao

Base: main ← Head: explicitly-destroy


📝 Commits (4)

  • a0d5586 Explicitly destroy the C++ runtime and release resources.
  • 73823d8 Small fix
  • 058d696 fix typo
  • 65b697c Add a flag to control whether explicit destroy() is required.

📊 Changes

6 files changed (+87 additions, -44 deletions)

View changed files

📝 csrc/deep_ep.cpp (+51 -35)
📝 csrc/deep_ep.hpp (+8 -1)
📝 deep_ep/buffer.py (+19 -2)
📝 tests/test_internode.py (+3 -2)
📝 tests/test_intranode.py (+3 -2)
📝 tests/test_low_latency.py (+3 -2)

📄 Description

Since operations like nvshmem_finalize may cause Python's exception handling process to get stuck, we decoupled the destructor and resource release in a manner similar to PyTorch NCCL.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepEP/pull/292 **Author:** [@sphish](https://github.com/sphish) **Created:** 7/10/2025 **Status:** ✅ Merged **Merged:** 7/11/2025 **Merged by:** [@LyricZhao](https://github.com/LyricZhao) **Base:** `main` ← **Head:** `explicitly-destroy` --- ### 📝 Commits (4) - [`a0d5586`](https://github.com/deepseek-ai/DeepEP/commit/a0d55868f8e5fa7770710caa93465bfc99d05537) Explicitly destroy the C++ runtime and release resources. - [`73823d8`](https://github.com/deepseek-ai/DeepEP/commit/73823d81d074e5d4d3260b9afaf8ff998cc158ee) Small fix - [`058d696`](https://github.com/deepseek-ai/DeepEP/commit/058d696b6a96f22826f12c98131944e80585fa82) fix typo - [`65b697c`](https://github.com/deepseek-ai/DeepEP/commit/65b697cc91c4469d63a6d966529faf7d72030682) Add a flag to control whether explicit `destroy()` is required. ### 📊 Changes **6 files changed** (+87 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `csrc/deep_ep.cpp` (+51 -35) 📝 `csrc/deep_ep.hpp` (+8 -1) 📝 `deep_ep/buffer.py` (+19 -2) 📝 `tests/test_internode.py` (+3 -2) 📝 `tests/test_intranode.py` (+3 -2) 📝 `tests/test_low_latency.py` (+3 -2) </details> ### 📄 Description Since operations like `nvshmem_finalize` may cause Python's exception handling process to get stuck, we decoupled the destructor and resource release in a manner similar to PyTorch NCCL. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-27 21:03:23 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepEP#509
No description provided.