asc.language.adv.power【免费下载链接】pyasc本项目为Python用户提供算子编程接口支持在昇腾AI处理器上加速计算接口与Ascend C一一对应并遵守Python原生语法。项目地址: https://gitcode.com/cann/pyascasc.language.adv.power(dst: LocalTensor, src0: LocalTensor, src1: LocalTensor, count: int | None None, temp_buffer: LocalTensor | None None, is_reuse_source: bool False) → None实现按元素做幂运算功能。对应的Ascend C函数原型template typename T, bool isReuseSource false __aicore__ inline void Power(const LocalTensorT dstTensor, const LocalTensorT src0Tensor, const LocalTensorT src1Tensor, const LocalTensoruint8_t sharedTmpBuffer, uint32_t calCount) template typename T, bool isReuseSource false __aicore__ inline void Power(const LocalTensorT dstTensor, const LocalTensorT src0Tensor, const LocalTensorT src1Tensor, const LocalTensoruint8_t sharedTmpBuffer) template typename T, bool isReuseSource false __aicore__ inline void Power(const LocalTensorT dstTensor, const LocalTensorT src0Tensor, const LocalTensorT src1Tensor, uint32_t calCount) template typename T, bool isReuseSource false __aicore__ inline void Power(const LocalTensorT dstTensor, const LocalTensorT src0Tensor, const LocalTensorT src1Tensor)参数说明is_reuse_source是否允许修改源操作数默认值为false。dst目的操作数。类型为LocalTensor支持的TPosition为VECIN/VECCALC/VECOUT。src0源操作数。类型为LocalTensor支持的TPosition为VECIN/VECCALC/VECOUT。源操作数的数据类型需要与目的操作数保持一致。src1源操作数。类型为LocalTensor支持的TPosition为VECIN/VECCALC/VECOUT。源操作数的数据类型需要与目的操作数保持一致。temp_buffer临时内存空间。类型为LocalTensor支持的TPosition为VECIN/VECCALC/VECOUT。count参与计算的元素个数。约束说明不支持源操作数与目的操作数地址重叠。操作数地址对齐要求请参见 《Ascend C算子开发接口》 中的“通用说明和约束-通用地址对齐约束”。调用示例asc.adv.power(dst, src0, src1)【免费下载链接】pyasc本项目为Python用户提供算子编程接口支持在昇腾AI处理器上加速计算接口与Ascend C一一对应并遵守Python原生语法。项目地址: https://gitcode.com/cann/pyasc创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
CANN/pyasc幂运算函数API文档
发布时间:2026/7/5 2:38:26
asc.language.adv.power【免费下载链接】pyasc本项目为Python用户提供算子编程接口支持在昇腾AI处理器上加速计算接口与Ascend C一一对应并遵守Python原生语法。项目地址: https://gitcode.com/cann/pyascasc.language.adv.power(dst: LocalTensor, src0: LocalTensor, src1: LocalTensor, count: int | None None, temp_buffer: LocalTensor | None None, is_reuse_source: bool False) → None实现按元素做幂运算功能。对应的Ascend C函数原型template typename T, bool isReuseSource false __aicore__ inline void Power(const LocalTensorT dstTensor, const LocalTensorT src0Tensor, const LocalTensorT src1Tensor, const LocalTensoruint8_t sharedTmpBuffer, uint32_t calCount) template typename T, bool isReuseSource false __aicore__ inline void Power(const LocalTensorT dstTensor, const LocalTensorT src0Tensor, const LocalTensorT src1Tensor, const LocalTensoruint8_t sharedTmpBuffer) template typename T, bool isReuseSource false __aicore__ inline void Power(const LocalTensorT dstTensor, const LocalTensorT src0Tensor, const LocalTensorT src1Tensor, uint32_t calCount) template typename T, bool isReuseSource false __aicore__ inline void Power(const LocalTensorT dstTensor, const LocalTensorT src0Tensor, const LocalTensorT src1Tensor)参数说明is_reuse_source是否允许修改源操作数默认值为false。dst目的操作数。类型为LocalTensor支持的TPosition为VECIN/VECCALC/VECOUT。src0源操作数。类型为LocalTensor支持的TPosition为VECIN/VECCALC/VECOUT。源操作数的数据类型需要与目的操作数保持一致。src1源操作数。类型为LocalTensor支持的TPosition为VECIN/VECCALC/VECOUT。源操作数的数据类型需要与目的操作数保持一致。temp_buffer临时内存空间。类型为LocalTensor支持的TPosition为VECIN/VECCALC/VECOUT。count参与计算的元素个数。约束说明不支持源操作数与目的操作数地址重叠。操作数地址对齐要求请参见 《Ascend C算子开发接口》 中的“通用说明和约束-通用地址对齐约束”。调用示例asc.adv.power(dst, src0, src1)【免费下载链接】pyasc本项目为Python用户提供算子编程接口支持在昇腾AI处理器上加速计算接口与Ascend C一一对应并遵守Python原生语法。项目地址: https://gitcode.com/cann/pyasc创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考