deepspeedai / deepspeedai/DeepSpeed

[REQUEST] Add torchdynamo disable decorators to graph-break on collectives

Open
#3,150 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.