pytorch/torch/_dynamo/variables
Joel Schlosser d6dd67a248 Dynamo: Use out-of-place binary ops instead of in-place (#95446)
Fixes issues with things like:
```python
x = 2
x += y.shape[0]
```

resulting in invalid `2 += y.shape[0]` code in the FX graph.

Fix: Whenever dynamic shapes are involved, insert the out-of-place op to the FX graph instead of the in-place op.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/95446
Approved by: https://github.com/ezyang
2023-02-27 02:10:37 +00:00
..
__init__.py Rename DynamicShapeVariable to SymNodeVariable cause thats what it is (#94152) 2023-02-08 10:41:10 +00:00
base.py [BE] [2/3] Rewrite super() calls in functorch and torch (#94588) 2023-02-10 21:16:33 +00:00
builder.py [Dynamo] Support CUDA stream passed from outside of torch.compile decrator (#94627) 2023-02-25 19:15:59 +00:00
builtin.py Dynamo: Use out-of-place binary ops instead of in-place (#95446) 2023-02-27 02:10:37 +00:00
constant.py [BE] [2/3] Rewrite super() calls in functorch and torch (#94588) 2023-02-10 21:16:33 +00:00
dicts.py [Dynamo] No graph break on calling dict & collections.OrderedDict() (#95250) 2023-02-23 09:03:07 +00:00
functions.py [dynamo 3.11] changes to MAKE_FUNCTION and MATCH_KEYS (#94100) 2023-02-21 18:47:34 +00:00
lists.py [dynamo] Fix list contains check (#95092) 2023-02-23 18:22:32 +00:00
misc.py [Dynamo] Support CUDA stream passed from outside of torch.compile decrator (#94627) 2023-02-25 19:15:59 +00:00
nn_module.py Support nn.Module forward hooks in torchdynamo (#92125) 2023-02-24 05:10:29 +00:00
tensor.py [BE] [2/3] Rewrite super() calls in functorch and torch (#94588) 2023-02-10 21:16:33 +00:00
torch.py [SDPA] Fix bug in parsing scaled_dot_product_attention arguments (#95311) 2023-02-23 03:12:46 +00:00
user_defined.py [Dynamo] Remove torch.autograd.profiler.profile workaround in UserDefined (#95504) 2023-02-25 05:15:01 +00:00