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

This reverts commit 7743149b2be4a9eba7e0997ccdc6abe552bec266.

Reverted https://github.com/pytorch/pytorch/pull/135422 on behalf of https://github.com/mlazos due to broke python test/quantization/pt2e/test_numeric_debugger.py TestNumericDebugger.test_re_export_preserve_handle modified yesterday ([comment](https://github.com/pytorch/pytorch/pull/134732#issuecomment-2350937008))
This commit is contained in:
PyTorch MergeBot
2024-09-14 10:02:55 +00:00
parent 838c912502
commit f3180f0088
14 changed files with 33 additions and 408 deletions

View File

@ -163,7 +163,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))