pytorch/torch/_dynamo/variables
Animesh Jain e3068cdb44 [dynamo] Use relaxed CLOSURE_MATCH guard then ID_MATCH (#162247)
I am unable to write a test that would fail here. The reason is that when we do _dynamo.disable(fn) in the compiled frame, the id of disabled function changes but currently we guard on the original function - `fn` whose id is not changing. This PR still guards on the `fn.__code__` just to be more precise.

Thanks to @thenumberouscode for pointing this out.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/162247
Approved by: https://github.com/StrongerXi, https://github.com/jansel
2025-09-07 01:25:52 +00:00
..
__init__.py [dynamo] rename set_fullgraph to error_on_graph_break (#161739) 2025-09-04 01:15:06 +00:00
base.py [dynamo][guards] More small guard optimizations (#159345) 2025-07-29 18:36:49 +00:00
builder.py [dynamo] Add support for const prop on .item (#162204) 2025-09-05 00:28:49 +00:00
builtin.py redirect iter(range) to range.__iter__() (#161803) 2025-09-04 02:33:03 +00:00
constant.py [dynamo][vllm] Support typing.get_type_hints (#161362) 2025-08-27 09:55:31 +00:00
ctx_manager.py [dynamo] rename set_fullgraph to error_on_graph_break (#161739) 2025-09-04 01:15:06 +00:00
dicts.py Offload set method execution to CPython when possible (#160763) 2025-09-03 18:26:05 +00:00
distributed.py [dynamo][dist] trace DeviceMesh's get_local_rank and get_rank as constants (#160805) 2025-08-20 01:12:24 +00:00
functions.py [dynamo] Use relaxed CLOSURE_MATCH guard then ID_MATCH (#162247) 2025-09-07 01:25:52 +00:00
higher_order_ops.py [while_loop][autograd] add hop while_loop_stack_output (#160467) 2025-09-06 21:26:33 +00:00
iter.py Fixes for collections.NamedTuple (#159367) 2025-08-18 17:32:59 +00:00
lazy.py [dynamo] Avoid recompiling over unused objects (#156891) 2025-07-09 20:14:34 +00:00
lists.py Fix range.__getitem__() (#161804) 2025-09-04 02:33:03 +00:00
misc.py [dynamo][vllm] Support typing.get_type_hints (#161362) 2025-08-27 09:55:31 +00:00
nn_module.py [dynamo] Trace nn.Module __delattr__ (#159969) 2025-08-06 23:43:19 +00:00
optimizer.py Allow bypasses for Precompile when guards, etc. cannot be serialized (#160902) 2025-08-21 18:20:42 +00:00
script_object.py [dynamo] Replace unimplemented with unimplemented_v2 in torch/_dynamo/variables/script_object.py (#159343) 2025-08-01 21:30:41 +00:00
sdpa.py [Dynamo][Misc] Apply typing hints for codegen (#150289) 2025-04-04 14:26:22 +00:00
tensor.py [dynamo] propagate tensor metadata on Tensor.__setitem__(tensor) (#161036) 2025-08-22 04:43:22 +00:00
torch_function.py [dynamo] Be consistent with UserMethodVariable source (#160155) 2025-08-09 04:16:14 +00:00
torch.py [fx] Add is_fx_symbolic_tracing flag (#161385) 2025-08-26 22:26:27 +00:00
user_defined.py New export implementation with flat inp/out (#162167) 2025-09-06 20:03:52 +00:00