Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisxcai committed May 1, 2024
1 parent f787532 commit 3429f33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fairscale/nn/misc/flatten_params_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def _unflatten_params_as_views(self) -> None:
self.flat_param unchanged.
"""
assert self.is_flattened
#logger.info(f"CHRISLOG: {self._require_backward_grad_sync=}")
# logger.info(f"CHRISLOG: {self._require_backward_grad_sync=}")
if self._require_backward_grad_sync:
#logger.info("CHRISLOG: calling self.get_param_views() without torch.no_grad()")
ps = self.get_param_views()
Expand All @@ -385,7 +385,7 @@ def _unflatten_params_as_views(self) -> None:
for (_, m, n), p in zip(self._param_infos, ps):
setattr(p, '_fsdp_weight', True)
setattr(m, n, p) # This will set as plain attr
#logger.info(f"CHRISLOG: {n=}, {p.requires_grad=}")
# logger.info(f"CHRISLOG: {n=}, {p.requires_grad=}, {p.grad_fn=}")
param_views.append(p)

# Save param views for easy access if anyone still wants to access
Expand Down

0 comments on commit 3429f33

Please sign in to comment.