mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[dynamo] [guard] Add caching for inside torch.compile.disable function to avoid unnecessary recompilation. (#160934)
Fixes #157399 cherry pick of d6a5c03 @mlazos Pull Request resolved: https://github.com/pytorch/pytorch/pull/160934 Approved by: https://github.com/mlazos
This commit is contained in:
committed by
PyTorch MergeBot
parent
29afde2020
commit
8f31aa97a3
@ -614,6 +614,8 @@ class TestAutograd(TestCase):
|
||||
|
||||
with disable_gc():
|
||||
unpack_hook_ref = scope()
|
||||
if torch._dynamo.is_compiling():
|
||||
torch._dynamo.reset()
|
||||
self.assertIsNone(unpack_hook_ref())
|
||||
|
||||
def test_will_engine_execute_node(self):
|
||||
|
Reference in New Issue
Block a user