Data Movement API Sample Introduction【免费下载链接】asc-devkit本项目是CANN 推出的昇腾AI处理器专用的算子程序开发语言原生支持C和C标准规范主要由类库和语言扩展层构成提供多层级API满足多维场景算子开发诉求。项目地址: https://gitcode.com/cann/asc-devkitOverviewThis directory contains samples for multiple APIs related to data movement. Each sample is based on Ascend Cs direct call method, supporting implementation of main function and kernel function in the same cpp file.Sample ListDirectory NameFunction Descriptionbroadcast_ub2l0cThis sample implements data broadcast movement based on BroadCastVecToMM, broadcasting data located on UB (Unified Buffer) and moving it to CO1 (L0C Buffer)copy_ub2ubThis sample implements data movement based on Copy, applicable for data movement between VECIN and VECOUT, supporting mask continuous mode and counter modedata_copy_gm2ub_sliceThis sample implements data slice movement based on DataCopy, extracting subsets of multi-dimensional Tensor data for movement between GM (Global Memory) and UB (Unified Buffer) pathwaysdata_copy_gm2ub_nddmaThis sample introduces how to use multi-dimensional data movement interface to implement data movement from GM (Global Memory) to UB (Unified Buffer) pathway. By freely configuring dimension information and corresponding Stride, it can be used for Padding, Transpose, BroadCast, Slice and other data transformation operationsdata_copy_l0c2gmThis sample implements data inline quantization activation movement based on DataCopy in convolution scenariosdata_copy_pad_gm2ub_ub2gmThis sample implements non-32-byte aligned data movement based on DataCopyPad, with data paddingdata_copy_ub2l1This sample implements data movement from UB (Unified Buffer) to L1 (L1 Buffer) based on DataCopy in Mmad matrix multiplication scenariosld_st_reg_maskThis sample implements UB (Unified Buffer) load/store operations to MaskReg (mask register) using Reg programming interface, and mask-based masked store operationsld_st_reg_alignThis sample implements aligned data movement operations (continuous and non-continuous) from UB (Unified Buffer) to RegTensor (Reg vector computation basic unit) using Reg programming interfaceld_st_reg_unalignThis sample implements unaligned data movement operations from UB (Unified Buffer) to RegTensor (Reg vector computation basic unit) using Reg programming interfacegather_ld_regThis sample demonstrates using Gather interface to implement discrete data load, including high-dimensional Gather (source is LocalTensor) and Reg::GatherB (collect by DataBlock) scenariosscatter_st_regThis sample demonstrates using Reg::Scatter interface to implement discrete data store (scatter elements to UB)auxscalar_regThis sample demonstrates using AuxScalar method to read multiple scalar data from UB for computationmove_regThis sample implements data load/store operations from UB (Unified Buffer) to RegTensor using Reg programming interface【免费下载链接】asc-devkit本项目是CANN 推出的昇腾AI处理器专用的算子程序开发语言原生支持C和C标准规范主要由类库和语言扩展层构成提供多层级API满足多维场景算子开发诉求。项目地址: https://gitcode.com/cann/asc-devkit创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考