Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: allow @torch.compile by avoiding in-place operation via clone()
`@torch.compile` can speed up model training by 5% - 200%. Simply use: ```python model = torch.compile(model) ``` This commit resolves the error that comes up when compiling _mask: ```none RuntimeError: a leaf Variable that requires grad is being used in an in-place operation. ```
- Loading branch information