You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switch off inference mode during compilation (#149321)
Summary:
PR does following
* Turns `inference_mode` to False and `no_grad` for `convert_frame`, if the inference_mode is on globally.
* Turns off inference_mode for fake tensor prop. This ensures that converting from real inference tensor to a fake tensor removes the inference-ness.
* Graph breaks on is_inference and is_inference_mode_enabled.
X-link: pytorch/pytorch#149321
Approved by: https://github.com/jansel, https://github.com/zou3519
Reviewed By: izaitsevfb
Differential Revision: D71451966
fbshipit-source-id: 8b5cd2178fe37f2843238efafdb798df7ced2391
0 commit comments