HcclAlltoAllV

函数原型

HcclResult HcclAlltoAllV(const void *sendBuf, const void *sendCounts, const void *sdispls, HcclDataType sendType,

​ const void *recvBuf, const void *recvCounts, const void *rdispls, HcclDataType recvType,

​ HcclComm comm, aclrtStream stream);

功能说明

集合通信域alltoallv操作接口。向通信域内所有rank发送数据(数据量可以定制),并从所有rank接收数据。

参数说明

参数名

输入/输出

描述

sendBuf

输入

源数据buffer地址。

sendCounts

输入

表示发送数据量的uint64数组,sendCounts[i] = n 表示本rank发给rank i的数据量为n,

sdispls

输入

表示发送偏移量的uint64数组,sdispls[i] = n 表示本rank发给rank i的数据在sendBuf的起始位置相对sendBuf的偏移量,以sendType为基本单位

sendType

输入

若sendType为float32,sendCounts[i] = n表示本rank发给rank i n个float32数据

recvBuf

输出

目的数据buffer地址,集合通信结果输出至此buffer中。

recvCounts

输入

表示接收数据量的uint64数组,recvCounts[i] = n 表示本rank从rank i收到的的数据量为n

rdispls

输入

表示接收偏移量的uint64数组,rdispls[i] = n 表示本rank从rank i的收到数据存放在在recvBuf的起始位置相对recvBuf的偏移量,以recvType为基本单位

recvType

输入

若recvType为float32,recvCounts[i] = n表示本rank从ank i收到n个float32数据

comm

输入

集合通信操作所在的通信域。

stream

输入

本rank所使用的stream。

返回值

HcclResult:接口成功返回HCCL_SUCCESS。其他失败。

约束说明

alltoallv的通信域需要满足:单server1p、2p通信域要在同一个cluster内(server内0-3卡和4-7卡各为一个cluster),单server4p、8p和多server通信域中rank要以cluster为基本单位,并且server间cluster选取要一致。