Revert "[Dynamo] Trace enter/exit of TorchFunctionModes (#135422) (#137114)"

This reverts commit 51bc839b94829f176e3c1b7f62e3448d6028c480.

Reverted https://github.com/pytorch/pytorch/pull/137114 on behalf of https://github.com/huydhn due to The top of the stack has been reverted but it leaves trunk in a broken state, so I try to revert the rest of the stack ([comment](https://github.com/pytorch/pytorch/pull/137114#issuecomment-2400765603))
This commit is contained in:
PyTorch MergeBot
2024-10-08 20:33:17 +00:00
parent 8c937445ee
commit d34b617bb9
14 changed files with 52 additions and 321 deletions

View File

@ -187,7 +187,6 @@ def debug_insert_nops(
local_scope=locals(),
global_scope=globals(),
f_code=frame.f_code,
torch_function_mode_stack=[],
)
return GuardedCode(code, CheckFunctionManager(graph).check_fn, CompileId(0, 0))