Skip to content

Commit

Permalink
Update on "[FSDP] Use correct handle training state when prefetching"
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
awgu committed Apr 4, 2023
2 parents 971d2c1 + 3c22b26 commit 58bfb34
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/distributed/fsdp/test_fsdp_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ def _use_unsharded_views_assert_as_tensors(
*[nn.Linear(3, 3, device=device) for _ in range(NUM_LINEARS)]
)
fsdp_model = FSDP(model, **fsdp_kwargs)
self.assertEqual(len(list(FSDP.fsdp_modules(fsdp_model))), NUM_LINEARS + 1)
for _ in range(3):
inp = torch.randn((2, 3), device=device)
with self._patch_use_unsharded_views(
Expand Down

0 comments on commit 58bfb34

Please sign in to comment.