Brian Hirsh
2c8759df9d
Allow storage() to work on python tensor subclasses, but error on future data accesses ( #107417 )
...
This was discussed in feedback from the original version of my "reorder proxy/fake" PR. This PR allows calls to `tensor.untyped_storage()` to **always** return a python storage object to the user. Previously, we would error loudly if we detected that the storage had a null dataptr.
Instead, I updated the python bindings for the python storage methods that I saw involve data access, to throw an error later, only if you try to access those methods (e.g. `storage.data_ptr()` will now raise an error if the data ptr is null).
Pull Request resolved: https://github.com/pytorch/pytorch/pull/107417
Approved by: https://github.com/albanD , https://github.com/ezyang , https://github.com/zou3519
2023-08-22 15:25:31 +00:00
Justin Chu
73e1455327
[BE] Enable ruff's UP rules and autoformat test/ ( #105434 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/105434
Approved by: https://github.com/albanD
2023-07-19 20:36:06 +00:00
Aaron Gokaslan
2f95a3d0fc
[BE]: Apply ruff PERF fixes to torch ( #104917 )
...
Applies automated ruff fixes in the PERF modules and enables all automatic ones. I also updated ruff which applied some additional fixes.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/104917
Approved by: https://github.com/ezyang , https://github.com/albanD
2023-07-11 20:45:21 +00:00
PyTorch MergeBot
70cce9f8d1
[torchdynamo hash update] update the pinned torchdynamo hash ( #85225 )
...
This PR is auto-generated nightly by [this action](https://github.com/pytorch/pytorch/blob/master/.github/workflows/_update-commit-hash.yml ).
Update the pinned torchdynamo hash.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/85225
Approved by: https://github.com/pytorchbot , https://github.com/voznesenskym
2022-09-26 20:07:13 +00:00
PyTorch MergeBot
207a5a8fa9
[torchdynamo hash update] update the pinned torchdynamo hash ( #84383 )
...
This PR is auto-generated nightly by [this action](https://github.com/pytorch/pytorch/blob/master/.github/workflows/_update-commit-hash.yml ).
Update the pinned torchdynamo hash.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/84383
Approved by: https://github.com/pytorchbot , https://github.com/ezyang
2022-09-06 13:23:19 +00:00
Joel Benjamin Schlosser
0794d59d76
Throw a nice error when SubTensor.__torch_dispatch__() returns the wrong type for detach()
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/77655
Approved by: https://github.com/albanD
2022-05-18 20:00:42 +00:00
Joel Benjamin Schlosser
bc34cf5fe4
Support for tensor subclasses as parameters
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73459
Approved by: https://github.com/ezyang , https://github.com/albanD
2022-04-27 19:28:55 +00:00