Skip to content

[graph_trainer] Fix fsdp_passes compat with BitsetAncestors from pytorch passes - #3416

Merged
IvanKobzarev merged 1 commit into
pytorch:mainfrom
IvanKobzarev:fix-bitset-ancestors-compat
May 21, 2026
Merged

IvanKobzarev merged 1 commit into
pytorch:mainfrom
IvanKobzarev:fix-bitset-ancestors-compat

Conversation

@IvanKobzarev

Copy link
Copy Markdown
Contributor

…rch#183559

pytorch#183559 changed node_ancestors from dict[Node, OrderedSet[Node]] to BitsetAncestors in the overlap scheduler. The _apply_trailing_block method in JointManualOverlapScheduler used OrderedSet(self.node_ancestors[node]) which breaks with the new API.

Use is_ancestor() when available, with an OrderedSet fallback for pytorch builds that predate the change.

Authored by Claude.

…rch#183559

pytorch#183559 changed `node_ancestors` from `dict[Node, OrderedSet[Node]]` to
`BitsetAncestors` in the overlap scheduler. The `_apply_trailing_block` method
in `JointManualOverlapScheduler` used `OrderedSet(self.node_ancestors[node])`
which breaks with the new API.

Use `is_ancestor()` when available, with an `OrderedSet` fallback for
pytorch builds that predate the change.

Authored by Claude.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 21, 2026
@SherlockNoMad SherlockNoMad added the ciflow/h100.8 Trigger H100.8 CI label May 21, 2026
@SherlockNoMad

Copy link
Copy Markdown
Contributor

tbh, I suspect we will end up cloning the manual overlap pass into titan for agility.

we have done so for selective_remat_pass...

@IvanKobzarev
IvanKobzarev merged commit 3f721b4 into pytorch:main May 21, 2026
18 of 21 checks passed
felipemello1 pushed a commit to felipemello1/torchtitan that referenced this pull request May 22, 2026
…rch passes (pytorch#3416)

…rch#183559

pytorch#183559 changed `node_ancestors` from `dict[Node,
OrderedSet[Node]]` to `BitsetAncestors` in the overlap scheduler. The
`_apply_trailing_block` method in `JointManualOverlapScheduler` used
`OrderedSet(self.node_ancestors[node])` which breaks with the new API.

Use `is_ancestor()` when available, with an `OrderedSet` fallback for
pytorch builds that predate the change.

Authored by Claude.
saforem2 added a commit to saforem2/torchtitan that referenced this pull request May 22, 2026
…eport

Documents the 38th upstream sync (4 commits, cfe97c6..c2a3771):

- PR pytorch#3389 (MoE [6/n] dispatcher split) — replayed in d87729a;
  smoke report at docs/experiments/moe/sunspot/20260522-smoke-n2-pr3389-replay.md
- PR pytorch#3412 (ChunkedCELoss + TP gradient fix) — internal to upstream
  loss.py, no ezpz replay; flagged interaction with ezpz's separate
  TP-loss-reporting workaround
- PR pytorch#3414 (DeepEP imports) — XPU-irrelevant no-op
- PR pytorch#3416 (graph_trainer fsdp_passes) — Meta-internal experiment, no-op

Smoke results (2N Sunspot, jobs 12467277 + 12467288):

- agpt_2b clean, byte-comparable baseline (140s, peak 24.34 GiB).
- moe_2b_ep REGRESSED at LBS=16: 62.53 GiB OOM vs yesterday's
  15.03 GiB peak with identical config. Almost certainly PR pytorch#3389's
  token-dispatcher restructure responsibility.
- moe_2b_ep at LBS=2 workaround clean (427s, peak 27.08 GiB, 9.4%
  MFU, loss 12.93 → 6.15).

Adds the 38th-sync entry to docs/upstream-sync.md, the smoke report
to docs/experiments/moe/sunspot/, links it from the moe experiments
README, and updates today's journal entry with the sync details.

Action items captured in upstream-sync.md: file upstream issue for
the LBS=16 OOM regression, pin moe_2b_ep LBS=2 in registry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/h100.8 Trigger H100.8 CI ciflow/8gpu CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants