-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Switch to _apply_to_tensors for dataclass input #154897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/154897
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ⏳ No Failures, 1 PendingAs of commit e4ba9f0 with merge base 4014297 ( UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
mp_policy = MixedPrecisionPolicy( | ||
torch.bfloat16, torch.bfloat16, torch.bfloat16, True | ||
) | ||
model = Model().cuda() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for .cuda(), because fully_shard moves model to cuda
super().__init__(*args, **kwargs) | ||
self._layer = nn.Linear(10, 10) | ||
|
||
def forward(self, input: torch.Tensor): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
input: torch.Tensor
-> input: Input
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and address linter
@pytorchmergebot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Fixes pytorch#153077 Pull Request resolved: pytorch#154897 Approved by: https://github.com/weifengpy
Fixes pytorch#153077 Pull Request resolved: pytorch#154897 Approved by: https://github.com/weifengpy
Fixes #153077
cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k