Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trace torch function modes entered outside of torch.compile (#133137)
Summary: This PR adds initial tracing for torch function modes. Details: In essence, this adds tracing into the torch function of modes entered outside of the torch.compile call. This does not yet support tracing enter/exit of a torch function mode/ tracing set_default_device properly using the new mode infra (this will be a very good stress test for modes). I am adding more PRs to this stack to support these. The overall plan is to support tracing enter/exit and handling graph breaks like we do other torch.* context managers. Previously landed: pytorch/pytorch#133135 pytorch/pytorch#133136 pytorch/pytorch#133134 pytorch/pytorch#133133 pytorch/pytorch#133132 pytorch/pytorch#133131 pytorch/pytorch#133729 pytorch/pytorch#133130 X-link: pytorch/pytorch#133137 Approved by: https://github.com/jansel, https://github.com/zou3519 ghstack dependencies: #134732 Reviewed By: jeanschmidt Differential Revision: D62737267 Pulled By: mlazos fbshipit-source-id: a913a5f89b409e38bc7f940f75f4510fe09fdde3
- Loading branch information