mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Mark torch.get_device as overridable at the python level (#132706)
Summary: - add a value to `get_testing_overrides` function for `torch.get_device()` - remove `torch.get_device()` from the `get_ignored_functions` list Test Plan: Existing override testing infra, which should pick up the updates to these two variables. Closes the loop on: https://github.com/pytorch/pytorch/pull/132567 Pull Request resolved: https://github.com/pytorch/pytorch/pull/132706 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
84e5f34fd1
commit
2b4af6fa74
@ -150,7 +150,6 @@ def get_ignored_functions() -> Set[Callable]:
|
||||
torch.wait,
|
||||
torch.as_tensor,
|
||||
torch.from_numpy,
|
||||
torch.get_device,
|
||||
torch.tensor,
|
||||
torch.default_generator,
|
||||
torch.has_cuda,
|
||||
@ -653,6 +652,7 @@ def get_testing_overrides() -> Dict[Callable, Callable]:
|
||||
torch.gather: lambda input, dim, index, out=None, sparse_grad=False: -1,
|
||||
torch.gcd: lambda input, other, out=None: -1,
|
||||
torch.ge: lambda input, other, out=None: -1,
|
||||
torch.get_device: lambda input: -1,
|
||||
torch.greater_equal: lambda input, other, out=None: -1,
|
||||
torch.geqrf: lambda input, out=None: -1,
|
||||
torch.i0: lambda input, out=None: -1,
|
||||
|
Reference in New Issue
Block a user