CANN/asc-devkit:asc_storealign_1st_postupdate函数文档

CANN/asc-devkit:asc_storealign_1st_postupdate函数文档

asc_storealign_1st_postupdate

【免费下载链接】asc-devkit本项目是CANN 推出的昇腾AI处理器专用的算子程序开发语言,原生支持C和C++标准规范,主要由类库和语言扩展层构成,提供多层级API,满足多维场景算子开发诉求。项目地址: https://gitcode.com/cann/asc-devkit

产品支持情况

产品是否支持
Ascend 950PR/Ascend 950DT

功能说明

从矢量数据寄存器搬出第一个元素到UB的接口,忽略mask,向dst_align32b中搬运src第一个元素,接口调用后自动更新目的操作数地址。支持数据类型为b8、b16、b32。

函数原型

__simd_callee__ inline void asc_storealign_1st_postupdate(__ubuf__ int8_t*& dst_align32b, vector_int8_t src, int32_t offset) __simd_callee__ inline void asc_storealign_1st_postupdate(__ubuf__ uint8_t*& dst_align32b, vector_uint8_t src, int32_t offset) __simd_callee__ inline void asc_storealign_1st_postupdate(__ubuf__ int16_t*& dst_align32b, vector_int16_t src, int32_t offset) __simd_callee__ inline void asc_storealign_1st_postupdate(__ubuf__ uint16_t*& dst_align32b, vector_uint16_t src, int32_t offset) __simd_callee__ inline void asc_storealign_1st_postupdate(__ubuf__ int32_t*& dst_align32b, vector_int32_t src, int32_t offset) __simd_callee__ inline void asc_storealign_1st_postupdate(__ubuf__ uint32_t*& dst_align32b, vector_uint32_t src, int32_t offset) __simd_callee__ inline void asc_storealign_1st_postupdate(__ubuf__ half*& dst_align32b, vector_half src, int32_t offset) __simd_callee__ inline void asc_storealign_1st_postupdate(__ubuf__ float*& dst_align32b, vector_float src, int32_t offset) __simd_callee__ inline void asc_storealign_1st_postupdate(__ubuf__ bfloat16_t*& dst_align32b, vector_bfloat16_t src, int32_t offset)

参数说明

参数名输入/输出描述
dst_align32b输入/输出目的操作数(矢量)的起始地址,搬运完成后该地址会被硬件自动Post Update。
src输入源操作数(矢量数据寄存器)。
offset输入地址偏移量。

矢量数据寄存器的详细说明请参见reg数据类型定义.md。

返回值说明

流水类型

PIPE_V

约束说明

调用示例

__ubuf__ half* dst_align32b = (__ubuf__ half*)asc_get_phy_buf_addr(0); vector_half src; int32_t offset = 128; asc_storealign_1st_postupdate(dst_align32b, src, offset);

【免费下载链接】asc-devkit本项目是CANN 推出的昇腾AI处理器专用的算子程序开发语言,原生支持C和C++标准规范,主要由类库和语言扩展层构成,提供多层级API,满足多维场景算子开发诉求。项目地址: https://gitcode.com/cann/asc-devkit

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考