Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid modifying rebuild buckets state in no_grad context (pytorch#54159)
Summary: Pull Request resolved: pytorch#54159 See pytorch#54059 for discussion. In short, users might want to run evaluation on a single rank in `torch.no_grad()` mode. When this happens, we need to make sure that we skip all rebuild bucket logics, as the forward only runs on one rank and not all peers can sure the bucket configuration sync communication. Test Plan: Imported from OSS Reviewed By: zhaojuanmao Differential Revision: D27119666 Pulled By: mrshenli fbshipit-source-id: 4b2f8cce937cdd893e89d8d10c9267d255ba52ea
- Loading branch information