d8c8ba2440
Fix unused Python variables in test/[e-z]* ( #136964 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/136964
Approved by: https://github.com/justinchuby , https://github.com/albanD
2024-12-18 23:02:30 +00:00
d9576c9440
Fix failures when default is flipped for weights_only ( #127627 )
...
Tests on XLA shard not fixed yet but there is an issue here https://github.com/pytorch/xla/issues/7799
Pull Request resolved: https://github.com/pytorch/pytorch/pull/127627
Approved by: https://github.com/albanD
ghstack dependencies: #132349
2024-08-16 00:22:43 +00:00
221350e3a4
Add None return type to init -- tests ( #132352 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/132352
Approved by: https://github.com/ezyang
ghstack dependencies: #132335 , #132351
2024-08-01 15:44:51 +00:00
ae3ac9cb64
Only test _is_param if doing instance check on Parameter base ( #130578 )
...
Fixes https://github.com/pytorch/pytorch/issues/111348
Signed-off-by: Edward Z. Yang <ezyang@meta.com >
Pull Request resolved: https://github.com/pytorch/pytorch/pull/130578
Approved by: https://github.com/Skylion007
2024-07-12 13:55:13 +00:00
6791b0c09e
Change default torch_function behavior to be disabled when torch_dispatch is defined (take 2) ( #120632 )
...
This does not introduce a new test but is tested by checking that all the classes we already have still behave as before now that they don't explicitly disable torch_function.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/120632
Approved by: https://github.com/ezyang
2024-03-09 01:08:37 +00:00
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
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
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
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
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
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
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