pypto.distributed.create_shmem_tensor【免费下载链接】pyptoPyPTO发音: pai p-t-oParallel Tensor/Tile Operation编程范式。项目地址: https://gitcode.com/cann/pypto产品支持情况产品是否支持Atlas A3 推理系列产品√Atlas A2 推理系列产品√功能说明为指定通信域创建一个 shared memory tensor用于不同 pe 之间进行数据访问。函数原型create_shmem_tensor(group_name: str, n_pes: int, dtype: DataType, shape: list[int]) - ShmemTensor参数说明参数名输入/输出说明group_name输入指定需要创建 shared memory tensor 的通信域的名字字符串长度: 1~128。支持的类型为str 类型。n_pes输入通信域中的 pe 总数n_pes 0。同一个 group_name 下的创建 shared memory tensor 必须保证 n_pes 一致。支持的类型为 int 类型。dtype输入创建的 shared memory tensor 的数据类型。支持的类型为 pypto 的数据类型可选值DT_INT32、DT_FP16、DT_FP32、DT_BF16。shape输入创建的 shared memory tensor 的形状。参数类型为 list[int] 类型。运行时判断当前创建的 shared memory tensor 是否超出共享区大小进行报错提示。支持的 shmem Tensor 维度2 - 4 维。返回值说明生成一个 shared memory tensor 用于不同 pe 之间进行数据访问。约束说明无调用示例data pypto.distributed.create_shmem_tensor(group_nametp, n_pes8, dtypepypto.DT_FP16, shape[64, 128])【免费下载链接】pyptoPyPTO发音: pai p-t-oParallel Tensor/Tile Operation编程范式。项目地址: https://gitcode.com/cann/pypto创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考