pytorch/torch/_dynamo/variables
Michael Lazos d1fdf984c3 [Dynamo] Support push torch function mode stack (#133132)
This PR adds support `torch._C._push_on_torch_function_stack()` by updating `torch.py` to push onto the symbolic torch function mode stack when a push is encountered. The same side effects infra used in the previous PR is used to track the mutation of the torch function mode stack and add bytecode to update it if it is mutated.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/133132
Approved by: https://github.com/williamwen42
ghstack dependencies: #133130, #133729, #133131
2024-08-20 07:14:47 +00:00
..
__init__.py [dynamo][reland][inline-inbuilt-nn-modules] Mark attributes of nn mod… (#133714) 2024-08-20 05:57:52 +00:00
base.py [dynamo] revert map/zip iterator related changes (#132528) 2024-08-04 18:46:55 +00:00
builder.py [Dynamo] Support pop torch function mode stack (#133131) 2024-08-20 07:14:42 +00:00
builtin.py [dynamo] simplify implementation for builtins.sum (#133779) 2024-08-19 22:14:34 +00:00
constant.py [easy][dynamo] Add tx as an arg in getitem_const (#132899) 2024-08-07 21:35:41 +00:00
ctx_manager.py [Dynamo] Support torch.cuda.device ctx manager (#133385) 2024-08-16 17:05:55 +00:00
dicts.py [BE][Easy] enable ruff rule PIE790: unnecessary pass statement (#133200) 2024-08-15 15:50:19 +00:00
distributed.py Revert "[dtensor] move DTensor to public namespace (#133113)" 2024-08-19 05:00:19 +00:00
functions.py [RFC][dynamo] add decorator to register polyfill for unsupported C++ function to avoid graph break (#133712) 2024-08-19 22:14:33 +00:00
higher_order_ops.py Add basic mypy annotations to dynamo (#132415) 2024-08-04 18:43:36 +00:00
iter.py Add itertools.islice support in dynamo (#133893) 2024-08-20 05:55:53 +00:00
lazy.py Add basic mypy annotations to dynamo (#132415) 2024-08-04 18:43:36 +00:00
lists.py [dynamo] Support object creation of classes with custom __new__ (#132977) 2024-08-16 03:09:23 +00:00
misc.py [dynamo] support random.Random (#133725) 2024-08-19 22:34:44 +00:00
nn_module.py [dynamo][reland][inline-inbuilt-nn-modules] Mark attributes of nn mod… (#133714) 2024-08-20 05:57:52 +00:00
optimizer.py [Inductor UT] Reuse inductor UT for intel GPU test/inductor/test_compiled_optimizers.py (#133083) 2024-08-17 01:15:26 +00:00
script_object.py Add basic mypy annotations to dynamo (#132415) 2024-08-04 18:43:36 +00:00
sdpa.py Grouped Query Attention (#132689) 2024-08-07 05:35:36 +00:00
tensor.py Add basic mypy annotations to dynamo (#132415) 2024-08-04 18:43:36 +00:00
torch_function.py [Dynamo] Support pop torch function mode stack (#133131) 2024-08-20 07:14:42 +00:00
torch.py [Dynamo] Support push torch function mode stack (#133132) 2024-08-20 07:14:47 +00:00
user_defined.py Fix DeviceContext bug (#133729) 2024-08-20 07:14:37 +00:00