name | about | labels |
---|---|---|
Bug Report | Use this template for reporting a bug | kind/bug |
Ascend
/GPU
/CPU
):Uncomment only one
/device <>
line, hit enter to put that in a new line, and remove leading whitespaces from that line:/device ascend
test_get_group_rank_from_world_rank
'''
TEST_SUMMARY:通信算子get_group_rank_from_world_rank正常场景测试,自定义group
'''
def test_get_group_rank_from_world_rank():
with MetaFactory():
create_group("my_group", [0,1,2,3,4,5,6,7])
group = "my_group"
group_rank_id = get_group_rank_from_world_rank(0,group)
assert group_rank_id == 0
pynative, Create multi group error
case pass
def test_get_group_rank_from_world_rank():
with MetaFactory():
create_group("my_group", [0,1,2,3,4,5,6,7])
../test_get_group_rank_from_world_rank.py:16:
/root/archiconda3/envs/vm3.7/lib/python3.7/site-packages/mindspore/communication/management.py:321: in create_group
_create_group_helper(group, rank_ids, backend=GlobalComm.BACKEND)
/root/archiconda3/envs/vm3.7/lib/python3.7/site-packages/mindspore/communication/_comm_helper.py:149: in wrapper
return func(*args, **kargs)
/root/archiconda3/envs/vm3.7/lib/python3.7/site-packages/mindspore/communication/_comm_helper.py:355: in _create_group_helper
hccl.create_group(group, rank_size, rank_ids)
group = 'my_group', rank_num = 8, rank_ids = [0, 1, 2, 3, 4, 5, ...]
def create_group(group, rank_num, rank_ids):
"""
Create group.
A function that creates a collection communication group which includes 'rank_num'
device and 'rank_ids' is the list of these ranks of devices.
Note:
The world group can not be created.
Returns:
None
"""
check_group(group)
check_rank_num(rank_num)
if isinstance(rank_ids, (list)):
if rank_num != len(rank_ids):
raise ValueError('Rank number is not equal to the length of rank_ids.')
for rank_id in rank_ids:
if not isinstance(rank_id, (int)) or rank_id < 0:
raise ValueError('Rank id must be unsigned integer!')
c_array_rank_ids = c_array(ctypes.c_uint, rank_ids)
c_rank_num = ctypes.c_uint(rank_num)
c_group = c_str(group)
ret = HCCL_LIB_CTYPES.HcomCreateGroup(c_group, c_rank_num, c_array_rank_ids)
if ret != 0:
raise RuntimeError('Create group error, the error code is ' + str(ret))
E RuntimeError: Create group error, the error code is 2
/root/archiconda3/envs/vm3.7/lib/python3.7/site-packages/mindspore/communication/_hccl_management.py:122: RuntimeError
=============================== warnings summary ===============================
hello, @mu_rong_meng , we suggest you assign this issue to:
你好, @mu_rong_meng , 建议您将这个issue分配给:负责人zhongjicheng,协作人pandoublefeng,liu_xiao_93
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
2021年8月26日CCB:pynative模式下使用hccl单算子,不支持group通信,需要补充资料说明pynative下不支持group通信,同时补充需求统一pynative,异构、图模式等场景下的group通信方案。
PyNative当前不支持多Group,需求单号:
https://e.gitee.com/mind_spore/projects/69994/issues/list?issue=I47COY
登录 后才可以发表评论