link
Applicability
Product |
Supported (√/x) |
|---|---|
x |
|
√ |
|
√ |
|
x |
|
x |
|
x |
Note: For
Function Description
Establishes a bilateral link by creating a communicator. (The more user-friendly link_clusters API for unilateral link establishment is recommended, which does not require specifying rank table information.)
If RDMA NIC communication is required within a single server, set the environment variable HCCL_INTRA_ROCE_ENABLE=1.
Prototype
1 | link(comm_name: str, cluster_rank_info: Dict[int, int], rank_table: str) -> int |
Parameters
Example
Click GitCode, select the matching version, and obtain the sample from the examples/python directory.
Returns
In normal cases, a communicator ID is returned.
If a parameter is incorrect, a TypeError or ValueError may be thrown.
Constraints
- All clusters in the communicator need to initiate the request at the same time.
- A maximum of four nodes are supported in a communicator.
- It is recommended that the number of communicator be less than or equal to 16. A maximum of 512 communicators are supported. Excessive links may cause OOM errors and deteriorate the cache transmission performance.
- Memory descriptors are exchanged in the communicator at the bottom layer of the link. Before link establishment, configure memory pools or register the memory for cache to be transmitted.
- Subprocesses cannot be called in fork mode.
- A maximum of 16 links can be established concurrently. If more than 16 links are established, they will be queued at the bottom layer.
- Ensure that cyclic dependency does not occur during multi-communicator link establishment.