334 Star 1.5K Fork 864

MindSpore / docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
create_group.md 1.94 KB
一键复制 编辑 原始数据 按行查看 历史
luojianing 提交于 2023-07-21 15:16 . replace target=blank

Comparing the Function Differences with torch.distributed.new_group

View Source On Gitee

torch.distributed.new_group

torch.distributed.new_group(
    ranks=None,
    timeout=datetime.timedelta(0, 1800),
    backend=None
)

For more information, see torch.distributed.new_group.

mindspore.communication.create_group

mindspore.communication.create_group(group, rank_ids)

For more information, see mindspore.communication.create_group.

Differences

PyTorch: This interface passes in the rank list of the communication domain to be constructed, specifies the backend to create the specified communication domain, and returns the created communication domain.

MindSpore: This interface passes in the group name and the rank list of the communication domain to be constructed, creates a communication domain with the incoming group name as the key, and does not return any value.

Class Sub-class PyTorch MindSpore Difference
Param Param 1 - group PyTorch does not have this param. MindSpore: the group name
Param 2 ranks rank_ids The functionalities are the same, but have different names
Param 3 timeout - PyTorch: the timeout value. MindSpore does not have this param, and should set the corresponding environment variables before calling this interface
Param 4 backend - PyTorch: the communication backend. MindSpore does not have this param, and should set the corresponding environment variables before calling this interface
1
https://gitee.com/mindspore/docs.git
git@gitee.com:mindspore/docs.git
mindspore
docs
docs
r2.0

搜索帮助