mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-04 02:26:51 +00:00
[tensor] refactor parallel action (#1007)
* refactor parallel action * polish unit tests
This commit is contained in:
@@ -45,7 +45,7 @@ class ColoTensor(torch.Tensor):
|
||||
self._spec = spec
|
||||
|
||||
def has_spec(self) -> bool:
|
||||
return self._spec.num_action > 0
|
||||
return self._spec.parallel_action is not None
|
||||
|
||||
def is_model_data(self) -> bool:
|
||||
return self._type == TensorType.MODEL
|
||||
|
Reference in New Issue
Block a user