remove unneeded _to_copy meta (#84460)
Fixes #84335
Pull Request resolved: https://github.com/pytorch/pytorch/pull/84460
Approved by: https://github.com/Chillee
diff --git a/torch/_meta_registrations.py b/torch/_meta_registrations.py
index 71678f9..71ddd58 100644
--- a/torch/_meta_registrations.py
+++ b/torch/_meta_registrations.py
@@ -201,23 +201,6 @@
return out
-@register_meta(aten._to_copy.default, False)
-def _to_copy(
- self: torch.Tensor,
- dtype=None,
- layout=None,
- device=None,
- pin_memory=None,
- memory_format=None,
-):
- dtype = self.dtype if dtype is None else dtype
- device = self.device if device is None else device
- layout = self.layout if layout is None else layout
- assert pin_memory is None
- assert memory_format is None
- return self.new_empty(self.shape, dtype=dtype, device=device, pin_memory=pin_memory)
-
-
@register_meta(aten.convolution.default)
def meta_conv(
input_tensor: torch.Tensor,