算子列表

说明:

  • 算子目录:目录名为算子名小写下划线形式,每个目录承载该算子所有交付件,包括代码实现、examples、文档等,目录介绍参见项目目录。
  • 算子执行硬件单元:大部分算子运行在AI Core,少部分算子运行在AI CPU。默认情况下,项目中提到的算子一般指AI Core算子。关于AI Core和AI CPU详细介绍参见《Ascend C算子开发》中“概念原理和术语 > 硬件架构与数据处理原理”。
  • 算子接口列表:为方便调用算子,CANN提供一套C API执行算子,一般以aclnn为前缀,全量接口参见aclnn列表。

项目提供的所有算子分类和算子列表如下:

sum
算子分类 算子目录 算子实现 aclnn调用 图模式调用 算子执行硬件单元 说明
op_kernel op_host op_api op_graph
math add_lora √ √ × √ AI Core 将输入x根据输入索引indices,分别和对应的weightA,weightB相乘,然后将结果累加到输入y上并输出。
math add_n √ √ √ √ AI Core 对输入进行主元素相加求和操作。
math adjacent_difference √ √ × √ AI Core 比较输入张量相邻元素的差异,若相邻元素相同,返回0,否则返回1。
math angle_v2 √ √ × √ AI Core 为输入张量的每一个元素取角度(单位:弧度)。
math bias_add √ √ √ √ AI Core 偏置加法。
math diag_part √ √ × √ AI Core 获取输入张量对角线元素。
math diag_v2 √ √ × √ AI Core 根据输入的二维张量,提取由diagonal指定的对角线元素。
math grouped_bias_add_grad √ √ × √ AI Core 分组偏置加法(GroupedBiasAdd)的反向计算。
math hans_decode √ √ × √ AI Core 对压缩后的张量基于PDF进行解码,同时基于mantissa重组恢复张量。
math hans_encode √ √ × √ AI Core 对输入张量指数位所在字节实现PDF统计,按PDF分布统计进行无损压缩。
math histogram_v2 √ √ × √ AI Core 计算张量直方图。
math is_finite √ √ √ √ AI Core 判断输入张量哪些元素是有限数值,即不是inf、-inf或nan。
math is_inf √ √ √ √ AI Core 判断张量中哪些元素是无限大值,即为inf、-inf。
math is_nan √ √ × √ AI Core 判断张量中哪些元素是nan。
math lin_space √ √ × √ AI Core 生成一个等间隔数值序列。创建一个大小为steps的1维向量,其值从start起始到stop结束(包含)线性均匀分布。
math mul_addn √ √ × √ AI Core 实现N>=2个mul和addn融合计算,减少搬运时间和内存的占用。
math fused_mul_add_n √ √ × √ AI Core 将mul和addn算子进行融合,要求addn的n为2,mul的其中一个输入必须是scalar或者只包含一个数的tensor。
math non_finite_check √ √ × √ AI Core 检测输入tensor_list中是否存在非有限数值(NaN、Inf、-Inf)。
math pows √ √ × √ AI Core 对input中的每个元素应用指数为exponent的幂运算。
math rfft1_d √ √ × ×AI Core 对输入张量self进行RFFT(傅里叶变换)计算,输出是一个包含非负频率的复数张量。
math ring_attention_update √ √ × √ AI Core RingAttentionUpdate算子功能是将两次FlashAttention的输出根据其不同的softmax的max和sum更新。
math segsum √ √ √ × AI Core 进行分段和计算。生成对角线为0的半可分矩阵,且上三角为-inf。
math sinkhorn √ √ × × AI Core 计算Sinkhorn距离,可以用于MoE模型中的专家路由。
math stft √ √ √ √ AI Core 计算输入在滑动窗口内的傅里叶变换。
math transform_bias_rescale_qkv √ √ × √ AI Core 一个用于处理多头注意力机制中查询(Query)、键(Key)、值(Value)向量的接口,用于调整这些向量的偏置(Bias)和缩放(Rescale)因子。
conversion circular_pad √ √ × × AI Core 使用输入循环填充输入tensor的最后两维。
conversion circular_pad_grad √ √ √ × AI Core circular_pad的反向传播。
conversion coalesce_sparse √ √ × × AI Core 实现对Coo_Tensor优化的方法coalesce()方法。
conversion diag_flat √ √ × √ AI Core 该算子通过对输入张量的深度(通道)维度进行重新排列,将其转换为空间维度(高度和宽度)。具体来说,它将输入张量的深度维度按照指定的块大小(block_size)进行划分,并将这些深度块重新排列到空间维度中,从而增加空间维度的大小,同时减少通道维度的深度。
conversion diag_flat √ √ × √ AI Core 创建一个以输入数组为对角线元素的平铺对角矩阵。
conversion feeds_repeat √ √ × √ AI Core 对于输入feeds,根据输入feeds_repeat_times,将对应的feeds的第0维上的数据复制对应的次数,并将输出y的第0维padding到output_feeds_size的大小。
conversion fill_diagonal_v2 √ √ × √ AI Core 将指定值填充到矩阵的主对角线上。
conversion masked_select_v3 √ √ × × AI Core 根据mask是否为True,选出input中对应位置的值,input和mask满足广播规则,结果为一维Tensor。
conversion mem_set_v2 √ √ × × AI Core 给输入tensor赋指定的值。
conversion pad_v3_grad_replicate √ √ × × AI Core padv3 2D的反向传播。
conversion pad_v3_grad_replication √ √ × × AI Core padv3 3D的反向传播。
conversion pad_v4_grad √ √ × × AI Core pad之后的输入的反向传播。
conversion reflection_pad3d_grad √ √ × × AI Core 计算aclnnReflectionPad3d api的反向传播。
conversion stack_ball_query √ √ × √ AI Core Stack Ball Query 是KNN的替代方案,用于查找点p1指定半径范围内的所有点(在实现中设置了K的上限)。
conversion strided_slice_assign_v2 √ √ × √ AI Core StridedSliceAssign是一种张量切片赋值操作,它可以将张量inputValue的内容,赋值给目标张量varRef中的指定位置。
conversion transpose_v2 √ √ × × AI Core 实现张量的维度置换(Permutation)操作,按照指定的顺序重新排列输入张量的维度。
conversion unfold_grad √ √ × × AI Core 实现Unfold算子的反向功能,计算相应的梯度。
conversion concat_d √ √ √ √ AI Core 将tensors中所有tensor按照维度dim进行级联,除了dim对应的维度以外的维度必须一致。
conversion concat_v2 √ √ × √ AI CPU 该算子沿指定维度将多个输入张量进行拼接。
conversion clip_by_value √ √ √ √ AI CPU 该算子将输入的所有元素限制在[clipValueMin,clipValueMax]范围内。
conversion clip_by_value_v2 √ √ √ √ AI CPU 该算子将输入的所有元素限制在[clipValueMin,clipValueMax]范围内。
conversion invert_permutation √ √ × √ AI CPU 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
conversion unpack √ √ × √ AI Core 将张量沿着某一维度拆分为多个子张量。
math abs √ √ √ √ AI Core 为输入张量的每一个元素取绝对值。
math accumulate_nv2 × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math acos √ √ √ √ AI CPU 该算子对输入的每个元素进行反余弦操作后输出。
math acosh × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math add √ √ √ √ AI CPU 该算子用于完成加法计算。
math square √ √ √ √ AI CPU 该算子对输入Tensor逐元素计算平方值。
math addcdiv √ √ √ √ AI Core 张量运算函数,用于执行乘除加组合操作,将张量除法(带缩放)+ 张量加法合并为单个操作。
math addcmul √ √ √ √ AI Core 张量运算函数,用于执行乘除加组合操作,将张量乘法(带缩放)+ 张量加法合并为单个操作。
math addr √ √ √ √ AI Core 求一维向量vec1和vec2的外积得到一个二维矩阵,并将外积结果矩阵乘一个系数后和自身乘系数相加后输出。
math arg_max_v2 √ √ √ √ AI Core 返回张量在指定维度(dim)上的最大值的索引,并保存到out张量中。
math arg_max_with_value √ √ √ √ AI Core 返回Tensor指定维度的最大值及其索引位置。最大值保存到out中,最大值的索引保存到indices中。如果keepdim为false,则不保留对应的轴;如果为true,则保留指定轴的维度值为1。
math arg_min √ √ √ √ AI Core 返回tensor中指定轴的最小值索引,并保存到out中。如果keepdim为false,则不保留对应的轴;如果为true,则保留指定轴的维度值为1。
math arg_min_with_value √ √ √ √ AI Core 返回self中指定维度的最小值及其索引位置。最小值保存到out中,最小值的索引保存到indices中。如果keepdim为false,则不保留对应的轴;如果为true,则保留指定轴的维度值为1。
math asin × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math asinh × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math atan √ √ √ √ AI CPU 该算子对输入的每个元素进行反正切操作后输出。
math atan2 × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math atanh × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math axpy √ √ √ √ AI Core 源操作数中每个元素与标量求积后和目的操作数中的对应元素相加。
math axpy_v2 √ √ √ √ AI Core 源操作数中每个元素与张量求积后和目的操作数中的对应元素相加。
math bincount √ √ √ √ AI Core 计算非负整数数组中每个数的频率。
math bitwise_and √ √ √ √ AI Core 计算输入tensor中每个元素和输入标量的按位与结果。输入的tensor与other必须是整型或者BOOL型变量。当输入为BOOL时,计算逻辑与的结果。
math bitwise_not × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math bitwise_or √ √ √ √ AI Core 计算输入张量self中每个元素和输入标量other的按位或。输入self和other必须是整数或布尔类型,对于布尔类型,计算逻辑或。
math bitwise_xor × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math cast √ √ √ √ AI Core 将输入tensor转换为指定的dtype类型。贡献指南。
math ceil √ √ √ √ AI CPU 该算子用于返回输入Tensor中每个元素向上取整的结果。
math complex × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math cos √ √ √ √ AI Core 返回输入张量元素进行余弦操作后的结果。
math cosh × × × × AI Core 计算输入Tensor(A)中每个元素和输入标量(B)的按位与结果。
math cummax × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math cummin × × × × AI Core 计算Tensor(A)中每个元素和Tensor(B)中对应位置的元素的按位或。
math cumprod × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math cumsum √ √ √ √ AI CPU 该算子对输入张量self的元素,按照指定维度dim依次进行累加。
math cumsum_cube × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math div × × × × AI Core 张量除法计算。
math div_no_nan √ √ × √ AI Core 张量除法计算, 在分母可能为0的情况下,可以帮助避免由于分母为0导致的NaN值问题。
math dot √ √ √ √ AI Core 计算两个输入一维张量的点积结果。
math equal √ √ √ √ AI CPU 该算子计算两个Tensor是否有相同的大小和元素。
math erf × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math erfc × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math exp √ √ √ √ AI Core 返回一个新的张量,该张量的每个元素都是输入张量对应元素的指数。
math exp_segsum_grad √ √ √ × AI Core Segsum的反向计算。
math expand × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math expm1 × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math eye √ √ √ √ AI Core 返回一个对角线值为1其余位置为0的二维张量。
math floor √ √ √ √ AI Core 返回输入Tensor中每个元素向下取整,并将结果回填到输入Tensor中。
math floor_div √ √ √ √ AI Core 完成除法计算,对余数向下取整。
math floor_mod √ √ √ √ AI Core 计算两个输入张量的逐元素模运算。
math gcd × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math ger × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math greater √ √ √ √ AI CPU 该算子用于判断输入Tensor中的每个元素是否大于other Scalar的值。
math greater_equal √ √ √ √ AI Core 返回一个BOOL类型的张量,里面每一个值代表输入张量对应位置值是否大于等于另一个张量值或者scalar值。
math invert √ √ × √ AI Core 为输入张量的每一个元素取反。
math is_close √ √ √ √ AI Core 返回一个带有布尔元素的新张量,判断给定的self和other是否彼此接近,如果值接近,则返回True,否则返回False。
math is_neg_inf √ √ √ √ AI Core 判断输入张量的元素是否为负无穷。
math is_pos_inf √ √ √ √ AI Core 判断输入张量的元素是否为正无穷。
math kl_div_v2 × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math lerp √ √ √ √ AI Core 根据给定的权重,在起始和结束Tensor之间进行线性插值,返回插值后的Tensor。
math less √ √ √ √ AI CPU 该算子用于判断输入self中的每个元素是否小于输入other的值。
math less_equal √ √ √ √ AI Core 判断输入self中的元素值是否小于等于other的值,并将self的每个元素的值与other值的比较结果写入out中。
math log √ √ √ √ AI CPU 该算子对输入张量x的元素,逐元素进行对数计算。
math log1p √ √ √ √ AI Core 对输入Tensor完成log1p运算。
math log_add_exp × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math logical_and √ √ √ √ AI Core 对两个输入张量的对应元素执行「与逻辑」判断,输出布尔型张量(True/False)。
math logical_not √ √ √ √ AI Core 计算给定输入Tensor的逐元素逻辑非。如果未指定输出类型,输出Tensor是bool类型。如果输入Tensor不是bool类型,则将零视为False,非零视为True。
math logical_or √ √ √ √ AI Core 完成给定输入张量元素的逻辑或运算。当两个输入张量为非bool类型时,0被视为False,非0被视为True。
math masked_scale × × × × AI Core 完成elementwise计算。
math maximum √ √ √ √ AI Core 返回两个输入张量中的最大值组成的新张量。
math minimum √ √ √ √ AI Core 返回两个输入张量中的最小值组成的新张量。
math mod √ √ √ √ AI Core 返回输入张量相对于一个scalar值的余数。
math mul √ √ √ √ AI Core 返回两个张量元素之间的乘积结果组成的新张量。
math muls √ √ √ √ AI Core 返回输入张量元素与指定scalar值乘积组成的新张量。
math nan_to_num × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math neg √ √ √ √ AI Core 计算每个元素的相反数。
math not_equal √ √ √ √ AI CPU 该算子逐元素比较两个输入张量是否不相等。
math one_hot √ √ √ √ AI Core 将离散标签进行二进制编码转换。
math ones_like √ √ √ √ AI Core 返回形状和类型相同的张量,所有元素都设置为1。
math pdist × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math pow √ √ √ √ AI Core 根据输入指数和幂张量进行指数计算。
math range √ √ √ √ AI Core 从start到end,按照step间隔长度生成等差数列组成的张量。
math real × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math real_div √ √ × √ AI CPU 该算子按元素逐个返回x1/x2的结果。
math reciprocal √ √ √ √ AI Core 返回一个具有每个输入元素倒数的新张量。
math reduce_all × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math reduce_any × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math reduce_log_sum × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math reduce_log_sum_exp × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math reduce_max × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math reduce_mean √ √ × √ AI CPU 该算子对一个多维向量按照指定的维度求平均值。
math reduce_min × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math reduce_nansum × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math reduce_prod × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math reduce_std_v2 √ √ √ √ AI Core 计算指定维度的标准差。
math reduce_std_v2_update × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math reduce_std_with_mean × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math reduce_sum_op × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math reduce_var √ √ √ √ AI Core 返回指定维度的方差。
math right_shift √ √ √ √ AI CPU 该算子按元素计算输入张量 x 与 y 的按位右移操作。
math round √ √ √ √ AI CPU 该算子将输入张量的值舍入到最接近的整数,若该值与两个整数距离一样则向偶数取整。
math rsqrt √ √ √ √ AI Core 求input(Tensor)每个元素的平方根的倒数。
math scale × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math search_sorted √ √ √ √ AI CPU 该算子用于在一个已排序的张量 sorted_sequence 中查找给定张量 values 应该插入的位置。
math select √ √ √ √ AI Core 根据条件选取self或other中元素并返回(支持广播)。
math select_v2 √ √ × √ AI Core 根据条件选取self或other中元素并返回(支持广播)。
math sign √ √ √ √ AI Core 对输入的tensor逐元素进行Sign符号函数的运算并输出结果tensor。
math sign_bits_pack × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math sign_bits_unpack × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math silent_check × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math sin √ √ √ √ AI Core 对输入Tensor完成sin运算
math sinh √ √ √ √ AI CPU 该算子对输入的每个元素进行正弦后输出。
math sort √ √ √ √ AI Core 将输入tensor中的元素根据指定维度进行升序/降序, 并且返回对应的index值。
math sort_with_index √ √ × √ AI Core 将输入tensor按照元素值大小进行排序,index值跟随对应元素值进行排序。
math rsqrt_grad √ √ × √ AI Core rsqrt的反向计算。
math sqrt √ √ √ √ AI Core 完成非负数平方根计算,负数情况返回nan。
math sub √ √ √ √ AI Core 完成减法计算,被减数按alpha进行缩放。
math tan × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math tanh √ √ √ √ AI Core 激活函数。返回与输入tensor shape相同的tensor,对输入tensor进行elementwise的计算。
math tanh_grad √ √ √ √ AI Core Tanh的反向计算。
math tensor_equal √ √ √ √ AI Core 计算两个Tensor是否有相同的大小和元素,返回一个Bool类型。
math tile √ √ √ × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math triangular_solve √ √ √ √ AI Core 对输入Tensor截取整数部分。
math trunc × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math x_log_y × × × × AI Core 将输入的张量沿指定轴重复多次,但不进行广播。
math zeros_like √ √ √ √ AI Core 将张量填充为全零。
conversion as_strided √ √ × √ AI Core 允许用户通过制定新的形状和步长来创建一个与原张量共享相同数据内存的张量视图。
conversion assign √ √ × √ AI Core 将一个输入tensor的值填充到另一个输入tensor中。
conversion broadcast_to × × × √ AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
conversion concat √ √ × √ AI Core 用于沿指定维度将多个输入 Tensor 进行拼接,输出包含所有输入数据按顺序拼接后的 Tensor。
conversion confusion_transpose_d √ √ √ √ AI Core 融合reshape和transpose运算。
conversion contiguous × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
conversion fill √ √ √ √ AI Core 对输入张量填充指定标量值。
conversion flatten × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
conversion im2col × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
conversion masked_fill √ √ √ √ AI Core 将输入Tensor`x`中mask位置为`True`的元素填充指定的值。`mask`必须与`x`的shape相同或可广播。
conversion mirror_pad √ √ √ √ AI Core 以镜像方式填充输入tensor的边界。
conversion npu_format_cast × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
conversion pack √ √ √ √ AI Core 通过沿轴维度打包,将值中的张量列表打包成一个比值中的每个张量高一维度的张量。
conversion pad × × √ × AI Core 对输入Tensor做填充。
conversion pad_v3 √ √ √ √ AI Core 对输入Tensor做填充。
conversion pad_v3_grad × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
conversion reshape × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
conversion roll × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
conversion slice √ √ × √ AI Core 根据给定的范围和步长,从输入张量中提取子张量。
conversion split √ √ × √ AI Core 将张量沿指定维度split_dim平均拆分为num_split份更小的张量。
conversion split_v √ √ √ √ AI Core 将输入tensor指定维度按照指定长度进行切分,最后一块长度可能不足。
conversion squeeze × × × √ AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
conversion strided_slice √ √ × √ AI Core 按照指定的起始、结束位置和步长,从输入张量中提取一个子张量。
conversion strided_slice_grad √ √ × × AI Core 将子张量的梯度映射回原始张量的对应位置。
conversion strided_slice_v3 × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
conversion tensor_move √ √ √ √ AI Core 将输入tensor的值搬运到输出tensor中。
conversion trans_data × × × × AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
conversion transpose √ √ √ √ AI Core 完成张量转置。
conversion tril √ √ √ √ AI Core 将输入的self张量的最后二维(按shape从左向右数)沿对角线的右上部分置零。
conversion triu √ √ √ √ AI Core 完成张量转置。
conversion unsqueeze × × × √ AI Core 对输入Tensor做填充。
conversion view_copy × × × √ AI Core 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math inv_grad √ √ × √ AI CPU 该算子暂无Ascend C代码实现,欢迎开发者补充贡献,贡献方式参考贡献指南。
math cross √ √ × √ AI CPU 该算子对输入Tensor完成linear_cross运算。
math sqrt_grad √ √ × √ AI CPU 该算子用于完成梯度平方根计算。
math squared_difference √ √ × √ AI CPU 为第一个输入张量减去第二个输入张量,并计算其平方值。
random drop_out_do_mask √ √ √ √ AI Core 根据mask中对应bit位的值,将输入中的元素置零,并按照scale放大或者置零。
random drop_out_v3 √ √ √ √ AI Core 按照概率p随机将输入中的元素置零,并将输出按照1/(1-p)的比例缩放。
random stateless_bernoulli √ √ √ √ AI Core 从伯努利分布中提取二进制随机数。
random stateless_drop_out_gen_mask √ √ √ √ AI Core 根据随机种子和随机便宜量和保活系数生成随机掩码mask。
random stateless_random_norm_v2 √ √ √ √ AI Core 生成正态分布随机数。
random stateless_random_uniform_v2 √ √ × √ AI Core 生成均匀分布随机数。
math assign_add √ √ × √ AI CPU 该算子完成在原有tensor上的加法计算。
math assign_sub √ √ × √ AI CPU 该算子完成在原有tensor上的减法计算。
math square_sum_v1 √ √ × √ AI CPU 用于计算输入张量在指定轴上的平方和。
math bias_add_grad √ √ × √ AI Core 计算偏置的梯度。