[GH-ISSUE #455] Maybe use reference stash to replace record stream to reduce mem peak #296

Open
opened 2026-10-26 09:58:10 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @junjzhang on GitHub (Oct 15, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/455

Due to behavior of CudaCacheAllocator, record stream will lead to a late memory free, which has significant on memory peak. (Could refer to fsdp1's issue due to recordstream). In Pytorch 2.8 +,c10d has remove all recordStream in collective communication. Thus, I wonder if there are plans to remove record stream and use reference stash to handle multistream scenario?

Originally created by @junjzhang on GitHub (Oct 15, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/455 Due to behavior of CudaCacheAllocator, record stream will lead to a late memory free, which has significant on memory peak. (Could refer to [fsdp1's issue due to recordstream](https://dev-discuss.pytorch.org/t/fsdp-cudacachingallocator-an-outsider-newb-perspective/1486)). In Pytorch 2.8 +,[c10d has remove all recordStream in collective communication](https://github.com/pytorch/pytorch/blob/main/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp#L2910). Thus, I wonder if there are plans to remove record stream and use reference stash to handle multistream scenario?
Author
Owner

@junjzhang commented on GitHub (Oct 15, 2025):

https://github.com/deepseek-ai/DeepEP/pull/456 A tested PR, could be further discussed.

<!-- gh-comment-id:3407189244 --> @junjzhang commented on GitHub (Oct 15, 2025): https://github.com/deepseek-ai/DeepEP/pull/456 A tested PR, could be further discussed.
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#296
No description provided.