deepspeedai / deepspeedai/DeepSpeed
[REQUEST] Add torchdynamo disable decorators to graph-break on collectives
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
Regarding this issue:
https://github.com/pytorch/pytorch/issues/97079
There are some comm ops in deepspeed, which for the moment aren't traceable by dynamo, and probably the best medium term solution is to make them graph-break at their entrypoint instead of failing to trace somewhere in their guts. This is accomplished by slapping a @torch._dynamo.disable marker on the ops in the deepspeed codebase (or, we can do it inside dynamo but I'm not sure that's the best approach).
Also note that there are 'traceable collectives' underway in pytorch, which ultimately could be swapped into deepspeed in order to allow tracing a graph without requiring a graph break. The proposal in this issue is more of a short-term solution to make the inevitable graph breaks happen more cleanly and predictably for users today.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing issue 97079 and locating the DeepSpeed collective communication operation entrypoints that are not traceable by TorchDynamo. Determine which operations need torch._dynamo.disable so they graph-break predictably, while considering the stated future replacement with traceable collectives; done means the affected operations no longer fail during tracing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- distributed-systems, machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100