mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[reland] Allow setting grad_dtype on leaf tensors (#164751)
ghstack-source-id: e44b3941530be83a630ec93f1478eec741ffca2e Pull-Request-resolved: https://github.com/pytorch/pytorch/pull/162815 Fixes #ISSUE_NUMBER Relanding due to internal weirdness. Separate PR to codev w/o ghstack. Pull Request resolved: https://github.com/pytorch/pytorch/pull/164751 Approved by: https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
001e1d2637
commit
71aefd5595
@ -1351,6 +1351,7 @@ def get_testing_overrides() -> dict[Callable, Callable]:
|
||||
Tensor._grad.__get__: lambda self: -1,
|
||||
Tensor._grad_fn.__get__: lambda self: -1,
|
||||
Tensor.grad_fn.__get__: lambda self: -1,
|
||||
Tensor.grad_dtype.__get__: lambda self: -1,
|
||||
Tensor._version.__get__: lambda self: -1,
|
||||
Tensor._autocast_to_reduced_precision: lambda self, cuda_enabled, cpu_enabled, cuda_dtype, cpu_dtype: -1,
|
||||
Tensor._autocast_to_full_precision: lambda self, cuda_enabled, cpu_enabled: -1,
|
||||
|
Reference in New Issue
Block a user