mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[GH-ISSUE #272] Does Deepep's Dispatch/Combine Support Autograd Like PyTorch's all_to_all? #199
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#199
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?
Originally created by @aicodeclub on GitHub (Jul 2, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/272
Does the Deepep interface Dispatch/Combine have automatic gradient backpropagation functionality similar to torch.distributed.nn.functional.all_to_all? The built-in Autograd feature of torch.distributed.nn.functional.all_to_all automatically propagates the gradients of tensors exchanged during All-to-All communication in the forward pass back to the corresponding GPUs correctly. If the Deepep interface lacks this functionality, what are the possible solutions?
@LyricZhao commented on GitHub (Jul 2, 2025):
We support backward, but you have to write the autograd function by yourself, as the example in README shows.
You should define a class derived from
torch.autograd.Function, and write similar code as above intodef forwardanddef backward.@aicodeclub commented on GitHub (Jul 2, 2025):
Thanks!
@aicodeclub commented on GitHub (Jul 3, 2025):
@LyricZhao
I define a class derived from torch.autograd.Function, and define forward and backward like this:
forward(): sequentially calls dispatch_forward followed by combine_forward;
backward(): sequentially calls combine_backward followed by dispatch_backward.
Does this implementation have any problem? Thanks