Skip to content

Categorize DDP comm-hook bucket all-reduce and TorchRec comm ops as NET#19

Closed
Chenguang-Zhu wants to merge 1 commit into
facebookresearch:mainfrom
Chenguang-Zhu:export-D103992608
Closed

Categorize DDP comm-hook bucket all-reduce and TorchRec comm ops as NET#19
Chenguang-Zhu wants to merge 1 commit into
facebookresearch:mainfrom
Chenguang-Zhu:export-D103992608

Conversation

@Chenguang-Zhu

Copy link
Copy Markdown
Member

Summary:
Add four new NET-domain rules to the categorization rule table:

  1. c10d::Reducer::all_reduce_bucket — DDP bucket all-reduce.
  2. c10d::PythonCommHook::runHook — Python comm-hook dispatch.
  3. Filename contains torch/distributed/algorithms/ddp_comm_hooks/
    — any comm-hook implementation.
  4. Filename contains torchrec/distributed/comm_ops.py — TorchRec
    distributed comm primitives (alltoall_pooled, etc.).

Order-of-rules detail: these rules are inserted after the
autograd-engine BACKWARD rules — so an autograd-bound
bucket allocation still goes to BACKWARD — but before the broad
"backward" in frame.name substring fallback, so a comm-hook
frame in an otherwise generic backward stack still wins.

Differential Revision: D103992608

Summary:
Add four new NET-domain rules to the categorization rule table:

1. `c10d::Reducer::all_reduce_bucket` — DDP bucket all-reduce.
2. `c10d::PythonCommHook::runHook` — Python comm-hook dispatch.
3. Filename contains `torch/distributed/algorithms/ddp_comm_hooks/`
   — any comm-hook implementation.
4. Filename contains `torchrec/distributed/comm_ops.py` — TorchRec
   distributed comm primitives (alltoall_pooled, etc.).

Order-of-rules detail: these rules are inserted **after** the
autograd-engine BACKWARD rules — so an autograd-bound
bucket allocation still goes to BACKWARD — but **before** the broad
`"backward" in frame.name` substring fallback, so a comm-hook
frame in an otherwise generic backward stack still wins.

Differential Revision: D103992608
@meta-codesync

meta-codesync Bot commented May 9, 2026

Copy link
Copy Markdown

@Chenguang-Zhu has exported this pull request. If you are a Meta employee, you can view the originating Diff in D103992608.

@meta-codesync

meta-codesync Bot commented May 10, 2026

Copy link
Copy Markdown

This pull request has been merged in a931358.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant