CANN/pyasc extract函数API文档
asc.language.adv.extract【免费下载链接】pyasc本项目为Python用户提供算子编程接口支持在昇腾AI处理器上加速计算接口与Ascend C一一对应并遵守Python原生语法。项目地址: https://gitcode.com/cann/pyascasc.language.adv.extract(dst_value: LocalTensor, dst_index: LocalTensor, src: LocalTensor, repeat_time: int) → None处理Sort的结果数据输出排序后的value和index。对应的Ascend C函数原型template typename T __aicore__ inline void Extract(const LocalTensorT dstValue, const LocalTensoruint32_t dstIndex, const LocalTensorT sorted, const int32_t repeatTime)参数说明dst_value排序结果的数值部分。dst_index排序结果的索引部分。src源操作数。repeat_time重复迭代次数。约束说明操作数地址对齐要求请参见 《Ascend C算子开发接口》 中的“通用说明和约束-通用地址对齐约束”。调用示例dst_value_local asc.LocalTensor(dtypeasc.float16, posasc.TPosition.VECOUT, addr0, tile_size128) dst_index_local asc.LocalTensor(dtypeasc.uint32, posasc.TPosition.VECOUT, addr0, tile_size128) sort_tmp_local asc.LocalTensor(dtypeasc.float16, posasc.TPosition.VECIN, addr0, tile_size256) asc.extract(dst_valuedst_value_local, dst_indexdst_index_local, srcsort_tmp_local, repeat_time4)【免费下载链接】pyasc本项目为Python用户提供算子编程接口支持在昇腾AI处理器上加速计算接口与Ascend C一一对应并遵守Python原生语法。项目地址: https://gitcode.com/cann/pyasc创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考