[tensor] revert local view back (#1178)

This commit is contained in:
Jiarui Fang
2022-06-27 18:38:34 +08:00
committed by GitHub
parent 0dd4e2bbfb
commit 1b657f9ce1
4 changed files with 10 additions and 20 deletions

View File

@@ -101,13 +101,3 @@ class ColoParameter(ColoTensor, torch.nn.Parameter):
# TODO(jzy) we don't support object reflection now.
# distspec cannot be pickled or rebuilt because it's tightly connected to runtime attribute `process_group`.
raise NotImplementedError
#### the ColoParameter should use the torch.Tensor's builtin methodes ###
def view(self, *args) -> 'ColoTensor':
return super().view_base(*args)
def size(self, *args, **kwargs) -> torch.Size:
# import inspect
# print(*['{:40}| {}:{}\n'.format(x.function, x.filename, x.lineno) for x in inspect.stack()])
return super().size_base(*args, **kwargs)