Commit 1e690b6
Replace TORCH_INTERNAL_ASSERT with TORCH_CHECK in set_history (pytorch#155453)
Fixes pytorch#154357
## Test Result
```bash
>>> import torch
>>>
>>> x = torch.tensor(1, device=torch.device('cpu'))
>>> y = torch.tensor([1.0, 2.0, 3.0], requires_grad=True)
>>> z0 = (x.abs() * y).prod(dtype=torch.int16)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: Autograd not support dtype: Short
```
Pull Request resolved: pytorch#155453
Approved by: https://github.com/albanD, https://github.com/soulitzer1 parent 110ae0f commit 1e690b6
File tree
2 files changed
+5
-4
lines changed- test/inductor
- torch/csrc/autograd/functions
2 files changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3872 | 3872 | | |
3873 | 3873 | | |
3874 | 3874 | | |
3875 | | - | |
3876 | | - | |
3877 | | - | |
| 3875 | + | |
3878 | 3876 | | |
3879 | 3877 | | |
3880 | 3878 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
0 commit comments