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/aclnnop and the library file is stored in ${INSTALL_DIR}/lib64.

    • Header file: Method 1 (recommended): Reference the general header file aclnn_ops_{ops_project}.h of 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.

  • 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 NameDescriptionDeterminism (A2/A3)Determinism (Ascend 950)
aclnnAdaLayerNormFuses LayerNorm with downstream Add and Mul, and adjusts the normalization process through the adaptive parameters scale and shift.Enabled by default-
aclnnAdaLayerNormBackwardBackpropagation 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-
aclnnAdaLayerNormQuantFuses 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 defaultEnabled by default
aclnnAdaLayerNormV2Fuses 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 defaultEnabled by default
aclnnAdaptiveAvgPool2dPerforms 2D adaptive average pooling on tensor self with the specified two-dimensional output shape (outputSize).Enabled by defaultEnabled by default
aclnnAdaptiveAvgPool2dBackwardPerforms backpropagation of aclnnAdaptiveAvgPool2d.Disabled by default. Can be enabled.Disabled by default. Can be enabled.
aclnnAdaptiveAvgPool3dPerforms 3D adaptive average pooling on tensor self with the specified three-dimensional output shape (outputSize).Enabled by defaultEnabled by default
aclnnAdaptiveAvgPool3dBackwardPerforms backpropagation of aclnnAdaptiveAvgPool3d.Disabled by default. Can be enabled.Disabled by default. Can be enabled.
aclnnAdaptiveMaxPool2dComputes the size of each kernel based on the input outputSize, and performs two-dimensional max pooling on the input self.Enabled by defaultEnabled by default
aclnnAdaptiveMaxPool2dBackwardPerforms 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.
aclnnAdaptiveMaxPool3dComputes the size of each kernel based on the input outputSize, and performs three-dimensional max pooling on the input self.Enabled by defaultEnabled by default
aclnnAdaptiveMaxPool3dBackwardPerforms 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&aclnnInplaceAddbmmDescription: 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 defaultEnabled by default
aclnnAddmm&aclnnInplaceAddmmComputes 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
aclnnAddmmWeightNzComputes 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 defaultEnabled by default
aclnnAddmvPerforms matrix multiplication and then vector addition.Disabled by default. Can be enabled.Enabled by default
aclnnAddLayerNormProvides the AddLayerNorm function.Enabled by defaultEnabled by default
aclnnAddLayerNormGradLayerNorm 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.
aclnnAddLayerNormQuantThe LayerNorm operator is a normalization operation commonly used in foundation models.-Enabled by default
aclnnAddLayerNormQuantV2The 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 defaultEnabled by default
aclnnAddRmsNormCastThe 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 defaultEnabled by default
aclnnAddRmsNormDynamicMxQuantThe 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
aclnnAddRmsNormDynamicMxQuantV2The 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
aclnnAddRmsNormDynamicQuantFuses 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 defaultEnabled by default
aclnnAddRmsNormDynamicQuantV2The 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 defaultEnabled by default
aclnnAddRmsNormThe 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 defaultEnabled by default
aclnnAddRmsNormQuantFuses the Add operator before RmsNorm and the Quantize operator after RmsNorm to reduce move-in and move-out operations.Enabled by defaultEnabled by default
aclnnAddRmsNormQuantV2The 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 defaultEnabled by default
aclnnAddRelu&aclnnInplaceAddReluPerforms the addition operation and activates the result.Enabled by defaultEnabled by default
aclnnRmsNormDynamicMxQuantThe 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
aclnnRmsNormDynamicQuantThe 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-
aclnnAdvanceStepAdvances 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-
aclnnAdvanceStepV2Advances 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-
aclnnAntiMxQuantDequantizes the FLOAT4/FLOAT8 tensors obtained by calling aclnnDynamicMxQuant/aclnnDynamicMxQuantV2 to the FLOAT16/BFLOAT16/FLOAT32 format.-Enabled by default
aclnnApplyAdamWImplements the AdamW optimizer function.-Enabled by default
aclnnApplyAdamWQuantImplements the adamW optimizer function and quantizes m and v.Enabled by defaultEnabled by default
aclnnApplyAdamWV2Implements the AdamW optimizer function.Enabled by defaultEnabled by default
aclnnApplyFusedEmaAdamImplements the FusedEmaAdam fusion optimizer.Enabled by defaultEnabled by default
aclnnApplyTopKTopPPerforms top-k and top-p sampling and filtering on the original input logits.Enabled by defaultEnabled by default
aclnnAscendAntiQuantDequantizes the input x based on the input scale and offset.Enabled by defaultEnabled by default
aclnnAscendQuantQuantizes 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-
aclnnAscendQuantV3Quantizes 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 defaultEnabled by default
aclnnAvgPool2dPerforms two-dimensional average pooling over the input tensor with the window of kH∗kWkH * kW and stride of sH∗sWsH * sW.Enabled by defaultEnabled by default
aclnnAvgPool2dBackwardBack 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
aclnnAvgPool3dPerforms three-dimensional average pooling over the input tensor with the window of kD∗kH∗kWkD * kH * kW and stride of sD∗sH∗sWsD * sH * sW.Enabled by defaultEnabled by default
aclnnAvgPool3dBackwardBackpropagation 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&aclnnInplaceBaddbmmComputes 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 defaultEnabled by default
aclnnBatchMatMulPerforms matrix multiplication on tensors self and mat2.Enabled by defaultEnabled by default
aclnnBatchMatMulWeightNzComputes 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 defaultEnabled by default
aclnnBatchNormPerform 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
aclnnBatchNormElemtUses 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
aclnnBatchNormElemtBackwardPerforms 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 defaultEnabled by default
aclnnBatchNormBackwardPerforms 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
aclnnBatchNormGatherStatsWithCountsCollects 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 defaultEnabled by default
aclnnBatchNormReducePerforms the first step of regularization on data, which involves summing and squaring the data.Disabled by default. Can be enabled.-
aclnnBatchNormReduceBackwardComputes the gradient of the BatchNorm operation during backpropagation and performs reduction operations on some intermediate results to optimize the compute efficiency.Enabled by defaultEnabled by default
aclnnBidirectionLSTMComputes the LSTM network, receives the input sequence and initial state, and returns the output sequence and final state.--
aclnnBidirectionLSTMV2Computes the LSTM network, receives the input sequence and initial state, and returns the output sequence and final state.--
aclnnBinaryCrossEntropyComputes the binary cross entropy (BCE) of self and target.Enabled by defaultEnabled by default
aclnnBinaryCrossEntropyBackwardComputes the gradient value of backpropagation of the binary cross entropy.Enabled by defaultEnabled by default
aclnnBinaryCrossEntropyWithLogitsComputes the BCELoss between the input logits and the target.Enabled by defaultEnabled by default
aclnnBinaryCrossEntropyWithLogitsBackwardComputes logits computation of the input self, and performs backward propagation of BCELoss using the computed logits and label value target.Enabled by defaultEnabled by default
aclnnBinaryCrossEntropyWithLogitsTargetBackwardInput 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-
aclnnBroadcastGradientArgsComputes 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
aclnnBucketizeDetermines the interval index to which each element in the input tensor belongs based on the given boundary array.-Enabled by default
aclnnCelu&aclnnInplaceCeluaclnnCelu 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 defaultEnabled by default
aclnnChamferDistanceBackwardProvides 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.-
aclnnClaGateQuantIntegrates 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
aclnnClaGateBackwardaclnnClaGateQuant: backward operator, which does not perform gradient quantization.-Enabled by default
aclnnClippedSwigluPerforms a clipped Swish Gated Linear Unit (SwiGlu) activation function, and implements the SwiGlu computation of x.Enabled by defaultEnabled by default
aclnnClippedSwigluV2Activation 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 defaultEnabled by default
aclnnClippedSwigluGradBackward operator of aclnnClippedSwiglu, which is used to calculate the gradient gradXOut of input x.Enabled by defaultEnabled by default
aclnnConvolutionImplements convolution operations, supporting 1D, 2D, and 3D convolutions, as well as transposed convolution, dilated convolution, and grouped convolution.Enabled by defaultEnabled by default
aclnnConvolutionBackwardPerforms backpropagation of convolution.Disabled by default. Can be enabled.Enabled by default
aclnnConvDepthwise2dImplements the two-dimensional depthwise convolution operation (DepthwiseConv2D).Enabled by defaultEnabled by default
aclnnConvertWeightToINT4PackPreprocesses 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 defaultEnabled by default
aclnnConvTbcImplements one-dimensional temporal convolution (TBC).Enabled by defaultEnabled by default
aclnnConvTbcBackwardComputes the backpropagation of temporal convolution.Disabled by default. Can be enabled.Disabled by default. Can be enabled.
aclnnCrossEntropyLossComputes the cross-entropy loss of the input.Enabled by defaultEnabled by default
aclnnCrossEntropyLossGradPerforms backpropagation of aclnnCrossEntropyLoss.Enabled by defaultEnabled by default
aclnnCrossEntropySumExpAndIndexLogitCrossEntropy local computing fusion operator for the Vocab parallel (Tensor Parallel) scenario.-Enabled by default
aclnnCtcLossComputes the connectionist temporal classification loss.Enabled by defaultEnabled by default
aclnnCtcLossBackwardBackpropagation of the connection timing classification loss value.Enabled by defaultEnabled by default
aclnnDeepNormNormalizes 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 defaultEnabled by default
aclnnDeepNormGradBackpropagation 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.
aclnnDeformableConv2dImplements convolution operations, supporting 2D, deformable, and grouped convolutions.Enabled by defaultEnabled by default
aclnnDeformableConv2dBackwardImplements convolution inversion, including 2D convolution inversion, deformable convolution, and group convolution inversion.-Enabled by default
aclnnDequantBiasPerforms dequantization on input x, converting int32 data to FLOAT16 or BFLOAT16 for output.Enabled by defaultEnabled by default
aclnnDequantSituQuantAdd the dequant and quant operations before and after the Situ activation function to implement the DequantSituQuant computation of x.Enabled by default-
aclnnDequantSwigluQuantAdds dequantization and quantization operations before and after the Swish Gated Linear Unit (SwiGlu) activation function, performing DequantSwiGLUQuant computation on input x.Enabled by defaultEnabled by default
aclnnDequantSwigluQuantV2Adds dequantization and quantization operations before and after the Swish Gated Linear Unit (SwiGlu) activation function, performing DequantSwiGLUQuant computation on input x.Enabled by defaultEnabled by default
aclnnSwigluGroupExecutes SwiGLU activation to implement SwiGLU computation of x and outputs the activation result of the same data type as x.-Enabled by default
aclnnSwigluMxQuantAdd the DynamicMxQuant operation after the activation function of the Swish gated linear unit to implement the SwigluMxQuant computation of x.-Enabled by default
aclnnSituMxQuantThe Situ activation function is fused with dynamic MX quantization to calculate SituMxQuant of x.-Enabled by default
aclnnSwigluMxQuantWithDualAxisThe 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
aclnnSwigluBackwardMxQuantWithDualAxisThe 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
aclnnGroupedDynamicMxQuantPerforms dynamic float8 quantization on the input data based on the start value of the input group index.-Enabled by default
aclnnGroupedDynamicMxQuantV2Performs 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
aclnnGroupedDynamicMxQuantWithDualAxisPerforms FLOAT8 dynamic MX quantization on the input data along the last and penultimate two dimensions based on the input group index.-Enabled by default
aclnnDynamicDualLevelMxQuantSplits 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
aclnnGroupedDynamicBlockQuantQuantizes 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
aclnnGroupedDynamicBlockQuantV2Quantizes 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
aclnnDualLevelQuantMatmulWeightNzPerforms matrix multiplication for two-level quantization mxfp4.-Enabled by default
aclnnDynamicMxQuantMX 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
aclnnDynamicMxQuantV2MX 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
aclnnDynamicMxQuantV3MX 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
aclnnMxToBlockMxQuantConvert 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
aclnnDynamicMxQuantWithDualAxisPerforms 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
aclnnDynamicMxQuantWithDualAxisV2Performs 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
aclnnDynamicBlockMxQuantPerforms 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
aclnnDynamicBlockQuantDivides 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 defaultEnabled by default
aclnnDynamicBlockQuantV2Divides 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 defaultEnabled by default
aclnnDynamicQuantPerforms per-token symmetric dynamic quantization on input tensors.Enabled by defaultEnabled by default
aclnnDynamicQuantV2Performs per-token symmetric/asymmetric dynamic quantization on the input tensor.Enabled by defaultEnabled by default
aclnnDynamicQuantV3Performs dynamic quantization on the input tensor.-Enabled by default
aclnnDynamicQuantV4Performs dynamic quantization on the input tensor. The quantization result range can be set.-Enabled by default
aclnnEinsumPerforms 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 defaultEnabled by default
aclnnElu&aclnnInplaceEluApplies 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 defaultEnabled by default
aclnnEluBackwardPerforms backpropagation of the aclnnElu activation function and outputs the gradient of the forward input of the ELU activation function.Enabled by defaultEnabled by default
aclnnEmbeddingMaps 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 defaultEnabled by default
aclnnEmbeddingBagObtains 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 defaultEnabled by default
aclnnEmbeddingDenseBackwardPerforms backpropagation of aclnnEmbedding and accumulates rows of grad corresponding to identical indices entries into out.Disabled by default. Can be enabled.Enabled by default
aclnnExpandIntoJaggedPermuteExtends 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-
aclnnEmbeddingRenormReturns the corrected result of the input tensor for the specified indices based on the given maxNorm and normType.Enabled by defaultEnabled by default
aclnnErfinv&aclnnInplaceErfinverfinv 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 defaultEnabled by default
aclnnFakeQuantPerChannelAffineCachemaskPerforms 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 defaultEnabled by default
aclnnFakeQuantPerTensorAffineCachemaskPerforms 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 defaultEnabled by default
aclnnFastBatchNormBackwardPerforms 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-
aclnnFastGeluComputes the fast Gaussian Error Linear Unit activation function.Enabled by defaultEnabled by default
aclnnFastGeluBackwardPerforms backpropagation of FastGelu.Enabled by defaultEnabled by default
aclnnFastLayerNormPerforms normalization with a mean of 0 and a standard deviation of 1 on a specified layer.Enabled by default-
aclnnFatreluMulDivides 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-
aclnnFlatQuantPerforms two small matrix multiplications on the input matrix xEnabled by defaultEnabled by default
aclnnFlatQuantV2The fusion operator performs small matrix multiplication twice on the input matrix x at a time. The dstTypeMax parameter is supported.-Enabled by default
aclnnFlatQuantV3The fusion operator multiplies the input matrix x twice at a time. The dstTypeMax and groupListOptional parameters are supported.Enabled by defaultEnabled by default
aclnnFlipReverses the order of the specified dimension of an n-dimensional tensor. There is a formula for calculating each axis specified in dims.Enabled by defaultEnabled by default
aclnnForeachAbsPerforms element-wise absolute value operation on each tensor in the input tensor list.Enabled by defaultEnabled by default
aclnnForeachAcosPerforms element-wise inverse cosine operation on each tensor in the input tensor list.Enabled by defaultEnabled by default
aclnnForeachACosInplaceCalculates the inverse cosine of each tensor in the input tensor list element-by-element, and updates the result in place.-Enabled by default
aclnnForeachAddcdivListPerforms element-wise addition, multiplication, and division on multiple tensors. It computes the element-wise division of x2ix2_{i} by x3ix3_{i}, multiplies the result by scalars, and then adds the product to x1ix1_{i}.Enabled by defaultEnabled by default
aclnnForeachAddcdivScalarPerforms element-wise addition, multiplication, and division on multiple tensors. It computes the element-wise division of x2ix2_{i} by x3ix3_{i}, multiplies the result by scalar, and then adds the product to x1ix1_{i}.Enabled by defaultEnabled by default
aclnnForeachAddcdivScalarListPerforms element-wise addition, multiplication, and division on multiple tensors. It computes the element-wise division of x2ix2_{i} by x3ix3_{i}, multiplies the result by scalarsiscalars_{i}, and then adds the product to x1ix1_{i}.Enabled by defaultEnabled by default
aclnnForeachAddcdivScalarV2Performs element-wise addition, multiplication, and division on multiple tensors. It computes the element-wise division of x2ix2_{i} by x3ix3_{i}, multiplies the result by scalar, and then adds the product to x1ix1_{i}.Enabled by defaultEnabled by default
aclnnForeachAddcmulListPerforms 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 defaultEnabled by default
aclnnForeachAddcmulScalarPerforms 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 defaultEnabled by default
aclnnForeachAddcmulScalarListPerforms 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 defaultEnabled by default
aclnnForeachAddcmulScalarV2Perform 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 defaultEnabled by default
aclnnForeachAddListPerforms element-wise addition on the two tensor lists. The addition coefficient can be adjusted by the alpha parameter.Enabled by defaultEnabled by default
aclnnForeachAddListV2Performs element-wise addition on the two tensor lists. The addition coefficient can be adjusted by the alpha parameter.Enabled by defaultEnabled by default
aclnnForeachAddListInplaceComputes x1+alpha*x2 element-wise for two tensor lists and writes the result back to the first list in place.-Enabled by default
aclnnForeachAddScalarAdds the specified tensor value to each tensor in the tensor list.Enabled by defaultEnabled by default
aclnnForeachAddScalarListPerforms element-wise addition on the input tensor list and input scalar list.Enabled by defaultEnabled by default
aclnnForeachAddScalarV2Adds the specified scalar value to each tensor in the tensor list.Enabled by defaultEnabled by default
aclnnForeachAsinPerforms element-wise arcsine operation.Enabled by defaultEnabled by default
aclnnForeachAtanPerforms element-wise arctangent operation.Enabled by defaultEnabled by default
aclnnForeachCopyCopies the content of two tensor lists.Enabled by defaultEnabled by default
aclnnForeachCosPerforms element-wise cosine operation.Enabled by defaultEnabled by default
aclnnForeachCoshPerforms element-wise hyperbolic cosine operation.Enabled by defaultEnabled by default
aclnnForeachDivListPerforms element-wise division on the tensor lists x1 and x2.Enabled by defaultEnabled by default
aclnnForeachDivListInplaceDivides two tensor lists element by element and writes the result back to the first list in place.-Enabled by default
aclnnForeachDivScalarDivides each tensor in tensor list x by the tensor scalar.Enabled by defaultEnabled by default
aclnnForeachDivScalarListPerforms element-wise division on the tensor list x and the scalar list scalars.Enabled by defaultEnabled by default
aclnnForeachDivScalarV2Computes the tensor list x divided by a scalar.Enabled by defaultEnabled by default
aclnnForeachErfPerforms element-wise error function (also known as Gaussian error function) operation.Enabled by defaultEnabled by default
aclnnForeachErfcPerforms element-wise computation of the complementary error function, defined as the integral from x to infinity.Enabled by defaultEnabled by default
aclnnForeachExpPerforms element-wise exponential operation on the input tensor list.Enabled by defaultEnabled by default
aclnnForeachExpm1Performs exponential operation on each tensor in the input tensor list and subtracts 1 from the result.Enabled by defaultEnabled by default
aclnnForeachLerpListPerforms element-wise linear interpolation on corresponding tensors in two tensor lists using weight as the interpolation coefficients.Enabled by defaultEnabled by default
aclnnForeachLerpScalarPerforms interpolation on the corresponding elements of two tensor lists, where the scalar weight is the interpolation coefficient.Enabled by defaultEnabled by default
aclnnForeachLogPerforms element-wise natural logarithm operation (ln(x)) on the tensor list.Enabled by defaultEnabled by default
aclnnForeachLogInplaceCalculates the natural logarithm of each tensor in the input tensor list element by element, and updates the result in place.-Enabled by default
aclnnForeachLog1pAdds 1 to each element in the input tensor list, then performs the e-based logarithmic function on the elements.Enabled by defaultEnabled by default
aclnnForeachLog2Performs the 2-based logarithmic function on each element in the input tensor list.Enabled by defaultEnabled by default
aclnnForeachLog10Performs the 10-based logarithmic function on each element in the input tensor list.Enabled by defaultEnabled by default
aclnnForeachMaximumListComputes the element-wise maximum of each pair of corresponding tensors in tensor lists x1 and x2.Enabled by defaultEnabled by default
aclnnForeachMaximumScalarComputes the element-wise maximum of each tensor in the input tensor list with the given tensor scalar.Enabled by default-
aclnnForeachMaximumScalarListComputes the element-wise maximum of each tensor in tensor list x and the corresponding scalar in scalar list scalars.Enabled by defaultEnabled by default
aclnnForeachMaximumScalarV2Computes the element-wise maximum of each tensor in the input tensor list with the given scalar scalar.Enabled by defaultEnabled by default
aclnnForeachMinimumListComputes the element-wise minimum of each pair of corresponding tensors in tensor lists x1 and x2.Enabled by defaultEnabled by default
aclnnForeachMinimumScalarComputes the element-wise minimum of each tensor in tensor list x with the given tensor scalar.Enabled by default-
aclnnForeachMinimumScalarListComputes the element-wise minimum of each tensor in tensor list x and the corresponding scalar in scalar list scalars.Enabled by defaultEnabled by default
aclnnForeachMinimumScalarV2Computes the element-wise minimum of each tensor in tensor list x with the given scalar scalar.Enabled by defaultEnabled by default
aclnnForeachMulListPerforms element-wise multiplication on corresponding tensors in two input tensor lists.Enabled by defaultEnabled by default
aclnnForeachMulListInplaceMultiplies two tensor lists element by element and writes the result back to the first list in place.-Enabled by default
aclnnForeachMulScalarPerforms element-wise multiplication between each tensor in the input tensor list and the given tensor scalar.Enabled by defaultEnabled by default
aclnnForeachMulScalarListPerforms element-wise multiplication of each tensor in the input tensor list by the corresponding scalar in the scalar list.Enabled by defaultEnabled by default
aclnnForeachMulScalarV2Multiplies each tensor in the input tensor list with a scalar.Enabled by defaultEnabled by default
aclnnForeachMulScalarInplaceMultiplies each tensor in the input tensor list element-by-element by the same scalar, and updates the result in place.-Enabled by default
aclnnForeachNegComputes the negative of each tensor in the input tensor list.Enabled by defaultEnabled by default
aclnnForeachNonFiniteCheckAndUnscaleTraverse 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 defaultEnabled by default
aclnnForeachNormComputes the norm of each tensor in the input tensor list.Enabled by defaultEnabled by default
aclnnForeachPowListPerforms a exponentiation operation on each tensor in the input tensor list (the base is x1 and the exponent is x2).Enabled by defaultEnabled by default
aclnnForeachPowScalarPerforms an exponential operation on each tensor in the input tensor list x. The exponent is the tensor scale.Enabled by default-
aclnnForeachPowScalarV2Performs an exponential operation on each tensor in the input tensor list x. The exponent is a scalar exponent.Enabled by defaultEnabled by default
aclnnForeachPowScalarAndTensorDescription: Raises the input scalar scalar to the power of each tensor in the input tensor list x.Enabled by defaultEnabled by default
aclnnForeachPowScalarListPerforms 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 defaultEnabled by default
aclnnForeachReciprocalCompute the reciprocal of each tensor in the input tensor list.Enabled by defaultEnabled by default
aclnnForeachRoundOffNumberRounds off each tensor in the input tensor list with a specified precision. The rounding mode can be specified using roundMode.Enabled by defaultDefault deterministic computing
aclnnForeachRoundOffNumberV2Rounds off each tensor in the input tensor list with a specified precision. The rounding mode can be specified using roundMode.Enabled by defaultDefault deterministic computing
aclnnForeachSigmoidPerforms the Sigmoid function operation on each tensor in the input tensor list.Enabled by defaultEnabled by default
aclnnForeachSignComputes the symbolic value of each tensor in the input tensor list.Enabled by defaultEnabled by default
aclnnForeachSinPerforms the sine function operation on each tensor in the input tensor list.Enabled by defaultEnabled by default
aclnnForeachSinhPerforms the hyperbolic sine function operation on each tensor in the input tensor list.Enabled by defaultEnabled by default
aclnnForeachSqrtPerforms the square root operation on each tensor in the input tensor list.Enabled by defaultEnabled by default
aclnnForeachSubListPerforms element-wise subtraction on two input tensor lists and adjusts the subtraction coefficient using the alpha parameter.Enabled by default-
aclnnForeachSubListV2Subtracts elements in two tensor lists one by one and adjusts the subtraction coefficient using the alpha parameter.Enabled by defaultEnabled by default
aclnnForeachSubListInplaceComputes x1-alpha*x2 element-wise for two tensor lists and writes the result back to the first list in place.-Enabled by default
aclnnForeachSubScalarPerforms element-wise subtraction between each tensor in the input tensor list and the given tensor scalar.Enabled by default-
aclnnForeachSubScalarListPerforms element-wise subtraction between each tensor in the input tensor list and each scalar in scalar list scalars.Enabled by defaultEnabled by default
aclnnForeachSubScalarV2Performs element-wise subtraction between each tensor in the input tensor list and the given scalar scalar.Enabled by defaultEnabled by default
aclnnForeachSubScalarInplaceSubtracts the same scalar element by element from each tensor in the input tensor list, and updates the result in place.-Enabled by default
aclnnForeachTanPerforms the tangent function operation on each tensor in the input tensor list.Enabled by defaultEnabled by default
aclnnForeachTanhPerforms the hyperbolic tangent function operation on each tensor in the input tensor list.Enabled by defaultEnabled by default
aclnnForeachZeroInplaceUpdates the input tensor list in place, and sets each tensor to 0.Enabled by defaultEnabled by default
aclnnFusedAdamImplements 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
aclnnFusedAdamwImplement 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 defaultEnabled by default
aclnnFusedCrossEntropyLossWithMaxSumPart 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-
aclnnFusedLinearOnlineMaxSumThe 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-
aclnnFusedLinearCrossEntropyLossGradSolves 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-
aclnnFusedMatmulFuses matrix multiplication and general vector computation.-Enabled by default
aclnnFusedMatmulV2Fuses matrix multiplication and general vector computation.-Enabled by default
aclnnFusedQuantMatmulQuantization matrix multiplication is fused with general vector computation.Enabled by default-
aclnnFusedQuantMatmulWeightNzFusion of quantization matrix multiplication and general vector computation, input of WeightNz.Enabled by default-
aclnnFusedSgdImplement 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 defaultEnabled by default
aclnnGatherGathers data of a specific dimension dim in the input tensor.Enabled by defaultEnabled by default
aclnnGatherNdFor 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 defaultEnabled by default
aclnnGatherV2Extracts 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 defaultEnabled by default
aclnnGatherV3Extracts 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 defaultEnabled by default
aclnnGeGluUses the Gaussian Error Linear Unit (GELU) activation function.Enabled by defaultEnabled by default
aclnnGeGluBackwardPerforms backpropagation of aclnnGeGlu.Enabled by defaultEnabled by default
aclnnGeGluV3Uses 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 defaultEnabled by default
aclnnGeGluV3BackwardPerforms backpropagation of aclnnGeGluV3.Enabled by defaultEnabled by default
aclnnGeluUses the Gaussian Error Linear Unit (GELU) activation function.Enabled by defaultEnabled by default
aclnnGeluBackwardPerforms backpropagation of aclnnGelu.Enabled by defaultEnabled by default
aclnnGeluBackwardV2Performs backpropagation of aclnnGeluV2.Enabled by defaultEnabled by default
aclnnGeluMulDivides 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 defaultEnabled by default
aclnnGeluQuantFuses GeluV2 with DynamicQuant/AscendQuantV2, performs gelu activation on the input data self, quantizes the activation result, and outputs the quantized result.-Enabled by default
aclnnGeluV2Uses the Gaussian Error Linear Unit (GELU) activation function.Enabled by defaultEnabled by default
aclnnGemmComputes the product of α multiplied by A and B, and then sum up the product of alpha multiplied by β and input C.Enabled by defaultEnabled by default
aclnnGemmaRmsNormThe 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 defaultEnabled by default
aclnnGluThe 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 defaultEnabled by default
aclnnGluBackwardPerforms backpropagation of aclnnGlu.Enabled by defaultEnabled by default
aclnnHardshrinkForcibly shrinks elements in the range of λ by element.Enabled by defaultEnabled by default
aclnnGroupNormComputes the group normalization result out, mean value meanOut, and reciprocal of the standard deviation rstdOut of the input self.Enabled by defaultEnabled by default
aclnnGroupNormBackwardPerforms 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
aclnnGroupNormSiluCalculate 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 defaultEnabled by default
aclnnGroupNormSiluV2Computes the group normalization result out, meanOut, reciprocal rstdOut of the standard deviation, and silu output of the input self.Enabled by defaultEnabled by default
aclnnGroupNormSiluQuantComputes 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-
aclnnGroupNormSwishComputes the group normalization result out, mean value meanOut, reciprocal rstdOut of the standard deviation, and swish output of the input x.Enabled by defaultEnabled by default
aclnnGroupNormSwishGradPerforms backpropagation of aclnnGroupNormSwish.Disabled by default. Can be enabled.Enabled by default
aclnnGroupQuantPerforms group-wise quantization on the input x.Enabled by defaultEnabled by default
aclnnGRUCalculates 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-
aclnnGRUBackwardGRU backpropagation, which is used to calculate the gradient of the forward input, weight params, and initial state hx.Enabled by default-
aclnnHardshrinkBackwardCalculates the backpropagation gradient gradInput for aclnnHardshrink.Enabled by defaultEnabled by default
aclnnHardsigmoid&aclnnInplaceHardsigmoidActivates 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-
aclnnHardsigmoidBackwardPerforms backpropagation of aclnnHardsigmoid.Enabled by defaultEnabled by default
aclnnHardswishBackwardPerforms backpropagation of aclnnHardswish and computes the gradient of tensor self.Enabled by defaultEnabled by default
aclnnHardswishBackwardV2Performs backpropagation of aclnnHardswish and computes the gradient of tensor self.Enabled by defaultEnabled by default
aclnnHardswish&aclnnInplaceHardswishActivation 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 defaultEnabled by default
aclnnHardtanhBackwardPerforms backpropagation of activation function aclnnHardtanh.Enabled by defaultEnabled by default
aclnnHeavisideComputes the step function Heaviside of each element in input as the activation function of the model.Enabled by defaultEnabled by default
aclnnIndexObtains the coordinate data of the input x based on indices.Enabled by defaultEnabled by default
aclnnIndexAddAdds 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.
aclnnIndexAddV2Adds 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&aclnnInplaceIndexCopyTakes 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 defaultDisabled by default. Can be enabled.
aclnnIndexFill&aclnnInplaceIndexFillReplaces the value at the position specified by index with value along the specified axis dim of the input self.Enabled by defaultEnabled by default
aclnnIndexFillTensor&aclnnInplaceIndexFillTensorReplaces the value at the position specified by index with value along the specified axis dim of the input self.Enabled by defaultEnabled by default
aclnnIndexPutImplReplaces 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.
aclnnInplacePutTakes 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 defaultDisabled by default. Can be enabled.
aclnnInplaceScatterUpdateUpdates 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 defaultDisabled by default. Can be enabled.
aclnnIndexSelectExtracts 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 defaultEnabled by default
aclnnInplaceAddRmsNormThe 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 defaultEnabled by default
aclnnInplaceMaskedScatterCopies 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 defaultEnabled by default
aclnnInplaceQuantScatterQuantizes 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 defaultEnabled by default
aclnnInplaceQuantScatterV2The 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
aclnnInstanceNormPerforms instance normalization.--
aclnnInverseComputes the inverse matrix of the input square matrix.Enabled by defaultEnabled by default
aclnnKlDivBackwardPerforms backpropagation on the result of the aclnnKlDiv API.Enabled by defaultEnabled by default
aclnnKlDivTargetBackwardReversely computes the target of the aclnnKlDiv API result.Enabled by defaultEnabled by default
aclnnKthvalueReturns the k-th minimum value and index of the input tensor in the specified dimension.Enabled by defaultEnabled by default
aclnnL1LossComputes the mean absolute error (MAE) between each element of input self and target.Enabled by defaultEnabled by default
aclnnL1LossBackwardPerforms backpropagation of aclnnL1Loss. reduction specifies the computation method of the loss function.Enabled by defaultEnabled by default
aclnnLayerNorm&aclnnLayerNormWithImplModePerforms normalization with a mean of 0 and a standard deviation of 1 on a specified layer.Enabled by defaultEnabled by default
aclnnLayerNormBackwardBackpropagation 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 defaultEnabled by default
aclnnLayerNormQuantThe operator fuses the LayerNorm normalization output with the downstream quantization operator to reduce the move-in and move-out operations.Enabled by defaultEnabled by default
aclnnLeakyRelu&aclnnInplaceLeakyReluPerforms 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 defaultEnabled by default
aclnnLeakyReluBackwardPerforms backpropagation of the LeakyRelu activation function.Enabled by defaultEnabled by default
aclnnLinalgVectorNormComputes the vector norm of the input tensor.Disabled by default. Can be enabled.Enabled by default
aclnnLogitThis operator is a mathematical operation of converting probability to log-odds. It is often used for inverse transformation of probability values.Enabled by defaultEnabled by default
aclnnLogitGradPerforms backpropagation of aclnnLogit.Enabled by defaultEnabled by default
aclnnLogSigmoidPerforms element-wise LogSigmoid operation on the input tensor.Enabled by defaultEnabled by default
aclnnLogSigmoidBackwardPerforms 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 defaultEnabled by default
aclnnLogSigmoidForwardPerforms element-wise LogSigmoid operation on the input tensor.Enabled by defaultEnabled by default
aclnnLogSoftmaxComputes the logsoftmax value of the input tensor.Enabled by defaultEnabled by default
aclnnLogSoftmaxBackwardPerforms backpropagation of aclnnLogSoftmax.Enabled by defaultEnabled by default
aclnnLSTMCalculates the LSTM.Enabled by defaultEnabled by default
aclnnLstmBackwardPerforms LSTM reverse computation.Enabled by defaultEnabled by default
aclnnMaskedSoftmaxWithRelPosBiasReplaces the part that uses window attention to compute softmax in swinTransformer.Enabled by default-
aclnnMatmulPerforms matrix multiplication on the one-to-six-dimensional tensor self and the tensor mat2.-Enabled by default
aclnnMatmulWeightNzComputes the matrix multiplication of tensor self and tensor mat2. mat2 supports only the Ascend affinity data layout format.Enabled by defaultEnabled by default
aclnnMatmulCompressDuring 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.--
aclnnMatmulCompressDequantDuring 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.--
aclnnMatmulEmuSplitWeightThe 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 defaultEnabled by default
aclnnMaxPoolPerforms max pooling on the three-dimensional or four-dimensional input tensor.Enabled by defaultEnabled by default
aclnnMaxPool2dWithIndicesProvides two-dimensional (H, W) max pooling for the input channels of the input signal, and outputs the pooled value out and indices.Enabled by defaultEnabled by default
aclnnMaxPool2dWithIndicesBackwardBackpropagation of forward max pooling aclnnMaxPool2dWithIndices.Disabled by default. Can be enabled.Disabled by default. Can be enabled.
aclnnMaxPool2dWithMaskProvides 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-
aclnnMaxPool2dWithMaskBackwardBackpropagation of forward max pooling aclnnMaxPool2dWithMask.Disabled by default. Can be enabled.Enabled by default
aclnnMaxPool3dWithArgmaxApplies three-dimensional max pooling over the input channels of an input signal, and outputs the value out and indices after pooling.Enabled by defaultEnabled by default
aclnnMaxPool3dWithArgmaxBackwardBackpropagation 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.
aclnnMaxUnpool2dIn 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 defaultEnabled by default
aclnnMaxUnpool2dBackwardPerforms backpropagation of the MaxPool2d inverse operation aclnnMaxUnpool2d, writing element values of gradOutput in out based on indices.Enabled by defaultEnabled by default
aclnnMaxUnpool3dIn 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 defaultEnabled by default
aclnnMaxUnpool3dBackwardPerforms backpropagation of the MaxPool3d inverse operation aclnnMaxUnpool3d, writing element values of gradOutput in out based on indices.Enabled by defaultEnabled by default
aclnnMedianReturns the median of all elements.Enabled by defaultEnabled by default
aclnnMedianDimReturns 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 defaultEnabled by default
aclnnMmPerforms matrix multiplication on the two-dimensional tensors self and mat2.Enabled by defaultEnabled by default
aclnnMish&aclnnInplaceMishDefines a self-regularized non-monotonic neural activation function.Enabled by defaultEnabled by default
aclnnMishBackwardPerforms backpropagation of aclnnMish.Enabled by defaultEnabled by default
aclnnModulateImplements adaptive scaling and shift of features.Enabled by defaultEnabled by default
aclnnModulateBackwardComputes the parameters in the backpropagation of ModulateBackward and updates the gradients.Enabled by default-
aclnnMseLossComputes the mean squared error between each element in input x and target y.Enabled by defaultEnabled by default
aclnnMseLossBackwardPerforms backpropagation of mean squared error function aclnnMseLoss.Enabled by defaultEnabled by default
aclnnMseLossOutComputes the mean squared error between each element in input x and target y.Enabled by defaultEnabled by default
aclnnMultilabelMarginLossCalculate the interval loss of multi-label classification.Defaults to a non-deterministic implementation. Enabling deterministic computing is not supported.-
aclnnMultiScaleDeformableAttnFunctionTraverses different sampling points of feature maps with different sizes by specifying parameters.Enabled by defaultDisabled by default. Can be enabled.
aclnnMultiScaleDeformableAttentionGradThe 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.
aclnnMvComputes the product of matrix input and vector vec.Disabled by default. Can be enabled.Enabled by default
aclnnNanMedianReturns the median of all elements after NAN is ignored.Enabled by defaultEnabled by default
aclnnNanMedianDimReturns the median and position of values in the specified dimension of a tensor after NAN is ignored.Enabled by defaultEnabled by default
aclnnNormReturns the matrix norm or vector norm of a given tensor.Disabled by default. Can be enabled.Enabled by default
aclnnNLLLossComputes the negative log-likelihood loss.Disabled by default. Can be enabled.Enabled by default
aclnnNLLLoss2dComputes the negative log-likelihood loss.Disabled by default. Can be enabled.Enabled by default
aclnnNLLLoss2dBackwardPerforms backpropagation of the negative log-likelihood loss.Enabled by defaultEnabled by default
aclnnNLLLossBackwardPerforms backpropagation of the negative log-likelihood loss function.Enabled by defaultEnabled by default
aclnnNonzeroFinds 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 defaultEnabled by default
aclnnNonzeroV2Finds 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 defaultEnabled by default
aclnnPreluPerforms 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 defaultEnabled by default
aclnnPreluBackwardCompletes the inverse function of aclnnPrelu.Enabled by defaultEnabled by default
aclnnQuantConvolutionPerforms two-dimensional and three-dimensional convolution for per-channel quantization.Enabled by defaultEnabled by default
aclnnQuantConvolutionWeightNzPerforms 3D convolution computation for per-channel quantization. The weight supports only the FRACTAL_Z_3D format.Enabled by defaultEnabled by default
aclnnQuantizeQuantizes the input tensor.Enabled by defaultEnabled by default
aclnnQuantizedBatchNormPerforms 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 defaultEnabled by default
aclnnQuantMatmulV5Performs matrix multiplication for quantization.Enabled by defaultEnabled by default
aclnnQuantBatchMatmulInplaceAddImplements quantization matrix multiplication and in-place accumulation addition. The basic function is the combination of matrix multiplication and addition.-Enabled by default
aclnnQuantMatmulReduceSumWeightNzPerforms quantized group matrix computation, adds the matrix computation results of all groups, and outputs the result.Disabled by default. Can be enabled.-
aclnnQuantMatmulWeightNzPerforms matrix multiplication for quantization.Enabled by defaultEnabled by default
aclnnQuantMatmulActivationQuantFor matrix multiplication, activation, and dynamic quantization computation with fused quantization, the weight supports only the ND format.-Enabled by default
aclnnQuantMatmulActivationQuantWeightNzMatrix multiplication, activation, and dynamic quantization. The weight supports only the NZ format.-Enabled by default
aclnnQuantMatmulDequantQuantizes the input x, performs matrix multiplication, and dequantizes the result.--
aclnnQuantMaxCalculates the input quantization and obtains the maximum value of the input absolute value.-Enabled by default
aclnnGroupedQuantMaxQuantizes the input group and obtains the maximum absolute value of the input group.-Enabled by default
aclnnRelu&aclnnInplaceReluPerforms 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 defaultEnabled by default
aclnnRenorm&aclnnInplaceRenormReturns 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 defaultEnabled by default
aclnnRepeatInterleaveDescription: Repeats the tensor for the number of times specified by repeats after the tensor self is flattened.Enabled by defaultEnabled by default
aclnnRepeatInterleaveGradPerforms backpropagation for the repeatInterleave operator, and performs ReduceSum on the axis dimension of the yGrad tensor based on repeats.-Enabled by default
aclnnRepeatInterleaveIntRepeats each element for the number of times specified by repeats after the tensor self is flattened.Enabled by defaultEnabled by default
aclnnRepeatInterleaveIntWithDimRepeats each element in a tensor for the corresponding number of times based on the dimension.Enabled by defaultEnabled by default
aclnnRepeatInterleaveTensorFor the ith element of Tensor repeats, repeat i for [i] times.Enabled by defaultEnabled by default
aclnnRepeatInterleaveWithDimRepeats each element in the tensor for the corresponding number of times based on the dim dimension.Enabled by defaultEnabled by default
aclnnRmsNormThe 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 defaultEnabled by default
aclnnRmsNormGradPerforms 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
aclnnRmsNormGradQuantRmsNormGrad 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
aclnnRmsNormQuantFuses the Add operator before aclnnRmsNorm and the Quantize operator after aclnnRmsNorm to reduce move-in and move-out operations.Enabled by defaultEnabled by default
aclnnRmsNormQuantV3aclnnRmsNormQuantV3 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
aclnnRotateQuantRotates 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 defaultEnabled by default
aclnnRReluWithNoise&aclnnInplaceRReluWithNoisePerforms 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 defaultEnabled by default
aclnnScatter&aclnnInplaceScatterReplaces, 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 defaultDisabled by default. Can be enabled.
aclnnScatterAddAdds 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 defaultDisabled by default. Can be enabled.
aclnnScatterDivImplement the function compatible with tf.scatter_div and divide updates by index to var.-Enabled by default
aclnnScatterNdCopies the data from data to out, and updates the data in out based on updates at the specified indices.Enabled by defaultDisabled by default. Can be enabled.
aclnnScatterNdUpdateUpdates the values in varRef in sequence by referring to the values in the updates tensor based on the specified indices.Enabled by defaultDisabled by default. Can be enabled.
aclnnScatterListApplies 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.
aclnnScatterMaxCompatible with tf.scatter_max. The maximum value of var and updates is obtained by index.-Enabled by default
aclnnScatterMinCompatible with tf.scatter_min. The minimum value of var and updates is obtained by index.-Enabled by default
aclnnScatterMulImplement the function compatible with tf.scatter_mul and multiply updates by index to var.-Enabled by default
aclnnScatterReduce&aclnnInplaceScatterReducePerforms 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&aclnnInplaceScatterValueWrites values from scalar value into tensor self one by one according to the specified axis, direction, and corresponding position relationship.Enabled by defaultDisabled by default. Can be enabled.
aclnnScaledMaskedSoftmaxScales and masks the input x, and then performs the softmax operation to obtain the output.Enabled by default-
aclnnScaledMaskedSoftmaxBackwardPerforms backpropagation of softmax, and scales and masks the result.Disabled by default. Can be enabled.-
aclnnSelu&aclnnInplaceSeluComputes the SELU (Scaled Exponential Linear Unit) activation function element by element for the input tensor.Enabled by defaultEnabled by default
aclnnSeluBackwardPerforms backpropagation of aclnnSelu.Enabled by default-
aclnnShrinkPerforms 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 defaultEnabled by default
aclnnSigmoid&aclnnInplaceSigmoidPerforms the sigmoid operation on the input tensor.Enabled by defaultEnabled by default
aclnnSigmoidBackwardPerforms backpropagation of sigmoid. The sigmoid gradient input is computed based on the sigmoid backpropagation gradient and forward output.Enabled by defaultEnabled by default
aclnnSiluThis operator is also called the Swish function.Enabled by defaultEnabled by default
aclnnSiluBackwardPerforms backpropagation of aclnnSilu, and computes the silu gradient input based on the silu backpropagation gradient and forward output.Enabled by defaultEnabled by default
aclnnSituGluActivation 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 defaultEnabled by default
aclnnSituGluGradBackward 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 defaultEnabled by default
aclnnSmoothL1LossComputes the SmoothL1 loss function.Enabled by defaultEnabled by default
aclnnSmoothL1LossBackwardPerforms backpropagation of aclnnSmoothL1Loss API.Enabled by defaultEnabled by default
aclnnSoftMarginLossComputes the binary logic loss function of inputs self and target.Enabled by defaultEnabled by default
aclnnSoftMarginLossBackwardPerforms backpropagation of the aclnnSoftMarginLoss binary logic loss function.Enabled by default-
aclnnSoftmaxComputes the softmax value of the input tensor.Enabled by defaultEnabled by default
aclnnSoftmaxBackwardPerforms backpropagation of softmax.Enabled by defaultEnabled by default
aclnnSoftmaxCrossEntropyWithLogitsComputes the softmax and cross-entropy loss and provides the backward gradient for the input logits.Enabled by defaultEnabled by default
aclnnSoftplusPerforms activation function softplus.Enabled by defaultEnabled by default
aclnnSoftplusBackwardPerforms backpropagation of aclnnSoftplus.Enabled by defaultEnabled by default
aclnnSoftshrinkForcibly shrinks elements in the range of λ by element.Enabled by defaultEnabled by default
aclnnSoftshrinkBackwardPerforms backpropagation of the Softshrink function.Enabled by default-
aclnnSparse4to2QuantMatmulWeightNzImplements matrix multiplication for sparse 4:2 quantization.Enabled by default-
aclnnSquaredReluThe 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 defaultEnabled by default
aclnnSwiGluPerforms a Swish Gated Linear Unit (SwiGlu) activation function, and implements the SwiGlu computation of x.Enabled by defaultEnabled by default
aclnnSwiGluGradPerforms backpropagation of aclnnSwiGlu and computes the SwiGlu reverse gradient of x.Enabled by defaultEnabled by default
aclnnSwigluGroupQuantGrouped low-bit quantization is performed after the activation function of the Swish gated linear unit, and FP8 quantization output is supported.-Enabled by default
aclnnSwigluGroupQuantV2Based on the original uniaxial quantization API, the alpha and bias can be configured, and the original value output can be activated.-Enabled by default
aclnnSwigluGroupQuantWithDualAxisFuses ClippedSwiGLU with MX quantization in two directions, and supports optional grouping, weight, and activation original value output.-Enabled by default
aclnnSwigluGroupGradCalculates 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
aclnnSwigluGroupQuantGradComputes the inverse gradient for group quantization of the SwiGLU activation function.-Enabled by default
aclnnSwigluBackwardGroupQuantWithDualAxisFuses 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
aclnnSwiGluQuantAdds quantization after the SwiGlu activation function to implement SwiGluQuant computation of the input x.Enabled by defaultEnabled by default
aclnnSwiGluQuantV2Adds quantization after the SwiGlu activation function to implement SwiGluQuant computation of the input x. The int8 or int4 quantization output is supported.Enabled by defaultEnabled by default
aclnnSwishPerforms the Swish activation function to the input tensor element-wise and outputs the result tensor.Enabled by defaultEnabled by default
aclnnSwishBackwardPerforms backpropagation of aclnnSwish. It is used to compute the gradient of the Swish activation function.Enabled by defaultEnabled by default
aclnnSyncBatchNormGatherStatsCollects the mean value and variance of data on all devices and updates the global mean value and variance.Enabled by defaultEnabled by default
aclnnTakeTakes 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 defaultEnabled by default
aclnnTfScatterAddCompatible 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 defaultDisabled by default. Can be enabled.
aclnnThnnFusedLstmCellPerforms the subsequent computation after matrix multiplication in the forward computation of the LSTM unit.Enabled by default-
aclnnThnnFusedLstmCellBackwardCompletes the LSTM reverse computation of a single time step.Enabled by default-
aclnnThreshold&aclnnInplaceThresholdSets the threshold for input x. If elements in x are greater than threshold, the elements are returned. Otherwise, value is returned.Enabled by defaultEnabled by default
aclnnThresholdBackwardPerforms backpropagation of aclnnThreshold.Enabled by defaultEnabled by default
aclnnTransSparse4to2ParaPerform compression preprocessing on the structured sparse weight matrix, and output the compressed sparse matrix and the corresponding index matrix.Enabled by default-
aclnnTransposeBatchMatMulPerforms matrix multiplication on tensors x1 and x2.Enabled by defaultEnabled by default
aclnnTransposeBatchMatMulWeightNzPerforms 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 defaultEnabled by default
aclnnTransposeQuantBatchMatMulComputes the matrix multiplication of tensor x1 and tensor x2.-Enabled by default
aclnnTransposeQuantBatchMatMulWeightNzComputes 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
aclnnTransQuantParamConverts the input scale data from FLOAT32 type to UINT64 type required by the hardware, and stores the data in quantParam.Enabled by defaultEnabled by default
aclnnTransQuantParamV2Converts the data type of the quantization parameter scale from FLOAT32 to UINT64 or INT64 required by the hardware.Enabled by defaultEnabled by default
aclnnTransQuantParamV3Converts the data type of the quantization parameter scale from Float32 to UINT64 or INT64 required by the hardware.Enabled by defaultEnabled by default
aclnnTopKTopPSamplePerforms 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-
aclnnTopKTopPSampleV2topK-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 defaultEnabled by default
aclnnTurboQuantThe 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-
aclnnUniqueReturns the unique elements of the input tensor.Enabled by defaultEnabled by default
aclnnUnique2Removes 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 defaultEnabled by default
aclnnUniqueConsecutiveEliminates 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 defaultEnabled by default
aclnnUniqueDimRemoves duplicates from the input tensor self along a given dim.Enabled by defaultEnabled by default
aclnnWeightQuantBatchMatmulNzPerforms matrix multiplication in the fake-quantization scenario with the input. Only the NZ scenario is supported.-Enabled by default
aclnnWeightQuantBatchMatmulV2Performs input matrix multiplication in a fake-quantization scenario and implements output quantization.Disabled by default. Can be enabled.Enabled by default
aclnnWeightQuantBatchMatmulV3Performs input matrix multiplication in a fake-quantization scenario and implements output quantization.Disabled by default. Can be enabled.Enabled by default

Deprecated APIs

Deprecated APIDescription
aclnnWeightQuantBatchMatmulThis API will be deprecated in later versions. Use the latest APIs aclnnWeightQuantBatchMatmulV2 and aclnnWeightQuantBatchMatmulV3.
aclnnQuantMatmulThis API will be deprecated in later versions. Use the latest API aclnnQuantMatmulV5.
aclnnQuantMatmulV2This API will be deprecated in later versions. Use the latest API aclnnQuantMatmulV5.
aclnnQuantMatmulV3This API will be deprecated in later versions. Use the latest API aclnnQuantMatmulV5.
aclnnQuantMatmulV4This API will be deprecated in later versions. Use the latest API aclnnQuantMatmulV5.
aclnnBatchMatmulQuantThis API will be deprecated in later versions. Do not use this API.