mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-06 19:40:28 +00:00
[tensor] revert local view back (#1178)
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user