Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions python/tvm/relax/frontend/nn/op.py
Original file line number Diff line number Diff line change
Expand Up @@ -1719,6 +1719,28 @@ def ccl_allreduce(x: Tensor, op_type: str = "sum", in_group: bool = True, name="
return wrap_nested(_op.ccl.allreduce(x._expr, op_type, in_group), name)


def ccl_allgather(x: Tensor, num_workers: int, name="ccl_allgather"):
"""CCL Allgather operator

Parameters
----------
x : relax.Expr
The input tensor.

num_workers : int
Number of workers.

name : str
Name hint for this operation.

Returns
-------
result : Tensor
The result tensor of allgather.
"""
return wrap_nested(_op.ccl.allgather(x._expr, num_workers), name)


def ccl_broadcast_from_worker0(x: Tensor, name="broadcast_from_worker"):
"""Broadcast data from worker-0 to all other workers.

Expand Down