Operator APIs (aclnn)
Instructions
To make it easier to call operators, a set of C-based APIs (with the aclnn prefix) are provided. You do not need to provide the Intermediate Representation (IR) definition to facilitate efficient model and application development. This method is called single-operator API calling, or aclnn calling for short.
Header File/Library File
When calling operator APIs, you need to reference the dependency header file and library file. Generally, the header file is stored in
${INSTALL_DIR}/include/aclnnopand the library file is stored in${INSTALL_DIR}/lib64.- Header file: Method 1 (recommended): Reference the general header file
aclnn_ops_{ops_project}.hof the operator repository. Method 2: Reference the header file aclnn_*.h of a single operator API. - Library file: The library file libopapi_${ops_project}.so corresponding to the operator repository is referenced. Note that the original libopapi.so file of all operator repositories will be deprecated and is not recommended. It cannot be used together with a single operator repository file.
${INSTALL_DIR} indicates the file path after CANN installation. ${ops_project} indicates the operator repository name (such as math, nn, cv, and transformer). Change it to the actual operator repository name.
- Header file: Method 1 (recommended): Reference the general header file
Version Evolution
Note that some APIs have multiple versions. Select the latest version. (APIs of a later version are compatible with all capabilities of APIs of an earlier version.)
API List
- Operator Features: Before calling an API, you need to learn the basic knowledge of operators, including Deterministic Algorithms, Batch Consistency, and Common Quantization Modes. For details, see Basic Concepts of Operators.
- Symbol description: The hyphen (-) in the table indicates that the API does not support the current product.
The following table lists the operator APIs.
| API Name | Description | Determinism (A2/A3) | Determinism (Ascend 950) |
|---|---|---|---|
| aclnnAdaLayerNorm | Fuses LayerNorm with downstream Add and Mul, and adjusts the normalization process through the adaptive parameters scale and shift. | Enabled by default | - |
| aclnnAdaLayerNormBackward | Backpropagation of aclnnAdaLayerNormV2. It is used to calculate the gradient of the input tensor so that the model parameters can be updated during backpropagation. | Enabled by default | - |
| aclnnAdaLayerNormQuant | Fuses AdaLayerNorm with downstream quantization (only DynamicQuant is supported currently). This operator is used to perform quantization operations on adaptive layer normalization, that is, to normalize the input data and quantize the data into low-precision integers to improve the compute efficiency and reduce the memory usage. | Enabled by default | Enabled by default |
| aclnnAdaLayerNormV2 | Fuses LayerNorm with downstream Add and Mul, and adjusts the normalization process through the adaptive parameters scale and shift. Compared with the AdaLayerNorm operator, this operator has two additional parameters (the mean value of the input and the reciprocal of the standard deviation of the input), and provides additional restrictions on data types supported by weight and bias. | Enabled by default | Enabled by default |
| aclnnAdaptiveAvgPool2d | Performs 2D adaptive average pooling on tensor self with the specified two-dimensional output shape (outputSize). | Enabled by default | Enabled by default |
| aclnnAdaptiveAvgPool2dBackward | Performs backpropagation of aclnnAdaptiveAvgPool2d. | Disabled by default. Can be enabled. | Disabled by default. Can be enabled. |
| aclnnAdaptiveAvgPool3d | Performs 3D adaptive average pooling on tensor self with the specified three-dimensional output shape (outputSize). | Enabled by default | Enabled by default |
| aclnnAdaptiveAvgPool3dBackward | Performs backpropagation of aclnnAdaptiveAvgPool3d. | Disabled by default. Can be enabled. | Disabled by default. Can be enabled. |
| aclnnAdaptiveMaxPool2d | Computes the size of each kernel based on the input outputSize, and performs two-dimensional max pooling on the input self. | Enabled by default | Enabled by default |
| aclnnAdaptiveMaxPool2dBackward | Performs backpropagation of forward adaptive max pooling. The gradient is backfilled to the coordinate of the maximum value in each adaptive window. The coordinates are accumulated. | Disabled by default. Can be enabled. | Disabled by default. Can be enabled. |
| aclnnAdaptiveMaxPool3d | Computes the size of each kernel based on the input outputSize, and performs three-dimensional max pooling on the input self. | Enabled by default | Enabled by default |
| aclnnAdaptiveMaxPool3dBackward | Performs backpropagation of forward adaptive max pooling. The gradient is backfilled to the coordinate of the maximum value in each adaptive window. The coordinates are accumulated. | Disabled by default. Can be enabled. | Disabled by default. Can be enabled. |
| aclnnAddbmm&aclnnInplaceAddbmm | Description: Multiplies batch1 and batch3 and sums up the results by the first dimension (batch dimension). Compresses the three-dimensional vector into a two-dimensional vector (the shape is that of the last two dimensions). Multiplies the result by α, and then adds the result to the product of β and self to obtain the result. | Enabled by default | Enabled by default |
| aclnnAddmm&aclnnInplaceAddmm | Computes the sum of the product of α multiplied by mat1 and mat2 and the product of β multiplied by self. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnAddmmWeightNz | Computes the sum of the product of α multiplied by mat1 and mat2 and the product of β multiplied by self. Compared with the original addmm API, the new API supports the NZ format for mat2. | Enabled by default | Enabled by default |
| aclnnAddmv | Performs matrix multiplication and then vector addition. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnAddLayerNorm | Provides the AddLayerNorm function. | Enabled by default | Enabled by default |
| aclnnAddLayerNormGrad | LayerNorm is a normalization method that can normalize the input data at the network layer to a distribution with an average value of 0 and a variance of 1. The LayerNormGrad operator is a key operator used in the backpropagation phase of deep learning. It is mainly used to compute the gradient of the LayerNorm operation. The AddLayerNormGrad operator fuses the Add and LayerNormGrad operators to reduce data move-in and move-out operations. | Disabled by default. Can be enabled. | Disabled by default. Can be enabled. |
| aclnnAddLayerNormQuant | The LayerNorm operator is a normalization operation commonly used in foundation models. | - | Enabled by default |
| aclnnAddLayerNormQuantV2 | The LayerNorm operator is a normalization operation commonly used in foundation models. The AddLayerNormQuantV2 operator fuses the Add operator before LayerNorm and the normalized output of LayerNorm to one or two downstream quantization operators to reduce the move-in and move-out operations. The downstream quantization operator of LayerNorm can be Quantize, AscendQuantV2, or DynamicQuant. The specific quantization operator type is determined by the input parameters divMode and quantMode of attr. If there are two downstream quantization operators, the operator types, input and output dtype combinations, and optional input combinations of the two quantization operators must be the same. | Enabled by default | Enabled by default |
| aclnnAddRmsNormCast | The RmsNorm operator is a normalization operation commonly used in foundation models. The AddRmsNormCast operator fuses the Cast operator after AddRmsNorm to reduce move-in and move-out operations. | Enabled by default | Enabled by default |
| aclnnAddRmsNormDynamicMxQuant | The RmsNorm operator is a common normalization operation for foundation models. The DynamicMxQuant operator is an operator that performs dynamic MX quantization by block size on the tail axis. The AddRmsNormDynamicMxQuant operator fuses the Add operator before RmsNorm and the DynamicMxQuant operator after RmsNorm normalization to reduce the move-in and move-out operations. | - | Enabled by default |
| aclnnAddRmsNormDynamicMxQuantV2 | The function is the same as that of aclnnAddRmsNormDynamicMxQuant. The optional input x3Optional is added. When x3Optional is not empty, the computation formula is changed to x = x3Optional + x1 + x2, and then RmsNorm normalization and DynamicMxQuant quantization are converged. | - | Enabled by default |
| aclnnAddRmsNormDynamicQuant | Fuses the Add operator before RmsNorm and the normalized output of RmsNorm to one or two DynamicQuant operators to reduce move-in and move-out operations. | Enabled by default | Enabled by default |
| aclnnAddRmsNormDynamicQuantV2 | The RmsNorm operator is a common normalization operation for large models. Compared with the LayerNorm operator, the RmsNorm operator does not subtract the average value. | Enabled by default | Enabled by default |
| aclnnAddRmsNorm | The RmsNorm operator is a common normalization operation for large models. Compared with the LayerNorm operator, the RmsNorm operator does not subtract the average value. | Enabled by default | Enabled by default |
| aclnnAddRmsNormQuant | Fuses the Add operator before RmsNorm and the Quantize operator after RmsNorm to reduce move-in and move-out operations. | Enabled by default | Enabled by default |
| aclnnAddRmsNormQuantV2 | The RmsNorm operator is a common standardization operation for foundation models. Compared with the LayerNorm operator, the RmsNorm operator removes the part of subtracting the mean value. | Enabled by default | Enabled by default |
| aclnnAddRelu&aclnnInplaceAddRelu | Performs the addition operation and activates the result. | Enabled by default | Enabled by default |
| aclnnRmsNormDynamicMxQuant | The RmsNorm operator is a common normalization operation for foundation models. The DynamicMxQuant operator is an operator that performs dynamic MX quantization by block size on the tail axis. The RmsNormDynamicMxQuant operator fuses the normalized output of RmsNorm to the DynamicMxQuant operator to reduce the move-in and move-out operations. | - | Enabled by default |
| aclnnRmsNormDynamicQuant | The RmsNorm operator is a normalization operation commonly used in foundation models. Compared with the LayerNorm operator, the RmsNorm operator does not subtract the average value. The DynamicQuant operator performs symmetric dynamic quantization on the input tensor. The RmsNormDynamicQuant operator combines RmsNorm normalization and DynamicQuant dynamic quantization to reduce the move-in and move-out operations. | Enabled by default | - |
| aclnnAdvanceStep | Advances the inference step, that is, updates the model status and generate new inputTokens, inputPositions, seqLens, and slotMapping in each generation step, improving the inference efficiency of vLLM. | Enabled by default | - |
| aclnnAdvanceStepV2 | Advances the inference step, that is, updates the model status and generate new inputTokens, inputPositions, seqLens, and slotMapping in each generation step, improving the inference efficiency of vLLM. | Enabled by default | - |
| aclnnAntiMxQuant | Dequantizes the FLOAT4/FLOAT8 tensors obtained by calling aclnnDynamicMxQuant/aclnnDynamicMxQuantV2 to the FLOAT16/BFLOAT16/FLOAT32 format. | - | Enabled by default |
| aclnnApplyAdamW | Implements the AdamW optimizer function. | - | Enabled by default |
| aclnnApplyAdamWQuant | Implements the adamW optimizer function and quantizes m and v. | Enabled by default | Enabled by default |
| aclnnApplyAdamWV2 | Implements the AdamW optimizer function. | Enabled by default | Enabled by default |
| aclnnApplyFusedEmaAdam | Implements the FusedEmaAdam fusion optimizer. | Enabled by default | Enabled by default |
| aclnnApplyTopKTopP | Performs top-k and top-p sampling and filtering on the original input logits. | Enabled by default | Enabled by default |
| aclnnAscendAntiQuant | Dequantizes the input x based on the input scale and offset. | Enabled by default | Enabled by default |
| aclnnAscendQuant | Quantizes the input x based on the input scale and offset. The scale and offset size must be the last dimension of x or 1. | Enabled by default | - |
| aclnnAscendQuantV3 | Quantizes the input x. The axes of scale and offset can be set by using axis. The shapes of scale and offset must be the same as axes of x specified by axis or equal to 1. | Enabled by default | Enabled by default |
| aclnnAvgPool2d | Performs two-dimensional average pooling over the input tensor with the window of and stride of . | Enabled by default | Enabled by default |
| aclnnAvgPool2dBackward | Back propagation of two-dimensional average pooling, which is used to calculate the input gradient of two-dimensional average pooling forward propagation. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnAvgPool3d | Performs three-dimensional average pooling over the input tensor with the window of and stride of . | Enabled by default | Enabled by default |
| aclnnAvgPool3dBackward | Backpropagation of 3D average pooling, which is used to calculate the input gradient of 3D average pooling forward propagation. | Disabled by default. Can be enabled. | Disabled by default. Can be enabled. |
| aclnnBaddbmm&aclnnInplaceBaddbmm | Computes the product of α and the matrix multiplication result of batch1 and batch2, and then sums the product with the product of β and self. | Enabled by default | Enabled by default |
| aclnnBatchMatMul | Performs matrix multiplication on tensors self and mat2. | Enabled by default | Enabled by default |
| aclnnBatchMatMulWeightNz | Computes the matrix multiplication of the self and mat2 tensors. The mat2 tensor supports only the Ascend affinity data layout format. The self tensor must be 3-dimensional, and the mat2 tensor must be 5-dimensional. | Enabled by default | Enabled by default |
| aclnnBatchNorm | Perform batch normalization processing on a batch of data. A statistical result of data generated after normalization is a mean value of 0 and a standard deviation of 1. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnBatchNormElemt | Uses the global mean and standard deviation reciprocal as the operator input to perform batch normalization on x. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnBatchNormElemtBackward | Performs backpropagation of aclnnBatchNormElemt. It is used to compute the element-level gradient of the input tensor, so that the model parameters can be updated during backpropagation. | Enabled by default | Enabled by default |
| aclnnBatchNormBackward | Performs backpropagation of aclnnBatchNorm. It is used to calculate the gradient of the input tensor so that the model parameters can be updated during backpropagation. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnBatchNormGatherStatsWithCounts | Collects the mean value and variance of data on all devices and updates the global mean value and the reciprocal of the standard deviation. | Enabled by default | Enabled by default |
| aclnnBatchNormReduce | Performs the first step of regularization on data, which involves summing and squaring the data. | Disabled by default. Can be enabled. | - |
| aclnnBatchNormReduceBackward | Computes the gradient of the BatchNorm operation during backpropagation and performs reduction operations on some intermediate results to optimize the compute efficiency. | Enabled by default | Enabled by default |
| aclnnBidirectionLSTM | Computes the LSTM network, receives the input sequence and initial state, and returns the output sequence and final state. | - | - |
| aclnnBidirectionLSTMV2 | Computes the LSTM network, receives the input sequence and initial state, and returns the output sequence and final state. | - | - |
| aclnnBinaryCrossEntropy | Computes the binary cross entropy (BCE) of self and target. | Enabled by default | Enabled by default |
| aclnnBinaryCrossEntropyBackward | Computes the gradient value of backpropagation of the binary cross entropy. | Enabled by default | Enabled by default |
| aclnnBinaryCrossEntropyWithLogits | Computes the BCELoss between the input logits and the target. | Enabled by default | Enabled by default |
| aclnnBinaryCrossEntropyWithLogitsBackward | Computes logits computation of the input self, and performs backward propagation of BCELoss using the computed logits and label value target. | Enabled by default | Enabled by default |
| aclnnBinaryCrossEntropyWithLogitsTargetBackward | Input self to perform logits computation, and perform BCELoss backpropagation computation on the target based on the obtained value and the label value target. | Enabled by default | - |
| aclnnBroadcastGradientArgs | Computes the broadcast dimension index required for gradient propagation. In a backpropagation process, based on original shapes of two tensors during forward propagation, a dimension extended due to a broadcast mechanism is identified, and a dimension in which a gradient needs to be reduced is output, so that the gradient is restored from a broadcast shape to a shape of each original tensor. | - | Enabled by default |
| aclnnBucketize | Determines the interval index to which each element in the input tensor belongs based on the given boundary array. | - | Enabled by default |
| aclnnCelu&aclnnInplaceCelu | aclnnCelu applies the Continuously Differentiable Exponential Linear Unit (CELU) function for each element x in the input tensor self, and stores the obtained result in the output tensor out. | Enabled by default | Enabled by default |
| aclnnChamferDistanceBackward | Provides the backward operator of ChamferDistance, and computes the gradients of the forward inputs based on their contribution to the forward output and the initial gradients. | Disabled by default. Can be enabled. | - |
| aclnnClaGateQuant | Integrates the CLA 2-channel head-wise gate weighting and MX dynamic block quantization, and supports FP8/FP4 single-axis or dual-axis quantization output. | - | Enabled by default |
| aclnnClaGateBackward | aclnnClaGateQuant: backward operator, which does not perform gradient quantization. | - | Enabled by default |
| aclnnClippedSwiglu | Performs a clipped Swish Gated Linear Unit (SwiGlu) activation function, and implements the SwiGlu computation of x. | Enabled by default | Enabled by default |
| aclnnClippedSwigluV2 | Activation function of the Swish gated linear unit with truncation, which implements the SwiGlu computation of x. clamp_mode is added to control the sequence of clamp and silu computation. | Enabled by default | Enabled by default |
| aclnnClippedSwigluGrad | Backward operator of aclnnClippedSwiglu, which is used to calculate the gradient gradXOut of input x. | Enabled by default | Enabled by default |
| aclnnConvolution | Implements convolution operations, supporting 1D, 2D, and 3D convolutions, as well as transposed convolution, dilated convolution, and grouped convolution. | Enabled by default | Enabled by default |
| aclnnConvolutionBackward | Performs backpropagation of convolution. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnConvDepthwise2d | Implements the two-dimensional depthwise convolution operation (DepthwiseConv2D). | Enabled by default | Enabled by default |
| aclnnConvertWeightToINT4Pack | Preprocesses the input weight data to convert the layout of low-bit data from sparse storage to dense storage. If Data Format of output weightInt4Pack is declared as FRACTAL_NZ, the operator will Data Format. ND is converted to FRACTAL_NZ. | Enabled by default | Enabled by default |
| aclnnConvTbc | Implements one-dimensional temporal convolution (TBC). | Enabled by default | Enabled by default |
| aclnnConvTbcBackward | Computes the backpropagation of temporal convolution. | Disabled by default. Can be enabled. | Disabled by default. Can be enabled. |
| aclnnCrossEntropyLoss | Computes the cross-entropy loss of the input. | Enabled by default | Enabled by default |
| aclnnCrossEntropyLossGrad | Performs backpropagation of aclnnCrossEntropyLoss. | Enabled by default | Enabled by default |
| aclnnCrossEntropySumExpAndIndexLogit | CrossEntropy local computing fusion operator for the Vocab parallel (Tensor Parallel) scenario. | - | Enabled by default |
| aclnnCtcLoss | Computes the connectionist temporal classification loss. | Enabled by default | Enabled by default |
| aclnnCtcLossBackward | Backpropagation of the connection timing classification loss value. | Enabled by default | Enabled by default |
| aclnnDeepNorm | Normalizes alpha*x+gx on the tail axis corresponding to gamma, returns the mean value mean and standard deviation reciprocal rstd, and generates an affine output y based on gamma and beta. | Enabled by default | Enabled by default |
| aclnnDeepNormGrad | Backpropagation of aclnnDeepNorm, which is used to calculate the gradients of tensor x, tensor gx, and tensor gamma, and calculate the sum of tensor dy. | Defaults to a non-deterministic implementation. Enabling deterministic computing is not supported. | Defaults to a non-deterministic implementation. Enabling deterministic computing is not supported. |
| aclnnDeformableConv2d | Implements convolution operations, supporting 2D, deformable, and grouped convolutions. | Enabled by default | Enabled by default |
| aclnnDeformableConv2dBackward | Implements convolution inversion, including 2D convolution inversion, deformable convolution, and group convolution inversion. | - | Enabled by default |
| aclnnDequantBias | Performs dequantization on input x, converting int32 data to FLOAT16 or BFLOAT16 for output. | Enabled by default | Enabled by default |
| aclnnDequantSituQuant | Add the dequant and quant operations before and after the Situ activation function to implement the DequantSituQuant computation of x. | Enabled by default | - |
| aclnnDequantSwigluQuant | Adds dequantization and quantization operations before and after the Swish Gated Linear Unit (SwiGlu) activation function, performing DequantSwiGLUQuant computation on input x. | Enabled by default | Enabled by default |
| aclnnDequantSwigluQuantV2 | Adds dequantization and quantization operations before and after the Swish Gated Linear Unit (SwiGlu) activation function, performing DequantSwiGLUQuant computation on input x. | Enabled by default | Enabled by default |
| aclnnSwigluGroup | Executes SwiGLU activation to implement SwiGLU computation of x and outputs the activation result of the same data type as x. | - | Enabled by default |
| aclnnSwigluMxQuant | Add the DynamicMxQuant operation after the activation function of the Swish gated linear unit to implement the SwigluMxQuant computation of x. | - | Enabled by default |
| aclnnSituMxQuant | The Situ activation function is fused with dynamic MX quantization to calculate SituMxQuant of x. | - | Enabled by default |
| aclnnSwigluMxQuantWithDualAxis | The GroupDynamicMxQuant operation is added after the activation function of the Swish gated linear unit. Based on the start value of the input group index, the data after swiglu is dynamically quantized on the -1 axis and -2 axis at the same time. | - | Enabled by default |
| aclnnSwigluBackwardMxQuantWithDualAxis | The GroupDynamicMxQuant operation is added after the inverse computation function activated by the Swish gated linear unit. Based on the start value of the input group index, the data after swiglu is dynamically quantized on the -1 axis and -2 axis at the same time. | - | Enabled by default |
| aclnnGroupedDynamicMxQuant | Performs dynamic float8 quantization on the input data based on the start value of the input group index. | - | Enabled by default |
| aclnnGroupedDynamicMxQuantV2 | Performs dynamic MX quantization of the target data type float4 or float8 for each group at the basic block granularity based on the start value of the input group index. Select a quantization algorithm based on the value of scaleAlg. | - | Enabled by default |
| aclnnGroupedDynamicMxQuantWithDualAxis | Performs FLOAT8 dynamic MX quantization on the input data along the last and penultimate two dimensions based on the input group index. | - | Enabled by default |
| aclnnDynamicDualLevelMxQuant | Splits the input twice based on the specified level0BlockSize and level1BlockSize, and performs MX level-2 quantization with the destination data type of FLOAT4 based on the data block. | - | Enabled by default |
| aclnnGroupedDynamicBlockQuant | Quantizes each group at the basic block granularity based on the start value of the input group index, and outputs the quantization parameter scale. | - | Enabled by default |
| aclnnGroupedDynamicBlockQuantV2 | Quantizes each group at the basic block granularity based on the start value of the input group index, and outputs the quantization parameter scale. When the target data type is HIFLOAT8, the maximum value of the target data type can be set based on dstTypeMax. | - | Enabled by default |
| aclnnDualLevelQuantMatmulWeightNz | Performs matrix multiplication for two-level quantization mxfp4. | - | Enabled by default |
| aclnnDynamicMxQuant | MX quantization whose destination data type is FLOAT4 or FLOAT8. On the given axis, calculate the quantization scale mxscale corresponding to each block size based on the number of block sizes, use the quantization scale as the corresponding part of the output mxscaleOut, divide each block size by mxscale, and convert the result to the corresponding dstType based on round_mode, the quantization result y is obtained as the corresponding part of the output yOut. When dstType is FLOAT8_E4M3FN or FLOAT8_E5M2, the algorithm for calculating mxscale is specified based on the value of scaleAlg. | - | Enabled by default |
| aclnnDynamicMxQuantV2 | MX quantization whose destination data type is FLOAT4 or FLOAT8. Selects the quantization algorithm for the destination data type FP4E2M1 based on the value of scaleAlg. You can set the maximum value of the target data type based on dstTypeMax. | - | Enabled by default |
| aclnnDynamicMxQuantV3 | MX quantization whose destination data type is FLOAT4 or FLOAT8. Selects the quantization algorithm for the destination data type FP4E2M1 based on the value of scaleAlg. maxLowBound can be used to set the lower bound clamping value of the maximum absolute value calculated for each block. | - | Enabled by default |
| aclnnMxToBlockMxQuant | Convert the FLOAT4 tensor obtained by calling aclnnDynamicMxQuantV2 and the FLOAT8_E8M0 scaling coefficient into the FLOAT8 block quantization format, and output the quantization scales on the -1 and -2 axes. | - | Enabled by default |
| aclnnDynamicMxQuantWithDualAxis | Performs MX quantization of the FLOAT4 and FLOAT8 data types on the -1 and -2 axes at the same time. The value of scaleAlg can be 0 (OCP algorithm) or 1 (CuBLAS algorithm). During operator implementation, the axes before the -2 axis (excluded) are combined. | - | Enabled by default |
| aclnnDynamicMxQuantWithDualAxisV2 | Performs MX quantization of the FLOAT4 and FLOAT8 data types on the -1 and -2 axes at the same time. Based on V1, the scaleAlg value 2 (DynamicDtypeRange algorithm) and the dstTypeMax parameter are added to support the user-defined quantization range of the FP4_E2M1 type. During operator implementation, the axes before the -2 axis (excluded) are combined. | - | Enabled by default |
| aclnnDynamicBlockMxQuant | Performs MX quantization on input variables by using the data block (32\ x 32) as the basic block and converts the data block into the destination data type. In each basic block, a quantization parameter scale (1*1) corresponding to the current block is calculated by using different scale algorithms based on a value of scale_alg, and the quantization parameter scale (1*1) is broadcast as scale1 (32*1) and scale2 (1*32) for output. Divide each number in the basic block by scale and convert the result to the corresponding dst_type based on round_mode to obtain the quantization result y. | - | Enabled by default |
| aclnnDynamicBlockQuant | Divides the input tensor into blocks according to the given rowBlockSize and colBlockSize, and performs quantization at the block level. For each block, the quantization parameter scaleOut is computed, and the input is quantized accordingly. The final quantized output and scaleOut for each block are returned. | Enabled by default | Enabled by default |
| aclnnDynamicBlockQuantV2 | Divides the input tensor into blocks according to the given rowBlockSize and colBlockSize, and performs quantization at the block level. For each block, the quantization parameter scaleOut is computed, and the input is quantized accordingly. The final quantized output and scaleOut for each block are returned. When the target data type is HIFLOAT8, the maximum value of the target data type can be set based on dstTypeMax. | Enabled by default | Enabled by default |
| aclnnDynamicQuant | Performs per-token symmetric dynamic quantization on input tensors. | Enabled by default | Enabled by default |
| aclnnDynamicQuantV2 | Performs per-token symmetric/asymmetric dynamic quantization on the input tensor. | Enabled by default | Enabled by default |
| aclnnDynamicQuantV3 | Performs dynamic quantization on the input tensor. | - | Enabled by default |
| aclnnDynamicQuantV4 | Performs dynamic quantization on the input tensor. The quantization result range can be set. | - | Enabled by default |
| aclnnEinsum | Performs tensor computation using the Einstein summation convention, following the pattern term1, term2 -> output-term. The output tensor is generated according to the following equation, where reduce-sum is applied to all indices that appear in the input terms (term1, term2) but not in the output term. | Enabled by default | Enabled by default |
| aclnnElu&aclnnInplaceElu | Applies the Exponential Linear Unit (ELU) activation function to each element x in the input tensor self and stores the result in the output tensor out. | Enabled by default | Enabled by default |
| aclnnEluBackward | Performs backpropagation of the aclnnElu activation function and outputs the gradient of the forward input of the ELU activation function. | Enabled by default | Enabled by default |
| aclnnEmbedding | Maps a set of indices to a vector space and thereby quantizes the data. The two-dimensional weight tensor of the embedding operator is weight, which has m+1 rows and n columns. For any input index tensor indices (for example, 1 row and 3 columns), the output out is a tensor with 3 rows and n columns. | Enabled by default | Enabled by default |
| aclnnEmbeddingBag | Obtains a group of numbers from weight based on indices, and performs aggregation in max, sum, or mean mode on the obtained numbers based on offsets and the aggregation mode specified by mode. Other parameters provide finer control over the computation process. | Enabled by default | Enabled by default |
| aclnnEmbeddingDenseBackward | Performs backpropagation of aclnnEmbedding and accumulates rows of grad corresponding to identical indices entries into out. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnExpandIntoJaggedPermute | Extends the permutation indices of sparse data from the table dimension to the batch dimension, applicable to scenarios where sparse features have different batch sizes across ranks. | Enabled by default | - |
| aclnnEmbeddingRenorm | Returns the corrected result of the input tensor for the specified indices based on the given maxNorm and normType. | Enabled by default | Enabled by default |
| aclnnErfinv&aclnnInplaceErfinv | erfinv is an inverse function of the Gaussian error function erf. It returns the quantile of each element in the input tensor in the standard normal distribution function. | Enabled by default | Enabled by default |
| aclnnFakeQuantPerChannelAffineCachemask | Performs fake quantization on the input self along the specified axis with scale and zero_point, and updates the value range of the fake-quantized output based on quant_min and quant_max. | Enabled by default | Enabled by default |
| aclnnFakeQuantPerTensorAffineCachemask | Performs fake quantization on the input self, and updates the value range of the fake-quantized output based on quant_min and quant_max. | Enabled by default | Enabled by default |
| aclnnFastBatchNormBackward | Performs backpropagation of aclnnBatchNorm (high-performance version). It is used to calculate the gradient of the input tensor so that the model parameters can be updated during backpropagation. | Enabled by default | - |
| aclnnFastGelu | Computes the fast Gaussian Error Linear Unit activation function. | Enabled by default | Enabled by default |
| aclnnFastGeluBackward | Performs backpropagation of FastGelu. | Enabled by default | Enabled by default |
| aclnnFastLayerNorm | Performs normalization with a mean of 0 and a standard deviation of 1 on a specified layer. | Enabled by default | - |
| aclnnFatreluMul | Divides the input tensor into two tensors, x1 and x2, along the last dimension, performs Threshold computation on x1, and multiplies the result by x2. | Enabled by default | - |
| aclnnFlatQuant | Performs two small matrix multiplications on the input matrix x | Enabled by default | Enabled by default |
| aclnnFlatQuantV2 | The fusion operator performs small matrix multiplication twice on the input matrix x at a time. The dstTypeMax parameter is supported. | - | Enabled by default |
| aclnnFlatQuantV3 | The fusion operator multiplies the input matrix x twice at a time. The dstTypeMax and groupListOptional parameters are supported. | Enabled by default | Enabled by default |
| aclnnFlip | Reverses the order of the specified dimension of an n-dimensional tensor. There is a formula for calculating each axis specified in dims. | Enabled by default | Enabled by default |
| aclnnForeachAbs | Performs element-wise absolute value operation on each tensor in the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachAcos | Performs element-wise inverse cosine operation on each tensor in the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachACosInplace | Calculates the inverse cosine of each tensor in the input tensor list element-by-element, and updates the result in place. | - | Enabled by default |
| aclnnForeachAddcdivList | Performs element-wise addition, multiplication, and division on multiple tensors. It computes the element-wise division of by , multiplies the result by scalars, and then adds the product to . | Enabled by default | Enabled by default |
| aclnnForeachAddcdivScalar | Performs element-wise addition, multiplication, and division on multiple tensors. It computes the element-wise division of by , multiplies the result by scalar, and then adds the product to . | Enabled by default | Enabled by default |
| aclnnForeachAddcdivScalarList | Performs element-wise addition, multiplication, and division on multiple tensors. It computes the element-wise division of by , multiplies the result by , and then adds the product to . | Enabled by default | Enabled by default |
| aclnnForeachAddcdivScalarV2 | Performs element-wise addition, multiplication, and division on multiple tensors. It computes the element-wise division of by , multiplies the result by scalar, and then adds the product to . | Enabled by default | Enabled by default |
| aclnnForeachAddcmulList | Performs element-wise multiplication on tensor lists x2 and x3, multiplies the result by the tensor scalars, and then adds the result element-wise to tensor list x1. | Enabled by default | Enabled by default |
| aclnnForeachAddcmulScalar | Performs element-wise multiplication on tensor lists x2 and x3, multiplies the result by the tensor scalar, and then adds the result element-wise to tensor list x1. | Enabled by default | Enabled by default |
| aclnnForeachAddcmulScalarList | Performs element-wise multiplication on tensor lists x2 and x3, multiplies the result element-wise by the tensor scalars, and then adds the result element-wise to tensor list x1. | Enabled by default | Enabled by default |
| aclnnForeachAddcmulScalarV2 | Perform element-by-element multiplication on the tensor list x2 and the tensor list x3, then multiply the tensor list x2 and the tensor list x3 by a scalar, and finally perform element-by-element addition on the previously calculated result and the tensor list x1. | Enabled by default | Enabled by default |
| aclnnForeachAddList | Performs element-wise addition on the two tensor lists. The addition coefficient can be adjusted by the alpha parameter. | Enabled by default | Enabled by default |
| aclnnForeachAddListV2 | Performs element-wise addition on the two tensor lists. The addition coefficient can be adjusted by the alpha parameter. | Enabled by default | Enabled by default |
| aclnnForeachAddListInplace | Computes x1+alpha*x2 element-wise for two tensor lists and writes the result back to the first list in place. | - | Enabled by default |
| aclnnForeachAddScalar | Adds the specified tensor value to each tensor in the tensor list. | Enabled by default | Enabled by default |
| aclnnForeachAddScalarList | Performs element-wise addition on the input tensor list and input scalar list. | Enabled by default | Enabled by default |
| aclnnForeachAddScalarV2 | Adds the specified scalar value to each tensor in the tensor list. | Enabled by default | Enabled by default |
| aclnnForeachAsin | Performs element-wise arcsine operation. | Enabled by default | Enabled by default |
| aclnnForeachAtan | Performs element-wise arctangent operation. | Enabled by default | Enabled by default |
| aclnnForeachCopy | Copies the content of two tensor lists. | Enabled by default | Enabled by default |
| aclnnForeachCos | Performs element-wise cosine operation. | Enabled by default | Enabled by default |
| aclnnForeachCosh | Performs element-wise hyperbolic cosine operation. | Enabled by default | Enabled by default |
| aclnnForeachDivList | Performs element-wise division on the tensor lists x1 and x2. | Enabled by default | Enabled by default |
| aclnnForeachDivListInplace | Divides two tensor lists element by element and writes the result back to the first list in place. | - | Enabled by default |
| aclnnForeachDivScalar | Divides each tensor in tensor list x by the tensor scalar. | Enabled by default | Enabled by default |
| aclnnForeachDivScalarList | Performs element-wise division on the tensor list x and the scalar list scalars. | Enabled by default | Enabled by default |
| aclnnForeachDivScalarV2 | Computes the tensor list x divided by a scalar. | Enabled by default | Enabled by default |
| aclnnForeachErf | Performs element-wise error function (also known as Gaussian error function) operation. | Enabled by default | Enabled by default |
| aclnnForeachErfc | Performs element-wise computation of the complementary error function, defined as the integral from x to infinity. | Enabled by default | Enabled by default |
| aclnnForeachExp | Performs element-wise exponential operation on the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachExpm1 | Performs exponential operation on each tensor in the input tensor list and subtracts 1 from the result. | Enabled by default | Enabled by default |
| aclnnForeachLerpList | Performs element-wise linear interpolation on corresponding tensors in two tensor lists using weight as the interpolation coefficients. | Enabled by default | Enabled by default |
| aclnnForeachLerpScalar | Performs interpolation on the corresponding elements of two tensor lists, where the scalar weight is the interpolation coefficient. | Enabled by default | Enabled by default |
| aclnnForeachLog | Performs element-wise natural logarithm operation (ln(x)) on the tensor list. | Enabled by default | Enabled by default |
| aclnnForeachLogInplace | Calculates the natural logarithm of each tensor in the input tensor list element by element, and updates the result in place. | - | Enabled by default |
| aclnnForeachLog1p | Adds 1 to each element in the input tensor list, then performs the e-based logarithmic function on the elements. | Enabled by default | Enabled by default |
| aclnnForeachLog2 | Performs the 2-based logarithmic function on each element in the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachLog10 | Performs the 10-based logarithmic function on each element in the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachMaximumList | Computes the element-wise maximum of each pair of corresponding tensors in tensor lists x1 and x2. | Enabled by default | Enabled by default |
| aclnnForeachMaximumScalar | Computes the element-wise maximum of each tensor in the input tensor list with the given tensor scalar. | Enabled by default | - |
| aclnnForeachMaximumScalarList | Computes the element-wise maximum of each tensor in tensor list x and the corresponding scalar in scalar list scalars. | Enabled by default | Enabled by default |
| aclnnForeachMaximumScalarV2 | Computes the element-wise maximum of each tensor in the input tensor list with the given scalar scalar. | Enabled by default | Enabled by default |
| aclnnForeachMinimumList | Computes the element-wise minimum of each pair of corresponding tensors in tensor lists x1 and x2. | Enabled by default | Enabled by default |
| aclnnForeachMinimumScalar | Computes the element-wise minimum of each tensor in tensor list x with the given tensor scalar. | Enabled by default | - |
| aclnnForeachMinimumScalarList | Computes the element-wise minimum of each tensor in tensor list x and the corresponding scalar in scalar list scalars. | Enabled by default | Enabled by default |
| aclnnForeachMinimumScalarV2 | Computes the element-wise minimum of each tensor in tensor list x with the given scalar scalar. | Enabled by default | Enabled by default |
| aclnnForeachMulList | Performs element-wise multiplication on corresponding tensors in two input tensor lists. | Enabled by default | Enabled by default |
| aclnnForeachMulListInplace | Multiplies two tensor lists element by element and writes the result back to the first list in place. | - | Enabled by default |
| aclnnForeachMulScalar | Performs element-wise multiplication between each tensor in the input tensor list and the given tensor scalar. | Enabled by default | Enabled by default |
| aclnnForeachMulScalarList | Performs element-wise multiplication of each tensor in the input tensor list by the corresponding scalar in the scalar list. | Enabled by default | Enabled by default |
| aclnnForeachMulScalarV2 | Multiplies each tensor in the input tensor list with a scalar. | Enabled by default | Enabled by default |
| aclnnForeachMulScalarInplace | Multiplies each tensor in the input tensor list element-by-element by the same scalar, and updates the result in place. | - | Enabled by default |
| aclnnForeachNeg | Computes the negative of each tensor in the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachNonFiniteCheckAndUnscale | Traverse all tensors in scaledGrads and check whether Inf or NaN exists. If yes, set foundInf to 1.0. Otherwise, the value of foundInf remains unchanged, and descale all tensors in scaledGrads. | Enabled by default | Enabled by default |
| aclnnForeachNorm | Computes the norm of each tensor in the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachPowList | Performs a exponentiation operation on each tensor in the input tensor list (the base is x1 and the exponent is x2). | Enabled by default | Enabled by default |
| aclnnForeachPowScalar | Performs an exponential operation on each tensor in the input tensor list x. The exponent is the tensor scale. | Enabled by default | - |
| aclnnForeachPowScalarV2 | Performs an exponential operation on each tensor in the input tensor list x. The exponent is a scalar exponent. | Enabled by default | Enabled by default |
| aclnnForeachPowScalarAndTensor | Description: Raises the input scalar scalar to the power of each tensor in the input tensor list x. | Enabled by default | Enabled by default |
| aclnnForeachPowScalarList | Performs an exponential operation on each tensor in the input tensor list x. The exponent is the corresponding scalar in the scalar list exponent. | Enabled by default | Enabled by default |
| aclnnForeachReciprocal | Compute the reciprocal of each tensor in the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachRoundOffNumber | Rounds off each tensor in the input tensor list with a specified precision. The rounding mode can be specified using roundMode. | Enabled by default | Default deterministic computing |
| aclnnForeachRoundOffNumberV2 | Rounds off each tensor in the input tensor list with a specified precision. The rounding mode can be specified using roundMode. | Enabled by default | Default deterministic computing |
| aclnnForeachSigmoid | Performs the Sigmoid function operation on each tensor in the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachSign | Computes the symbolic value of each tensor in the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachSin | Performs the sine function operation on each tensor in the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachSinh | Performs the hyperbolic sine function operation on each tensor in the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachSqrt | Performs the square root operation on each tensor in the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachSubList | Performs element-wise subtraction on two input tensor lists and adjusts the subtraction coefficient using the alpha parameter. | Enabled by default | - |
| aclnnForeachSubListV2 | Subtracts elements in two tensor lists one by one and adjusts the subtraction coefficient using the alpha parameter. | Enabled by default | Enabled by default |
| aclnnForeachSubListInplace | Computes x1-alpha*x2 element-wise for two tensor lists and writes the result back to the first list in place. | - | Enabled by default |
| aclnnForeachSubScalar | Performs element-wise subtraction between each tensor in the input tensor list and the given tensor scalar. | Enabled by default | - |
| aclnnForeachSubScalarList | Performs element-wise subtraction between each tensor in the input tensor list and each scalar in scalar list scalars. | Enabled by default | Enabled by default |
| aclnnForeachSubScalarV2 | Performs element-wise subtraction between each tensor in the input tensor list and the given scalar scalar. | Enabled by default | Enabled by default |
| aclnnForeachSubScalarInplace | Subtracts the same scalar element by element from each tensor in the input tensor list, and updates the result in place. | - | Enabled by default |
| aclnnForeachTan | Performs the tangent function operation on each tensor in the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachTanh | Performs the hyperbolic tangent function operation on each tensor in the input tensor list. | Enabled by default | Enabled by default |
| aclnnForeachZeroInplace | Updates the input tensor list in place, and sets each tensor to 0. | Enabled by default | Enabled by default |
| aclnnFusedAdam | Implements the Adam optimizer function. Multiple groups of parameter lists (TensorList) can be called at a time to complete the Adam optimizer function. | - | Enabled by default |
| aclnnFusedAdamw | Implement the fusedadamw operator. Multiple scattered fine-grained operations (such as gradient scaling, weight attenuation, momentum update, and parameter assignment) in the traditional Adamw update process are integrated into a single NPU kernel for execution. | Enabled by default | Enabled by default |
| aclnnFusedCrossEntropyLossWithMaxSum | Part of the cross entropy computation module in the vocabulary parallelism scenario. It solves the video memory and computation efficiency problems in the ultra-large vocabulary. The current part is the result of calculating loss and softMax. | Enabled by default | - |
| aclnnFusedLinearOnlineMaxSum | The function is equivalent to the implementation of matmul and fused_vocab_parallel_cross_entropy of Megatron. Matmul and cross-entropy loss can be fused by vocabulary_size. | Enabled by default | - |
| aclnnFusedLinearCrossEntropyLossGrad | Solves the video memory and computing efficiency problems in the case of ultra-large vocabulary. This part involves the gradient computation implementation, which is used to compute the gradients of leaf nodes input and weight. This operator is a part of the cross entropy computation module in the vocabulary parallelism scenario. | Enabled by default | - |
| aclnnFusedMatmul | Fuses matrix multiplication and general vector computation. | - | Enabled by default |
| aclnnFusedMatmulV2 | Fuses matrix multiplication and general vector computation. | - | Enabled by default |
| aclnnFusedQuantMatmul | Quantization matrix multiplication is fused with general vector computation. | Enabled by default | - |
| aclnnFusedQuantMatmulWeightNz | Fusion of quantization matrix multiplication and general vector computation, input of WeightNz. | Enabled by default | - |
| aclnnFusedSgd | Implement the fusedSgd operator. Multiple scattered fine-grained operations (such as gradient scaling, weight attenuation, momentum update, and parameter assignment) in the traditional SGD update process are integrated into a single NPU kernel for execution. | Enabled by default | Enabled by default |
| aclnnGather | Gathers data of a specific dimension dim in the input tensor. | Enabled by default | Enabled by default |
| aclnnGatherNd | For an input tensor self with dimension r≥1 and an input tensor indices with dimension q≥1, collects data slices to the output tensor out with dimension (q – 1) + (r – indices_shape[–1]). | Enabled by default | Enabled by default |
| aclnnGatherV2 | Extracts elements from the specified dimension dim of the input tensor based on the index number in index, and saves the elements to the out tensor. | Enabled by default | Enabled by default |
| aclnnGatherV3 | Extracts elements from the specified dimension dim of the input tensor based on the index number in index. batchDims indicates the batch size. The result is saved to the out tensor. | Enabled by default | Enabled by default |
| aclnnGeGlu | Uses the Gaussian Error Linear Unit (GELU) activation function. | Enabled by default | Enabled by default |
| aclnnGeGluBackward | Performs backpropagation of aclnnGeGlu. | Enabled by default | Enabled by default |
| aclnnGeGluV3 | Uses the Gaussian Error Linear Unit (GELU) activation gate function. Based on aclnnGeGlu, the direction of the data block on which the activation function is performed can be set. | Enabled by default | Enabled by default |
| aclnnGeGluV3Backward | Performs backpropagation of aclnnGeGluV3. | Enabled by default | Enabled by default |
| aclnnGelu | Uses the Gaussian Error Linear Unit (GELU) activation function. | Enabled by default | Enabled by default |
| aclnnGeluBackward | Performs backpropagation of aclnnGelu. | Enabled by default | Enabled by default |
| aclnnGeluBackwardV2 | Performs backpropagation of aclnnGeluV2. | Enabled by default | Enabled by default |
| aclnnGeluMul | Divides the input tensor into two tensors x1 and x2 based on the last dimension, performs Gelu computation on x1, and multiplies the computation result by x2. | Enabled by default | Enabled by default |
| aclnnGeluQuant | Fuses GeluV2 with DynamicQuant/AscendQuantV2, performs gelu activation on the input data self, quantizes the activation result, and outputs the quantized result. | - | Enabled by default |
| aclnnGeluV2 | Uses the Gaussian Error Linear Unit (GELU) activation function. | Enabled by default | Enabled by default |
| aclnnGemm | Computes the product of α multiplied by A and B, and then sum up the product of alpha multiplied by β and input C. | Enabled by default | Enabled by default |
| aclnnGemmaRmsNorm | The GemmaRmsNorm operator is a normalization operation commonly used in foundation models. Compared with the RmsNorm operator, it performs the +1 operation on gamma during computation. | Enabled by default | Enabled by default |
| aclnnGlu | The Gated Linear Unit (GLU) function splits an input tensor evenly into two tensors along the specified dimension dim and multiplies the former tensor by the Sigmoid output of the latter tensor element-wise. | Enabled by default | Enabled by default |
| aclnnGluBackward | Performs backpropagation of aclnnGlu. | Enabled by default | Enabled by default |
| aclnnHardshrink | Forcibly shrinks elements in the range of λ by element. | Enabled by default | Enabled by default |
| aclnnGroupNorm | Computes the group normalization result out, mean value meanOut, and reciprocal of the standard deviation rstdOut of the input self. | Enabled by default | Enabled by default |
| aclnnGroupNormBackward | Performs backpropagation of aclnnGroupNorm. It is used to calculate the gradient of the input tensor so that the model parameters can be updated during backpropagation. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnGroupNormSilu | Calculate the group normalization result groupnormOut, meanOut, and reciprocal rstdOut of the standard deviation of the input self, and perform the silu operation on groupnormOut to obtain the final output out. | Enabled by default | Enabled by default |
| aclnnGroupNormSiluV2 | Computes the group normalization result out, meanOut, reciprocal rstdOut of the standard deviation, and silu output of the input self. | Enabled by default | Enabled by default |
| aclnnGroupNormSiluQuant | Computes the group normalization of the input self, meanOut, reciprocal rstdOut of the standard deviation, and the quantization result out of the silu output. | Enabled by default | - |
| aclnnGroupNormSwish | Computes the group normalization result out, mean value meanOut, reciprocal rstdOut of the standard deviation, and swish output of the input x. | Enabled by default | Enabled by default |
| aclnnGroupNormSwishGrad | Performs backpropagation of aclnnGroupNormSwish. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnGroupQuant | Performs group-wise quantization on the input x. | Enabled by default | Enabled by default |
| aclnnGRU | Calculates the gated recurrent unit (GRU) and supports two input modes: multi-layer stacking, bidirectional, fixed-length sequence, and packed sequence. In training mode, the intermediate results (r, z, n, hn, and h) of each gate control can be output for backpropagation. | Enabled by default | - |
| aclnnGRUBackward | GRU backpropagation, which is used to calculate the gradient of the forward input, weight params, and initial state hx. | Enabled by default | - |
| aclnnHardshrinkBackward | Calculates the backpropagation gradient gradInput for aclnnHardshrink. | Enabled by default | Enabled by default |
| aclnnHardsigmoid&aclnnInplaceHardsigmoid | Activates the function variant. aclnnHardsigmoid writes the computation result to the output tensor, and aclnnInplaceHardsigmoid writes the computation result back to the input tensor in place. The shape of the result is the same as that of the input tensor. | Enabled by default | - |
| aclnnHardsigmoidBackward | Performs backpropagation of aclnnHardsigmoid. | Enabled by default | Enabled by default |
| aclnnHardswishBackward | Performs backpropagation of aclnnHardswish and computes the gradient of tensor self. | Enabled by default | Enabled by default |
| aclnnHardswishBackwardV2 | Performs backpropagation of aclnnHardswish and computes the gradient of tensor self. | Enabled by default | Enabled by default |
| aclnnHardswish&aclnnInplaceHardswish | Activation function, which returns the output tensor with the same shape as the input tensor. If the input value is less than or equal to -3, the value is used. If the input value is greater than or equal to 3, the value is used. In other cases, the value is the sum of the value plus 3 multiplied by the value and then divided by 6. | Enabled by default | Enabled by default |
| aclnnHardtanhBackward | Performs backpropagation of activation function aclnnHardtanh. | Enabled by default | Enabled by default |
| aclnnHeaviside | Computes the step function Heaviside of each element in input as the activation function of the model. | Enabled by default | Enabled by default |
| aclnnIndex | Obtains the coordinate data of the input x based on indices. | Enabled by default | Enabled by default |
| aclnnIndexAdd | Adds the value in the source tensor to the value of the corresponding position in the input tensor based on the given index in a specified dimension. | Disabled by default. Can be enabled. | Disabled by default. Can be enabled. |
| aclnnIndexAddV2 | Adds the value in the source tensor to the value of the corresponding position in the input tensor based on the given index in a specified dimension. The high-performance computing mode can be enabled. | Disabled by default. Can be enabled. | - |
| aclnnIndexCopy&aclnnInplaceIndexCopy | Takes the element value in the index tensor as the index and copies elements from source to the corresponding positions in selfRef based on the specified axis dim. | Enabled by default | Disabled by default. Can be enabled. |
| aclnnIndexFill&aclnnInplaceIndexFill | Replaces the value at the position specified by index with value along the specified axis dim of the input self. | Enabled by default | Enabled by default |
| aclnnIndexFillTensor&aclnnInplaceIndexFillTensor | Replaces the value at the position specified by index with value along the specified axis dim of the input self. | Enabled by default | Enabled by default |
| aclnnIndexPutImpl | Replaces or accumulates the coordinate data corresponding to the input x and the input value based on the index indices. | Disabled by default. Can be enabled. | Disabled by default. Can be enabled. |
| aclnnInplacePut | Takes selfRef as a one-dimensional tensor and uses the element value in the index tensor as the index. If accumulate is true, the elements in source and the elements in the corresponding positions of selfRef are accumulated. If accumulate is false, the elements in source replace the elements in the corresponding positions of selfRef. | Enabled by default | Disabled by default. Can be enabled. |
| aclnnInplaceScatterUpdate | Updates the values in data one by one by referring to the values in updates based on the specified axis and indices. The operator semantics are customized without corresponding TensorFlow or PyTorch APIs. | Enabled by default | Disabled by default. Can be enabled. |
| aclnnIndexSelect | Extracts elements from the specified dimension dim of the input tensor based on the index number in index, and saves the elements to the out tensor. | Enabled by default | Enabled by default |
| aclnnInplaceAddRmsNorm | The RmsNorm operator is a common normalization operation for large models. Compared with the LayerNorm operator, the RmsNorm operator does not subtract the average value. | Enabled by default | Enabled by default |
| aclnnInplaceMaskedScatter | Copies the element in source to the corresponding position in selfRef based on the position where the element in the mask tensor is True. | Enabled by default | Enabled by default |
| aclnnInplaceQuantScatter | Quantizes updates along the quantAxis axis: quantScales scales updates, and quantZeroPoints offsets updates. Then, the values in the quantized updates are updated one by one at the corresponding positions in selfRef based on the index tensor indices along the specified axis. | Enabled by default | Enabled by default |
| aclnnInplaceQuantScatterV2 | The Quantize and Scatter operators are fused. The updates operator is quantized on the quantAxis axis. The quantScales operator scales the updates operator, and the quantZeroPoints operator offsets the updates operator. Then, the values in the quantized updates are updated one by one at the corresponding positions in selfRef based on the index tensor indices along the specified axis. Compared with aclnnInplaceQuantScatter, aclnnInplaceQuantScatter has the roundMode input. | - | Enabled by default |
| aclnnInstanceNorm | Performs instance normalization. | - | - |
| aclnnInverse | Computes the inverse matrix of the input square matrix. | Enabled by default | Enabled by default |
| aclnnKlDivBackward | Performs backpropagation on the result of the aclnnKlDiv API. | Enabled by default | Enabled by default |
| aclnnKlDivTargetBackward | Reversely computes the target of the aclnnKlDiv API result. | Enabled by default | Enabled by default |
| aclnnKthvalue | Returns the k-th minimum value and index of the input tensor in the specified dimension. | Enabled by default | Enabled by default |
| aclnnL1Loss | Computes the mean absolute error (MAE) between each element of input self and target. | Enabled by default | Enabled by default |
| aclnnL1LossBackward | Performs backpropagation of aclnnL1Loss. reduction specifies the computation method of the loss function. | Enabled by default | Enabled by default |
| aclnnLayerNorm&aclnnLayerNormWithImplMode | Performs normalization with a mean of 0 and a standard deviation of 1 on a specified layer. | Enabled by default | Enabled by default |
| aclnnLayerNormBackward | Backpropagation of aclnnLayerNorm. It is used to calculate the gradient of the input tensor so that the model parameters can be updated during backpropagation. | Enabled by default | Enabled by default |
| aclnnLayerNormQuant | The operator fuses the LayerNorm normalization output with the downstream quantization operator to reduce the move-in and move-out operations. | Enabled by default | Enabled by default |
| aclnnLeakyRelu&aclnnInplaceLeakyRelu | Performs an activation function, which is used to solve the problem that the output of the Relu function is 0 when the input is less than 0 to prevent neurons from failing to update parameters. | Enabled by default | Enabled by default |
| aclnnLeakyReluBackward | Performs backpropagation of the LeakyRelu activation function. | Enabled by default | Enabled by default |
| aclnnLinalgVectorNorm | Computes the vector norm of the input tensor. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnLogit | This operator is a mathematical operation of converting probability to log-odds. It is often used for inverse transformation of probability values. | Enabled by default | Enabled by default |
| aclnnLogitGrad | Performs backpropagation of aclnnLogit. | Enabled by default | Enabled by default |
| aclnnLogSigmoid | Performs element-wise LogSigmoid operation on the input tensor. | Enabled by default | Enabled by default |
| aclnnLogSigmoidBackward | Performs backpropagation of aclnnLogSigmoid. It is used to compute the gradient input based on the gradient generated during upper-layer propagation and the forward input of LogSigmoid. | Enabled by default | Enabled by default |
| aclnnLogSigmoidForward | Performs element-wise LogSigmoid operation on the input tensor. | Enabled by default | Enabled by default |
| aclnnLogSoftmax | Computes the logsoftmax value of the input tensor. | Enabled by default | Enabled by default |
| aclnnLogSoftmaxBackward | Performs backpropagation of aclnnLogSoftmax. | Enabled by default | Enabled by default |
| aclnnLSTM | Calculates the LSTM. | Enabled by default | Enabled by default |
| aclnnLstmBackward | Performs LSTM reverse computation. | Enabled by default | Enabled by default |
| aclnnMaskedSoftmaxWithRelPosBias | Replaces the part that uses window attention to compute softmax in swinTransformer. | Enabled by default | - |
| aclnnMatmul | Performs matrix multiplication on the one-to-six-dimensional tensor self and the tensor mat2. | - | Enabled by default |
| aclnnMatmulWeightNz | Computes the matrix multiplication of tensor self and tensor mat2. mat2 supports only the Ascend affinity data layout format. | Enabled by default | Enabled by default |
| aclnnMatmulCompress | During l@r matrix multiplication, you can use the msModelSlim tool to losslessly compress the r matrix to reduce the memory usage of the r matrix, and then use this API to complete lossless decompression, matrix multiplication, and dequantization. | - | - |
| aclnnMatmulCompressDequant | During l@r matrix multiplication, you can use the msModelSlim tool to losslessly compress the r matrix to reduce the memory usage of the r matrix, and then use this API to complete lossless decompression, matrix multiplication, and dequantization. | - | - |
| aclnnMatmulEmuSplitWeight | The dual-channel BF16 GEMM fusion is used to simulate the FP32 precision matrix multiplication. The FP32 weight is split into high-order BF16 and low-order residual BF16 in offline mode. In the inference phase, BF16 GEMM is executed twice and linear combination is performed. The activation value remains BF16 throughout the entire process. The two matrix multiplications run on the Cube. | Enabled by default | Enabled by default |
| aclnnMaxPool | Performs max pooling on the three-dimensional or four-dimensional input tensor. | Enabled by default | Enabled by default |
| aclnnMaxPool2dWithIndices | Provides two-dimensional (H, W) max pooling for the input channels of the input signal, and outputs the pooled value out and indices. | Enabled by default | Enabled by default |
| aclnnMaxPool2dWithIndicesBackward | Backpropagation of forward max pooling aclnnMaxPool2dWithIndices. | Disabled by default. Can be enabled. | Disabled by default. Can be enabled. |
| aclnnMaxPool2dWithMask | Provides two-dimensional max pooling for the input channels of the input signal, and outputs the pooled value out and indices (calculated using the mask semantics). | Enabled by default | - |
| aclnnMaxPool2dWithMaskBackward | Backpropagation of forward max pooling aclnnMaxPool2dWithMask. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnMaxPool3dWithArgmax | Applies three-dimensional max pooling over the input channels of an input signal, and outputs the value out and indices after pooling. | Enabled by default | Enabled by default |
| aclnnMaxPool3dWithArgmaxBackward | Backpropagation of forward maximum pooling aclnnMaxPool3dWithArgmax. The gradient is backfilled to the coordinate of the maximum value of each window, and the gradient is accumulated at the same coordinate. | Disabled by default. Can be enabled. | Disabled by default. Can be enabled. |
| aclnnMaxUnpool2d | In the inverse operation of aclnnMaxPool in 2d, outputSize determines the sizes of the H and W axes of out, the element value of self is filled in out based on the indices index, and other positions are set to 0. | Enabled by default | Enabled by default |
| aclnnMaxUnpool2dBackward | Performs backpropagation of the MaxPool2d inverse operation aclnnMaxUnpool2d, writing element values of gradOutput in out based on indices. | Enabled by default | Enabled by default |
| aclnnMaxUnpool3d | In the inverse operation of aclnnMaxPool in 3D, outputSize determines the sizes of the D, H, and W axes of outRef, fills the element value of self in outRef based on the indices index, and sets other positions to 0. | Enabled by default | Enabled by default |
| aclnnMaxUnpool3dBackward | Performs backpropagation of the MaxPool3d inverse operation aclnnMaxUnpool3d, writing element values of gradOutput in out based on indices. | Enabled by default | Enabled by default |
| aclnnMedian | Returns the median of all elements. | Enabled by default | Enabled by default |
| aclnnMedianDim | Returns the median and position of all elements. (If the number of elements in the specified dimension is size, the subscript of the median after sorting is (size - 1) // 2.) | Enabled by default | Enabled by default |
| aclnnMm | Performs matrix multiplication on the two-dimensional tensors self and mat2. | Enabled by default | Enabled by default |
| aclnnMish&aclnnInplaceMish | Defines a self-regularized non-monotonic neural activation function. | Enabled by default | Enabled by default |
| aclnnMishBackward | Performs backpropagation of aclnnMish. | Enabled by default | Enabled by default |
| aclnnModulate | Implements adaptive scaling and shift of features. | Enabled by default | Enabled by default |
| aclnnModulateBackward | Computes the parameters in the backpropagation of ModulateBackward and updates the gradients. | Enabled by default | - |
| aclnnMseLoss | Computes the mean squared error between each element in input x and target y. | Enabled by default | Enabled by default |
| aclnnMseLossBackward | Performs backpropagation of mean squared error function aclnnMseLoss. | Enabled by default | Enabled by default |
| aclnnMseLossOut | Computes the mean squared error between each element in input x and target y. | Enabled by default | Enabled by default |
| aclnnMultilabelMarginLoss | Calculate the interval loss of multi-label classification. | Defaults to a non-deterministic implementation. Enabling deterministic computing is not supported. | - |
| aclnnMultiScaleDeformableAttnFunction | Traverses different sampling points of feature maps with different sizes by specifying parameters. | Enabled by default | Disabled by default. Can be enabled. |
| aclnnMultiScaleDeformableAttentionGrad | The forward operator traverses different sampling points of feature maps with different sizes by specifying parameters. The reverse operator calculates the gradient corresponding to the input based on the contribution of the forward input to the output and an initial gradient. | Disabled by default. Can be enabled. | Disabled by default. Can be enabled. |
| aclnnMv | Computes the product of matrix input and vector vec. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnNanMedian | Returns the median of all elements after NAN is ignored. | Enabled by default | Enabled by default |
| aclnnNanMedianDim | Returns the median and position of values in the specified dimension of a tensor after NAN is ignored. | Enabled by default | Enabled by default |
| aclnnNorm | Returns the matrix norm or vector norm of a given tensor. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnNLLLoss | Computes the negative log-likelihood loss. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnNLLLoss2d | Computes the negative log-likelihood loss. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnNLLLoss2dBackward | Performs backpropagation of the negative log-likelihood loss. | Enabled by default | Enabled by default |
| aclnnNLLLossBackward | Performs backpropagation of the negative log-likelihood loss function. | Enabled by default | Enabled by default |
| aclnnNonzero | Finds the positions of non-zero elements in self. Assume that the dimension of self is D and the number of non-zero elements in self is N. The shape of out is D × N. Each column indicates the position coordinates of a non-zero element. | Enabled by default | Enabled by default |
| aclnnNonzeroV2 | Finds the positions of non-zero elements in self. Assume that the dimension of self is D and the number of non-zero elements in self is N. The shape of out is D × N. Each column indicates the position coordinates of a non-zero element. | Enabled by default | Enabled by default |
| aclnnPrelu | Performs an activation function. If a value in a tensor is greater than 0, the value is used. Otherwise, the product of the weight and value is used. | Enabled by default | Enabled by default |
| aclnnPreluBackward | Completes the inverse function of aclnnPrelu. | Enabled by default | Enabled by default |
| aclnnQuantConvolution | Performs two-dimensional and three-dimensional convolution for per-channel quantization. | Enabled by default | Enabled by default |
| aclnnQuantConvolutionWeightNz | Performs 3D convolution computation for per-channel quantization. The weight supports only the FRACTAL_Z_3D format. | Enabled by default | Enabled by default |
| aclnnQuantize | Quantizes the input tensor. | Enabled by default | Enabled by default |
| aclnnQuantizedBatchNorm | Performs dequantization on the input tensor, performs normalization based on the input weight, bias, and epsilon, and performs quantization based on the input outputScale and outputZeroPoint. | Enabled by default | Enabled by default |
| aclnnQuantMatmulV5 | Performs matrix multiplication for quantization. | Enabled by default | Enabled by default |
| aclnnQuantBatchMatmulInplaceAdd | Implements quantization matrix multiplication and in-place accumulation addition. The basic function is the combination of matrix multiplication and addition. | - | Enabled by default |
| aclnnQuantMatmulReduceSumWeightNz | Performs quantized group matrix computation, adds the matrix computation results of all groups, and outputs the result. | Disabled by default. Can be enabled. | - |
| aclnnQuantMatmulWeightNz | Performs matrix multiplication for quantization. | Enabled by default | Enabled by default |
| aclnnQuantMatmulActivationQuant | For matrix multiplication, activation, and dynamic quantization computation with fused quantization, the weight supports only the ND format. | - | Enabled by default |
| aclnnQuantMatmulActivationQuantWeightNz | Matrix multiplication, activation, and dynamic quantization. The weight supports only the NZ format. | - | Enabled by default |
| aclnnQuantMatmulDequant | Quantizes the input x, performs matrix multiplication, and dequantizes the result. | - | - |
| aclnnQuantMax | Calculates the input quantization and obtains the maximum value of the input absolute value. | - | Enabled by default |
| aclnnGroupedQuantMax | Quantizes the input group and obtains the maximum absolute value of the input group. | - | Enabled by default |
| aclnnRelu&aclnnInplaceRelu | Performs an activation function, which returns a tensor with the same shape as the input tensor. If value of the tensor is greater than or equal to 0, the value is used. If the value is less than 0, 0 is used. | Enabled by default | Enabled by default |
| aclnnRenorm&aclnnInplaceRenorm | Returns a tensor where each sub-tensor of the input tensor self along the dimension dim is normalized so that the p-norm of the sub-tensor is less than maxNorm. | Enabled by default | Enabled by default |
| aclnnRepeatInterleave | Description: Repeats the tensor for the number of times specified by repeats after the tensor self is flattened. | Enabled by default | Enabled by default |
| aclnnRepeatInterleaveGrad | Performs backpropagation for the repeatInterleave operator, and performs ReduceSum on the axis dimension of the yGrad tensor based on repeats. | - | Enabled by default |
| aclnnRepeatInterleaveInt | Repeats each element for the number of times specified by repeats after the tensor self is flattened. | Enabled by default | Enabled by default |
| aclnnRepeatInterleaveIntWithDim | Repeats each element in a tensor for the corresponding number of times based on the dimension. | Enabled by default | Enabled by default |
| aclnnRepeatInterleaveTensor | For the ith element of Tensor repeats, repeat i for [i] times. | Enabled by default | Enabled by default |
| aclnnRepeatInterleaveWithDim | Repeats each element in the tensor for the corresponding number of times based on the dim dimension. | Enabled by default | Enabled by default |
| aclnnRmsNorm | The RmsNorm operator is a common normalization operation for large models. Compared with the LayerNorm operator, the RmsNorm operator does not subtract the average value. | Enabled by default | Enabled by default |
| aclnnRmsNormGrad | Performs backpropagation of aclnnRmsNorm. It is used to compute the gradient of RMSNorm, that is, compute the gradient of the input tensor during backpropagation. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnRmsNormGradQuant | RmsNormGrad is an operator used to calculate the gradient of RmsNorm, that is, the gradient of the input tensor during backpropagation. The RmsNormGradQuant operator fuses the RmsNormGrad and Quantize operators. After calculating the dx, the RmsNormGrad operator performs quant computation to reduce the move-in and move-out operations. | - | Enabled by default |
| aclnnRmsNormQuant | Fuses the Add operator before aclnnRmsNorm and the Quantize operator after aclnnRmsNorm to reduce move-in and move-out operations. | Enabled by default | Enabled by default |
| aclnnRmsNormQuantV3 | aclnnRmsNormQuantV3 fuses aclnnRmsNorm and the Quantize operator after aclnnRmsNorm to reduce the move-in and move-out operations. In addition, the optional output of Rstd is supported based on aclnnRmsNormQuant. | - | Enabled by default |
| aclnnRotateQuant | Rotates tensor x, performs the optional clamp operation, and then performs symmetric dynamic quantization (destination data type: int8 or quint4x2) or MX quantization (destination data type: FLOAT4 or FLOAT8). | Enabled by default | Enabled by default |
| aclnnRReluWithNoise&aclnnInplaceRReluWithNoise | Performs the activation function of the random rectified linear unit with noise. When the input is less than or equal to 0, the slope is a. When the input is greater than 0, the slope is 1. | Enabled by default | Enabled by default |
| aclnnScatter&aclnnInplaceScatter | Replaces, accumulates, or multiplies the values in the tensor src to the tensor self based on the given axis and direction and the corresponding position relationship. | Enabled by default | Disabled by default. Can be enabled. |
| aclnnScatterAdd | Adds values from the src tensor into the self tensor in sequence according to the specified axis direction and the corresponding position specified by the index tensor. If more than one src value is written at the same position in self, these values are accumulated at this position. | Enabled by default | Disabled by default. Can be enabled. |
| aclnnScatterDiv | Implement the function compatible with tf.scatter_div and divide updates by index to var. | - | Enabled by default |
| aclnnScatterNd | Copies the data from data to out, and updates the data in out based on updates at the specified indices. | Enabled by default | Disabled by default. Can be enabled. |
| aclnnScatterNdUpdate | Updates the values in varRef in sequence by referring to the values in the updates tensor based on the specified indices. | Enabled by default | Disabled by default. Can be enabled. |
| aclnnScatterList | Applies sparse updates to the variable reference tensor list and scatters the value in updates to the dimension corresponding to var through the index. | Disabled by default. Can be enabled. | Disabled by default. Can be enabled. |
| aclnnScatterMax | Compatible with tf.scatter_max. The maximum value of var and updates is obtained by index. | - | Enabled by default |
| aclnnScatterMin | Compatible with tf.scatter_min. The minimum value of var and updates is obtained by index. | - | Enabled by default |
| aclnnScatterMul | Implement the function compatible with tf.scatter_mul and multiply updates by index to var. | - | Enabled by default |
| aclnnScatterReduce&aclnnInplaceScatterReduce | Performs the scatter operation with reduction semantics on the input tensor. Six reduction modes are supported: replacement, accumulation, accumulation, maximum value, minimum value, and average value. includeSelf can be used to control whether to involve the original value in self in the reduction computation. | Disabled by default. Can be enabled. | Disabled by default. Can be enabled. |
| aclnnScatterValue&aclnnInplaceScatterValue | Writes values from scalar value into tensor self one by one according to the specified axis, direction, and corresponding position relationship. | Enabled by default | Disabled by default. Can be enabled. |
| aclnnScaledMaskedSoftmax | Scales and masks the input x, and then performs the softmax operation to obtain the output. | Enabled by default | - |
| aclnnScaledMaskedSoftmaxBackward | Performs backpropagation of softmax, and scales and masks the result. | Disabled by default. Can be enabled. | - |
| aclnnSelu&aclnnInplaceSelu | Computes the SELU (Scaled Exponential Linear Unit) activation function element by element for the input tensor. | Enabled by default | Enabled by default |
| aclnnSeluBackward | Performs backpropagation of aclnnSelu. | Enabled by default | - |
| aclnnShrink | Performs non-linear transformation on the input tensor, and applies scaling and bias processing to the input using bias based on the relationship between input self and threshold lambd. | Enabled by default | Enabled by default |
| aclnnSigmoid&aclnnInplaceSigmoid | Performs the sigmoid operation on the input tensor. | Enabled by default | Enabled by default |
| aclnnSigmoidBackward | Performs backpropagation of sigmoid. The sigmoid gradient input is computed based on the sigmoid backpropagation gradient and forward output. | Enabled by default | Enabled by default |
| aclnnSilu | This operator is also called the Swish function. | Enabled by default | Enabled by default |
| aclnnSiluBackward | Performs backpropagation of aclnnSilu, and computes the silu gradient input based on the silu backpropagation gradient and forward output. | Enabled by default | Enabled by default |
| aclnnSituGlu | Activation function of the SiTU gated linear unit. The input tensor is divided into two halves: gated and upper path along the specified dimension, and the output is calculated based on the SiTU formula. | Enabled by default | Enabled by default |
| aclnnSituGluGrad | Backward gradient computation of the activation function of the SiTU gated linear unit. The input gradient is calculated based on the upstream gradient and forward input. | Enabled by default | Enabled by default |
| aclnnSmoothL1Loss | Computes the SmoothL1 loss function. | Enabled by default | Enabled by default |
| aclnnSmoothL1LossBackward | Performs backpropagation of aclnnSmoothL1Loss API. | Enabled by default | Enabled by default |
| aclnnSoftMarginLoss | Computes the binary logic loss function of inputs self and target. | Enabled by default | Enabled by default |
| aclnnSoftMarginLossBackward | Performs backpropagation of the aclnnSoftMarginLoss binary logic loss function. | Enabled by default | - |
| aclnnSoftmax | Computes the softmax value of the input tensor. | Enabled by default | Enabled by default |
| aclnnSoftmaxBackward | Performs backpropagation of softmax. | Enabled by default | Enabled by default |
| aclnnSoftmaxCrossEntropyWithLogits | Computes the softmax and cross-entropy loss and provides the backward gradient for the input logits. | Enabled by default | Enabled by default |
| aclnnSoftplus | Performs activation function softplus. | Enabled by default | Enabled by default |
| aclnnSoftplusBackward | Performs backpropagation of aclnnSoftplus. | Enabled by default | Enabled by default |
| aclnnSoftshrink | Forcibly shrinks elements in the range of λ by element. | Enabled by default | Enabled by default |
| aclnnSoftshrinkBackward | Performs backpropagation of the Softshrink function. | Enabled by default | - |
| aclnnSparse4to2QuantMatmulWeightNz | Implements matrix multiplication for sparse 4:2 quantization. | Enabled by default | - |
| aclnnSquaredRelu | The SquaredReLU function is a variant of the standard ReLU function. It is mainly used to square the output of the ReLU function and is often used as the activation function of a model. | Enabled by default | Enabled by default |
| aclnnSwiGlu | Performs a Swish Gated Linear Unit (SwiGlu) activation function, and implements the SwiGlu computation of x. | Enabled by default | Enabled by default |
| aclnnSwiGluGrad | Performs backpropagation of aclnnSwiGlu and computes the SwiGlu reverse gradient of x. | Enabled by default | Enabled by default |
| aclnnSwigluGroupQuant | Grouped low-bit quantization is performed after the activation function of the Swish gated linear unit, and FP8 quantization output is supported. | - | Enabled by default |
| aclnnSwigluGroupQuantV2 | Based on the original uniaxial quantization API, the alpha and bias can be configured, and the original value output can be activated. | - | Enabled by default |
| aclnnSwigluGroupQuantWithDualAxis | Fuses ClippedSwiGLU with MX quantization in two directions, and supports optional grouping, weight, and activation original value output. | - | Enabled by default |
| aclnnSwigluGroupGrad | Calculates the backward gradient of the ClampedSwiglu activation function, recalculates the clamp mask and sigmoid based on the upstream gradient grad_y and forward input x, and outputs grad_x and optional grad_weight, supports group_index dynamic grouping and weight gradient computation in the MoE scenario. | - | Enabled by default |
| aclnnSwigluGroupQuantGrad | Computes the inverse gradient for group quantization of the SwiGLU activation function. | - | Enabled by default |
| aclnnSwigluBackwardGroupQuantWithDualAxis | Fuses the SwiGLU inverse computation with clamp and weight and dual-axis dynamic MX quantization, and outputs the FP8 quantization result and E8M0 scaling factor. | - | Enabled by default |
| aclnnSwiGluQuant | Adds quantization after the SwiGlu activation function to implement SwiGluQuant computation of the input x. | Enabled by default | Enabled by default |
| aclnnSwiGluQuantV2 | Adds quantization after the SwiGlu activation function to implement SwiGluQuant computation of the input x. The int8 or int4 quantization output is supported. | Enabled by default | Enabled by default |
| aclnnSwish | Performs the Swish activation function to the input tensor element-wise and outputs the result tensor. | Enabled by default | Enabled by default |
| aclnnSwishBackward | Performs backpropagation of aclnnSwish. It is used to compute the gradient of the Swish activation function. | Enabled by default | Enabled by default |
| aclnnSyncBatchNormGatherStats | Collects the mean value and variance of data on all devices and updates the global mean value and variance. | Enabled by default | Enabled by default |
| aclnnTake | Takes the input self tensor as a one-dimensional array, uses index to obtain a value from self, and outputs a tensor whose shape is the same as index. | Enabled by default | Enabled by default |
| aclnnTfScatterAdd | Compatible with tf.scatter_add and tf.scatter_nd_add. Adds the value in updates to the slice of varRef based on the specified index. | Enabled by default | Disabled by default. Can be enabled. |
| aclnnThnnFusedLstmCell | Performs the subsequent computation after matrix multiplication in the forward computation of the LSTM unit. | Enabled by default | - |
| aclnnThnnFusedLstmCellBackward | Completes the LSTM reverse computation of a single time step. | Enabled by default | - |
| aclnnThreshold&aclnnInplaceThreshold | Sets the threshold for input x. If elements in x are greater than threshold, the elements are returned. Otherwise, value is returned. | Enabled by default | Enabled by default |
| aclnnThresholdBackward | Performs backpropagation of aclnnThreshold. | Enabled by default | Enabled by default |
| aclnnTransSparse4to2Para | Perform compression preprocessing on the structured sparse weight matrix, and output the compressed sparse matrix and the corresponding index matrix. | Enabled by default | - |
| aclnnTransposeBatchMatMul | Performs matrix multiplication on tensors x1 and x2. | Enabled by default | Enabled by default |
| aclnnTransposeBatchMatMulWeightNz | Performs matrix multiplication on tensors x1 and x2. x2 supports only the Ascend affinity data layout format NZ. x1 supports only three dimensions, and x2 supports only five dimensions. | Enabled by default | Enabled by default |
| aclnnTransposeQuantBatchMatMul | Computes the matrix multiplication of tensor x1 and tensor x2. | - | Enabled by default |
| aclnnTransposeQuantBatchMatMulWeightNz | Computes the matrix multiplication of tensor x1 and tensor x2. x2 supports only the Ascend affinity data layout format NZ. x1 supports only three dimensions, and x2 supports only five dimensions. | - | Enabled by default |
| aclnnTransQuantParam | Converts the input scale data from FLOAT32 type to UINT64 type required by the hardware, and stores the data in quantParam. | Enabled by default | Enabled by default |
| aclnnTransQuantParamV2 | Converts the data type of the quantization parameter scale from FLOAT32 to UINT64 or INT64 required by the hardware. | Enabled by default | Enabled by default |
| aclnnTransQuantParamV3 | Converts the data type of the quantization parameter scale from Float32 to UINT64 or INT64 required by the hardware. | Enabled by default | Enabled by default |
| aclnnTopKTopPSample | Performs topK-topP sampling computation based on the input logits, topK/topP sampling parameters, and random sampling weight distribution q, and outputs the maximum word frequency logitsSelectIdx of each batch and the word frequency distribution logitsTopKPSelect after topK-topP sampling. | Enabled by default | - |
| aclnnTopKTopPSampleV2 | topK-topP-minP-sample sampling computation is performed based on the input word frequency logits, topK/topP/minP sampling parameters, and random sampling weight distribution q. If the input isNeedSampleResult is false, the maximum word frequency logitsSelectIdx of each batch and the word frequency distribution logitsTopKPSelect after topK-topP-minP sampling are output. If the input isNeedSampleResult is true, the intermediate computation results logitsIdx and logitsSortMasked after topK-topP-minP sampling are output, logitsSortMasked is an intermediate result obtained after topK-topP-minP sampling computation is performed on the word frequency logits, and logitsIdx is an index corresponding to logitsSortMasked in logits. | Enabled by default | Enabled by default |
| aclnnTurboQuant | The KV latent of the MLA is quantized into a TurboQuant 4-bit index by token, and the index and FLOAT16 scale are output. latent supports only FLOAT32. | Enabled by default | - |
| aclnnUnique | Returns the unique elements of the input tensor. | Enabled by default | Enabled by default |
| aclnnUnique2 | Removes duplicate elements from the input tensor self and returns the unique elements in self. This is an enhanced unique function, with a new return value countsOut indicating the number of occurrences for where elements in the input self map to in valueOut, controlled by the returnCounts parameter. | Enabled by default | Enabled by default |
| aclnnUniqueConsecutive | Eliminates all but the first element from every consecutive group of equivalent elements. When dim is not empty, tensors except the first tensor from every consecutive group of equivalent elements are eliminated along the corresponding dimension. | Enabled by default | Enabled by default |
| aclnnUniqueDim | Removes duplicates from the input tensor self along a given dim. | Enabled by default | Enabled by default |
| aclnnWeightQuantBatchMatmulNz | Performs matrix multiplication in the fake-quantization scenario with the input. Only the NZ scenario is supported. | - | Enabled by default |
| aclnnWeightQuantBatchMatmulV2 | Performs input matrix multiplication in a fake-quantization scenario and implements output quantization. | Disabled by default. Can be enabled. | Enabled by default |
| aclnnWeightQuantBatchMatmulV3 | Performs input matrix multiplication in a fake-quantization scenario and implements output quantization. | Disabled by default. Can be enabled. | Enabled by default |
Deprecated APIs
| Deprecated API | Description |
|---|---|
| aclnnWeightQuantBatchMatmul | This API will be deprecated in later versions. Use the latest APIs aclnnWeightQuantBatchMatmulV2 and aclnnWeightQuantBatchMatmulV3. |
| aclnnQuantMatmul | This API will be deprecated in later versions. Use the latest API aclnnQuantMatmulV5. |
| aclnnQuantMatmulV2 | This API will be deprecated in later versions. Use the latest API aclnnQuantMatmulV5. |
| aclnnQuantMatmulV3 | This API will be deprecated in later versions. Use the latest API aclnnQuantMatmulV5. |
| aclnnQuantMatmulV4 | This API will be deprecated in later versions. Use the latest API aclnnQuantMatmulV5. |
| aclnnBatchMatmulQuant | This API will be deprecated in later versions. Do not use this API. |