-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add precision as an argument to FSDP strategy dataclass (#501)
Summary: Pull Request resolved: #501 # Context We want to add `mixed_precision` to `FSDPStrategy` dataclass, and stop populating the `FSDPStrategy` with whatever `precision` the user has passed to the `AutoUnit`'s constructor. See attached task for more details # This diff - Add the above. - Modify from `asdict()` to `__dict__` as the former works recursively, which then throws an exception when `MixedPrecision` becomes a dict - Adjust users who use `FSDPStrategy` to pass in the `mixed_precision`. Found the right `precision` to use by looking for the `precision` passed in the `AutoUnit` constructor Reviewed By: JKSenthil Differential Revision: D48248411 fbshipit-source-id: 2f163cd39b1e23487853ff1d2e8e47018a07acf6
- Loading branch information
1 parent
8046981
commit 95f6944
Showing
3 changed files
with
31 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters