Edward Z. Yang
fc7dcb684a
Run optimizer tests with fake tensors ( #89643 )
...
This is a slight regression: RAdam and Adagrad don't appear to
trace at all under fake tensors. But I think this is a more accurate
reflection of the current state of affairs.
Along the way fix some problems on the fake tensor path.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/89643
Approved by: https://github.com/anjali411
2022-11-24 22:46:49 +00:00
Edward Z. Yang
6fb6eb0a74
Support unspecialized integers with dynamic shapes ( #89639 )
...
Previously, we hackily wrapped unspecialized integers into
tensors and treated them as tensor inputs. Sometimes, downstream
operations would not be able to deal with the tensor input. Now,
we wrap them into SymInt, so more correct overload selection occurs.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/89639
Approved by: https://github.com/anjali411
2022-11-24 22:46:42 +00:00
Edward Z. Yang
94a88b53ed
Remove fake_tensors_available ( #89637 )
...
As we are one repo now, they are always available.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/89637
Approved by: https://github.com/anjali411
2022-11-24 19:28:10 +00:00
Yanbo Liang
37e46a5035
[Dynamo] Fix several bugs & code refactor in RangeVariable ( #89322 )
...
Fix bug in [7k github models](https://github.com/pytorch/torchdynamo/issues/1884 ): https://github.com/jansel/pytorch-jit-paritybench/blob/master/generated/test_clovaai_stargan_v2.py
```
E TypeError: 'list' object cannot be interpreted as an integer
E
E from user code:
E File "/scratch/ybliang/work/repos/pytorch-jit-paritybench/generated/test_clovaai_stargan_v2.py", line 335, in forward
E idx = torch.LongTensor(range(y.size(0)))
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/89322
Approved by: https://github.com/jansel
2022-11-23 19:44:48 +00:00
Yanbo Liang
b72f5b9ae3
[Dynamo] Support typing.Mapping & Support function as argument ( #88963 )
...
These missing features come from https://github.com/pytorch/benchmark/pull/1302 , where we'd like to enable E2E hf_bert dynamo train/eval. The dependent [HuggingFace accelerate library](https://huggingface.co/docs/accelerate/index ) requires these improvements.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/88963
Approved by: https://github.com/jansel
2022-11-17 06:57:42 +00:00
Michael Voznesensky
06ce1338bc
[dynamo] Port all pytorch/dynamo and test/dynamo pieces over from symbolic-shapes branch ( #88768 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/88768
Approved by: https://github.com/jansel , https://github.com/ezyang
2022-11-13 04:50:21 +00:00
PyTorch MergeBot
ba4d5aae06
Revert "rename DisableTorchFunction to DisableTorchFunctionSubclass ( #88218 )"
...
This reverts commit 7f28be10e5 .
Reverted https://github.com/pytorch/pytorch/pull/88218 on behalf of https://github.com/izaitsevfb due to BC-breaking change, D41211901
2022-11-11 19:13:05 +00:00
samdow
7f28be10e5
rename DisableTorchFunction to DisableTorchFunctionSubclass ( #88218 )
...
First half of #87990 . This doesn't change any of the behavior and is just a rename
Pull Request resolved: https://github.com/pytorch/pytorch/pull/88218
Approved by: https://github.com/ezyang , https://github.com/zou3519
2022-11-10 14:51:13 +00:00
Yanbo Liang
56b150ac63
[Dynamo] Support optimizing over any Tensor with requires_grad = True ( #87141 )
...
Fixes https://github.com/pytorch/torchdynamo/issues/1604
Re-submit for https://github.com/pytorch/torchdynamo/pull/1646
Pull Request resolved: https://github.com/pytorch/pytorch/pull/87141
Approved by: https://github.com/jansel
2022-10-19 22:13:07 +00:00
Jason Ansel
054a2fd6c2
Sync changes from pytorch/torchdynamo ( #87013 )
...
This updates to:
6380959be2
Generated with:
https://github.com/pytorch/torchdynamo/blob/main/copy_to_core.sh
Pull Request resolved: https://github.com/pytorch/pytorch/pull/87013
Approved by: https://github.com/voznesenskym
2022-10-15 21:00:57 +00:00
Jason Ansel
c7c09722ad
Move TorchDynamo into PyTorch core ( #86461 )
...
Context:
https://github.com/pytorch/torchdynamo/issues/1588
This PR moves [TorchDynamo](https://github.com/pytorch/torchdynamo ) and TorchInductor into PyTorch core.
- `torchdynamo` becomes `torch._dynamo`
- `torchinductor` becomes `torch._inductor`
This PR was generated by running `copy_to_core.sh` in https://github.com/pytorch/torchdynamo/pull/1538
Pull Request resolved: https://github.com/pytorch/pytorch/pull/86461
Approved by: https://github.com/voznesenskym
2022-10-13 23:18:06 +00:00