Skip to content

Conversation

jiemingz
Copy link
Contributor

What does this PR do ?

Add a one line overview of what this PR aims to accomplish.

Issues

List issues that this PR closes (syntax):

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this 

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

Signed-off-by: Jimmy Zhang <[email protected]>
@jiemingz jiemingz requested a review from terrykong June 10, 2025 14:01
@jiemingz jiemingz self-assigned this Jun 10, 2025
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add this key to all the configs/recipes?

Copy link
Contributor

@terrykong terrykong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this possible to unit test?

@terrykong
Copy link
Contributor

@jiemingz is the only thing blocking this PR the seq-packing change since we need static shapes for torch.compile?

@terrykong
Copy link
Contributor

Dependent on #300

@SahilJain314
Copy link
Contributor

Dtensor sequence packing has been merged. @ahmadki to support max-padding packed sequences in DTensor to enable torch.compile (fixed seqlen).

@ahmadki
Copy link
Member

ahmadki commented Jul 24, 2025

Dtensor sequence packing has been merged. @ahmadki to support max-padding packed sequences in DTensor to enable torch.compile (fixed seqlen).

tracking here

@@ -195,6 +196,9 @@ def __init__(
custom_parallel_plan=self.cfg["dtensor_cfg"]["custom_parallel_plan"],
)

if self.torch_compile:
self.model = torch.compile(model)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you try model.compile() instead? That should fix the _orig_mod issue. This is also the recommended way of compiling a model now. We'll work on throwing warnings and publicizing to raise awareness on this.

@terrykong terrykong linked an issue Aug 7, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

torch.compile for training
5 participants