mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-25 11:44:03 +00:00
Fixed docstring in colossalai (#171)
This commit is contained in:
@@ -18,9 +18,13 @@ def all_gather(tensor: Tensor, dim: int, parallel_mode: ParallelMode, async_op:
|
||||
:param tensor: Tensor to be gathered
|
||||
:param dim: The dimension concatenating in
|
||||
:param parallel_mode: Parallel group mode used in this communication
|
||||
:param async_op: Whether operations are asynchronous
|
||||
|
||||
:type tensor: :class:`torch.Tensor`
|
||||
:type dim: int
|
||||
:type parallel_mode: :class:`colossalai.context.ParallelMode`
|
||||
:type async_op: bool, optional
|
||||
|
||||
:return: The tensor generated by all-gather
|
||||
:rtype: :class:`torch.Tensor`
|
||||
"""
|
||||
@@ -56,9 +60,15 @@ def reduce_scatter(tensor: Tensor,
|
||||
:param tensor: Tensor to be reduced and scattered
|
||||
:param dim: The dimension scattering in
|
||||
:param parallel_mode: Parallel group mode used in this communication
|
||||
:param op: The type of reduce operation
|
||||
:param async_op: Whether operations are asynchronous
|
||||
|
||||
:type tensor: :class:`torch.Tensor`
|
||||
:type dim: int
|
||||
:type parallel_mode: :class:`colossalai.context.ParallelMode`
|
||||
:type op: ReduceOp, optional
|
||||
:type async_op: bool, optional
|
||||
|
||||
:return: The tensor generated by reduce-scatter
|
||||
:rtype: :class:`Tensor`
|
||||
"""
|
||||
|
Reference in New Issue
Block a user