Skip to content

[graph_trainer] Add gradient accumulation integration test - #2814

Closed
SherlockNoMad wants to merge 1 commit into
gh/SherlockNoMad/19/basefrom
gh/SherlockNoMad/19/head
Closed

SherlockNoMad wants to merge 1 commit into
gh/SherlockNoMad/19/basefrom
gh/SherlockNoMad/19/head

Conversation

@SherlockNoMad

@SherlockNoMad SherlockNoMad commented Apr 3, 2026 •

Copy link
Copy Markdown
Contributor

Core torchtitan tests gradient accumulation via global_batch_size but
graph_trainer never tested this code path. Gradient accumulation
interacts with graph_trainer's custom forward_backward_step and
SimpleFSDP's gradient handling, so it warrants explicit coverage.

Add a JIT mode test with local_batch_size=8 on 4 GPUs (default
global_batch_size=32) and global_batch_size=64 to trigger 2 gradient
accumulation steps per optimizer step.

[ghstack-poisoned]
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 3, 2026
SherlockNoMad added a commit that referenced this pull request Apr 9, 2026
Port PR #2814: Add a JIT gradient accumulation integration test that
verifies training with 2 gradient accumulation steps (local_batch_size=8,
global_batch_size=64, 4 GPUs).
@SherlockNoMad
SherlockNoMad deleted the gh/SherlockNoMad/19/head branch April 9, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant