Skip to content

Fix TorchFT trainer CUDA graph integration - #4518

Merged
tushar00jain merged 1 commit into
gh/tushar00jain/1/basefrom
gh/tushar00jain/1/head
Sep 8, 2026
Merged

tushar00jain merged 1 commit into
gh/tushar00jain/1/basefrom
gh/tushar00jain/1/head

Conversation

@tushar00jain

@tushar00jain tushar00jain commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Port the updated wrap_with_cuda_graph to torchft trainer.
This fixes the error

File "/pytorch/torchtitan/torchtitan/experiments/torchft/trainer.py", line 314, in __init__
  self.fwd_bwd_fn = wrap_with_cuda_graph(self.fwd_bwd_fn)
		    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: wrap_with_cuda_graph() missing 3 required keyword-only arguments: 'gradient_accumulation_steps', 'sdc_num_steps', and 'sdc_num_replays'

[ghstack-poisoned]
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 8, 2026
tushar00jain added a commit that referenced this pull request Sep 8, 2026
Port the updated `wrap_with_cuda_graph` to torchft trainer.
This fixes the error

```
File "/pytorch/torchtitan/torchtitan/experiments/torchft/trainer.py", line 314, in __init__
  self.fwd_bwd_fn = wrap_with_cuda_graph(self.fwd_bwd_fn)
		    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: wrap_with_cuda_graph() missing 3 required keyword-only arguments: 'gradient_accumulation_steps', 'sdc_num_steps', and 'sdc_num_replays'
```

ghstack-source-id: da66ba3
Pull-Request: #4518
@tushar00jain
tushar00jain marked this pull request as ready for review September 8, 2026 16:50
@tushar00jain
tushar00jain merged commit b9f4dcf into gh/tushar00jain/1/base Sep 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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