communication_op
¶
Functions¶
fastvideo.distributed.communication_op.sequence_model_parallel_all_gather
¶
sequence_model_parallel_all_gather(input_: Tensor, dim: int = -1) -> Tensor
All-gather the input tensor across model parallel group.
fastvideo.distributed.communication_op.sequence_model_parallel_all_to_all_4D
¶
sequence_model_parallel_all_to_all_4D(input_: Tensor, scatter_dim: int = 2, gather_dim: int = 1) -> Tensor
All-to-all communication of 4D tensors (e.g. QKV matrices) across sequence parallel group.
Source code in fastvideo/distributed/communication_op.py
fastvideo.distributed.communication_op.tensor_model_parallel_all_gather
¶
tensor_model_parallel_all_gather(input_: Tensor, dim: int = -1) -> Tensor
All-gather the input tensor across model parallel group.
fastvideo.distributed.communication_op.tensor_model_parallel_all_reduce
¶
All-reduce the input tensor across model parallel group.