[tensor] refactor parallel action (#1007)

* refactor parallel action

* polish unit tests
This commit is contained in:
ver217
2022-05-20 20:19:58 +08:00
committed by GitHub
parent 9e3d602dba
commit a3b66f6def
12 changed files with 45 additions and 77 deletions

View File

@@ -33,3 +33,6 @@ class ColoParameter(ColoTensor):
tensor = tensor.as_subclass(ColoParameter)
tensor.__init__(tensor, requires_grad=requires_grad, spec=spec)
return tensor
def __repr__(self):
return f'ColoParameter: {torch.Tensor.__repr__(self)}'