mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
Revert "Remove split functional wrapper (#74727)"
This reverts commit a58876ace78df1cfeb136cad592487f34d7e02f1. Reverted https://github.com/pytorch/pytorch/pull/74727 on behalf of https://github.com/seemethere due to Fails internal use cases, might extend out to external use cases as well. Need to assess overall impact of this change more widely
This commit is contained in:
@ -393,13 +393,11 @@ $5 = torch._ops.aten.clone.default($4, memory_format=torch.contiguous_format)'''
|
||||
def test_list_ret(self) -> None:
|
||||
# test all sequence types are permissible returns
|
||||
for list_type in (list, tuple):
|
||||
class A(torch.Tensor):
|
||||
class A(torch._C._TensorBase):
|
||||
@staticmethod
|
||||
def __new__(cls, elem):
|
||||
return torch.Tensor._make_subclass(cls, elem, elem.requires_grad)
|
||||
|
||||
__torch_function__ = torch._C._disabled_torch_function_impl
|
||||
|
||||
@classmethod
|
||||
def __torch_dispatch__(cls, func, types, args=(), kwargs=None):
|
||||
if func.overloadpacket == torch.ops.aten.split:
|
||||
|
Reference in New Issue
Block a user