
pypto.index_add__ub【免费下载链接】pyptoPyPTO发音: pai p-t-oParallel Tensor/Tile Operation编程范式。项目地址: https://gitcode.com/cann/pypto产品支持情况产品是否支持Ascend 950PR/Ascend 950DT√Atlas A3 训练系列产品/Atlas A3 推理系列产品√Atlas A2 训练系列产品/Atlas A2 推理系列产品√功能说明pypto.index_add_的ub版本可参考pypto.index_add_。函数原型index_add__ub(input: Tensor, dim: int, index: Tensor, source: Tensor, *, alpha: Union[int, float] 1) - Tensor约束说明index必须是整数类型DT_INT32 或 DT_INT64值不超过input在dim维度上的Shape大小维数为1Shape大小与 source 所在dim轴的Shape大小相同dim为int类型取值范围-input.dim dim input.diminput和source的数据类型和维数均相同input.shape和source.shape的dim轴viewshape不可切要求viewshape[dim]max(input.shape[dim], source.shape[dim])其余维度的Shape大小不做限制TileShape的维度与input相同input, source 的 dim 轴以及 index 均不可切所有输入和输出的TileShape大小总和不能超过UB内存的大小。调用示例TileShape设置示例调用该operation接口前应通过set_vec_tile_shapes设置TileShape。 如输入input为[m, n, p]dim为1输入source为[m, t, p]输入index为[t]输出为[m, n, p]TileShape设置为[m1, t1, p1]则m1, p1分别用于切分m, p轴。 n轴t轴不可切必须保证n轴t轴全载。pypto.set_vec_tile_shapes(4, 16, 32)【免费下载链接】pyptoPyPTO发音: pai p-t-oParallel Tensor/Tile Operation编程范式。项目地址: https://gitcode.com/cann/pypto创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考