pytorch/torch/distributed/_composable
Will Feng 6bddfb9546 [FSDP2] Add cache for FSDP wrapper class (#134135)
Currently, `fully_shard` will create a new `FSDPMyModuleClass` class for each `MyModuleClass` module **object**, which causes Dynamo to guard-fail on every module object's type checking. This PR fixes the issue by caching and reusing previously created FSDP wrapper class.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/134135
Approved by: https://github.com/awgu
2024-08-22 00:41:30 +00:00
..
fsdp [FSDP2] Add cache for FSDP wrapper class (#134135) 2024-08-22 00:41:30 +00:00
__init__.py
checkpoint_activation.py Add None return type to init (#132335) 2024-08-01 15:26:45 +00:00
contract.py Add None return type to init (#132335) 2024-08-01 15:26:45 +00:00
fully_shard.py [BE] mypy: disallow untyped decorators (#131428) 2024-07-23 21:50:55 +00:00
replicate.py [DDP][FSDP2] keep DTensor params for replicate(fully_shard) (#133059) 2024-08-09 18:38:05 +00:00