pytorch
4284862d - [Dynamo][FSDP] Migrate to `ModuleWrapPolicy` (#88453)

Commit
2 years ago
[Dynamo][FSDP] Migrate to `ModuleWrapPolicy` (#88453) Hello @wconstab! As you saw, `transformer_auto_wrap_policy()` is a misnomer and actually works for any module classes. The PR before this one tries to add a class `ModuleWrapPolicy` that takes in the `module_classes` in its constructor and works just like `transformer_auto_wrap_policy()` without requiring the `functools.partial()`. I hope you do not mind if we update the dynamo benchmarks util file with this migration. The PR before this one might require some back and forth within FSDP devs, so I apologize for any consequent updates to this PR, which in itself is an easy change. I will request review once we know the previous PR is good for land. Pull Request resolved: https://github.com/pytorch/pytorch/pull/88453 Approved by: https://github.com/wconstab
Author
Committer
Parents
Loading