pytorch
2e523ed2 - [JIT] additional support for CallMethod with autocasting (#67925)

Commit
3 years ago
[JIT] additional support for CallMethod with autocasting (#67925) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/67925 Previously, the following would always fail, because autocasting would not be enabled in the called method: ``` torch.jit.script def fn(x, y): with autocast(): # CallMethod() to some method fn(x, y) ``` This allows the above, if autocasting is globally enabled, e.g. ``` torch.jit.script def fn(x, y): with autocast(): # CallMethod() to some method with autocast(): fn(x, y) # now ``` ghstack-source-id: 142667351 Test Plan: added test in test_jit_autocast.py Reviewed By: navahgar Differential Revision: D32214439 fbshipit-source-id: bb7db054e25e18f5e3d2fdb449c35b5942ab303e
Author
Parents
Loading