2022-06-23 09:34:59 +00:00
|
|
|
from typing import Optional
|
2022-05-19 04:44:59 +00:00
|
|
|
from colossalai.tensor.distspec import _DistSpec, DistPlacementPattern
|
2022-07-06 08:15:16 +00:00
|
|
|
from .compute_spec import ComputeSpec
|
|
|
|
from colossalai.tensor import ProcessGroup
|
|
|
|
from dataclasses import dataclass
|
2022-06-21 07:38:05 +00:00
|
|
|
|
2022-04-28 02:55:40 +00:00
|
|
|
|
2022-07-06 08:15:16 +00:00
|
|
|
@dataclass
|
|
|
|
class ColoTensorSpec:
|
|
|
|
pg: ProcessGroup
|
|
|
|
dist_attr: Optional[_DistSpec] = _DistSpec(DistPlacementPattern.REPLICATE)
|
|
|
|
compute_attr: Optional[ComputeSpec] = None
|