pytorch/torch/_dynamo/variables
Ryan Guo 54dde12c37 [dynamo] Remove closure_cells and merge/remove code paths (#140154)
Now that all cells are modeled as `NewCellVariable` in Dynamo, we no
longer need to put cell variables into this special `closure_cells`,
rather we just merge `closure_cells` with `symbolic_locals`.

This allows us to merge and remove some code paths, notably make
`LOAD_CLOSURE` the same as `LOAD_FAST`, and `LOAD_DEREF` & `STORE_DEREF`
the same for inlining or regular `InstructionTranslator`.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/140154
Approved by: https://github.com/jansel
ghstack dependencies: #140330, #140152, #140436, #140435, #140153
2024-11-15 17:17:30 +00:00
..
__init__.py [dynamo] Represent all cells as NewCellVariable (#140153) 2024-11-15 17:17:30 +00:00
base.py [dynamo] Add is_mutable() and is_immutable() methods to VariableTracker (#139341) 2024-11-05 19:11:41 +00:00
builder.py add special case for __round__ constant variables (#139583) 2024-11-09 03:25:53 +00:00
builtin.py Revert "[dynamo] add SymNode bitwise and/or (#138777)" 2024-11-14 21:52:40 +00:00
constant.py add special case for __round__ constant variables (#139583) 2024-11-09 03:25:53 +00:00
ctx_manager.py [Dynamo] Trace enter/exit of TorchFunctionModes (#135422) (#137114) 2024-10-09 02:29:40 +00:00
dicts.py [dynamo] Add is_mutable() and is_immutable() methods to VariableTracker (#139341) 2024-11-05 19:11:41 +00:00
distributed.py Revert "[dynamo] Fix constant propagation in builtins and UserClasses (#131354)" 2024-11-01 00:13:20 +00:00
functions.py [dynamo] Remove closure_cells and merge/remove code paths (#140154) 2024-11-15 17:17:30 +00:00
higher_order_ops.py Add base class for single-subgraph inductor HOPs (#139898) 2024-11-11 16:12:35 +00:00
iter.py [Dynamo] Allow filter() to handle infinite iterator (#138305) 2024-11-12 17:32:56 +00:00
lazy.py [dynamo] Replace __str__ with __repr__ in some places (#136316) 2024-10-21 19:50:38 +00:00
lists.py [dynamo] Add is_mutable() and is_immutable() methods to VariableTracker (#139341) 2024-11-05 19:11:41 +00:00
misc.py [dynamo] Represent all cells as NewCellVariable (#140153) 2024-11-15 17:17:30 +00:00
nn_module.py [dynamo] Remove dead code path for capturing __class__ in UserFunctionVariable (#140034) 2024-11-12 05:54:35 +00:00
optimizer.py [dynamo] Simplify creation of VariableTrackers (#135714) 2024-10-18 09:36:46 +00:00
script_object.py Add basic mypy annotations to dynamo (#132415) 2024-08-04 18:43:36 +00:00
sdpa.py [dynamo] Simplify creation of VariableTrackers (#135714) 2024-10-18 09:36:46 +00:00
tensor.py Make size a property with an assertion (#139794) 2024-11-09 03:39:41 +00:00
torch_function.py [dynamo] Simplify creation of VariableTrackers (#135714) 2024-10-18 09:36:46 +00:00
torch.py [dynamo] Restrict support for out= variants of torch operators (#140202) 2024-11-13 03:14:23 +00:00
user_defined.py fix trace nn.parameters() (#138149) 2024-11-12 09:43:45 +00:00