‘ascendc’ Dialect

A special dialect to support Ascend C API

The AscendC dialect provides a number of operations that represent Ascend C library API for Huawei NPU.

Operations

ascendc.abs_l0 (ascendc::AbsL0Op)

Call AscendC::Abs function

Syntax:

operation ::= `ascendc.abs_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Abs is a vector unary operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL0OpInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.abs_l1 (ascendc::AbsL1Op)

Call AscendC::Abs function

Syntax:

operation ::= `ascendc.abs_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Abs is a vector unary operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.abs_l2 (ascendc::AbsL2Op)

Call AscendC::Abs function

Syntax:

operation ::= `ascendc.abs_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Abs is a vector unary operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL2OpInterface, UnaryOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src

any type

calCount

any type

ascendc.acos (ascendc::AcosOp)

Call AscendC::Acos function

Syntax:

operation ::= `ascendc.acos` operands attr-dict `:` qualified(type(operands))

AscendC::Acos is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.acosh (ascendc::AcoshOp)

Call AscendC::Acosh function

Syntax:

operation ::= `ascendc.acosh` operands attr-dict `:` qualified(type(operands))

AscendC::Acosh is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.add_deq_relu_l0 (ascendc::AddDeqReluL0Op)

Call AscendC::AddDeqRelu function

Syntax:

operation ::= `ascendc.add_deq_relu_l0` operands attr-dict `:` qualified(type(operands))

AscendC::AddDeqRelu is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.add_deq_relu_l1 (ascendc::AddDeqReluL1Op)

Call AscendC::AddDeqRelu function

Syntax:

operation ::= `ascendc.add_deq_relu_l1` operands attr-dict `:` qualified(type(operands))

AscendC::AddDeqRelu is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.add_deq_relu_l2 (ascendc::AddDeqReluL2Op)

Call AscendC::AddDeqRelu function

Syntax:

operation ::= `ascendc.add_deq_relu_l2` operands attr-dict `:` qualified(type(operands))

AscendC::AddDeqRelu is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.add_l0 (ascendc::AddL0Op)

Call AscendC::Add function

Syntax:

operation ::= `ascendc.add_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Add is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.add_l1 (ascendc::AddL1Op)

Call AscendC::Add function

Syntax:

operation ::= `ascendc.add_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Add is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.add_l2 (ascendc::AddL2Op)

Call AscendC::Add function

Syntax:

operation ::= `ascendc.add_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Add is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.add_l3 (ascendc::AddL3Op)

Call LocalTensor::operator+ method

Syntax:

operation ::= `ascendc.add_l3` operands attr-dict `:` qualified(type(operands))

LocalTensor::operator+ performs a vector binary operation (L3 API).

Interfaces: APIOpInterface, BinaryL3OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

ascendc.add_relu_cast_l0 (ascendc::AddReluCastL0Op)

Call AscendC::AddReluCast function

Syntax:

operation ::= `ascendc.add_relu_cast_l0` operands attr-dict `:` qualified(type(operands))

AscendC::AddReluCast is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.add_relu_cast_l1 (ascendc::AddReluCastL1Op)

Call AscendC::AddReluCast function

Syntax:

operation ::= `ascendc.add_relu_cast_l1` operands attr-dict `:` qualified(type(operands))

AscendC::AddReluCast is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.add_relu_cast_l2 (ascendc::AddReluCastL2Op)

Call AscendC::AddReluCast function

Syntax:

operation ::= `ascendc.add_relu_cast_l2` operands attr-dict `:` qualified(type(operands))

AscendC::AddReluCast is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.add_relu_l0 (ascendc::AddReluL0Op)

Call AscendC::AddRelu function

Syntax:

operation ::= `ascendc.add_relu_l0` operands attr-dict `:` qualified(type(operands))

AscendC::AddRelu is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.add_relu_l1 (ascendc::AddReluL1Op)

Call AscendC::AddRelu function

Syntax:

operation ::= `ascendc.add_relu_l1` operands attr-dict `:` qualified(type(operands))

AscendC::AddRelu is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.add_relu_l2 (ascendc::AddReluL2Op)

Call AscendC::AddRelu function

Syntax:

operation ::= `ascendc.add_relu_l2` operands attr-dict `:` qualified(type(operands))

AscendC::AddRelu is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.adds_l0 (ascendc::AddsL0Op)

Call AscendC::Adds function

Syntax:

operation ::= `ascendc.adds_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Adds is a vector-scalar operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL0OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.adds_l1 (ascendc::AddsL1Op)

Call AscendC::Adds function

Syntax:

operation ::= `ascendc.adds_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Adds is a vector-scalar operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.adds_l2 (ascendc::AddsL2Op)

Call AscendC::Adds function

Syntax:

operation ::= `ascendc.adds_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Adds is a vector-scalar operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL2OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

calCount

any type

ascendc.and_l0 (ascendc::AndL0Op)

Call AscendC::And function

Syntax:

operation ::= `ascendc.and_l0` operands attr-dict `:` qualified(type(operands))

AscendC::And is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.and_l1 (ascendc::AndL1Op)

Call AscendC::And function

Syntax:

operation ::= `ascendc.and_l1` operands attr-dict `:` qualified(type(operands))

AscendC::And is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.and_l2 (ascendc::AndL2Op)

Call AscendC::And function

Syntax:

operation ::= `ascendc.and_l2` operands attr-dict `:` qualified(type(operands))

AscendC::And is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.ascend_is_aic (ascendc::AscendIsAICOp)

Call AscendC::AscendIsAIC function

Syntax:

operation ::= `ascendc.ascend_is_aic` attr-dict `:` type($result)

Interfaces: APIOpInterface

Results:

Result

Description

result

any type

ascendc.ascend_is_aiv (ascendc::AscendIsAIVOp)

Call AscendC::AscendIsAIV function

Syntax:

operation ::= `ascendc.ascend_is_aiv` attr-dict `:` type($result)

Interfaces: APIOpInterface

Results:

Result

Description

result

any type

ascendc.asin (ascendc::AsinOp)

Call AscendC::Asin function

Syntax:

operation ::= `ascendc.asin` operands attr-dict `:` qualified(type(operands))

AscendC::Asin is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.asinh (ascendc::AsinhOp)

Call AscendC::Asinh function

Syntax:

operation ::= `ascendc.asinh` operands attr-dict `:` qualified(type(operands))

AscendC::Asinh is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.atan (ascendc::AtanOp)

Call AscendC::Atan function

Syntax:

operation ::= `ascendc.atan` operands attr-dict `:` qualified(type(operands))

AscendC::Atan is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.atanh (ascendc::AtanhOp)

Call AscendC::Atanh function

Syntax:

operation ::= `ascendc.atanh` operands attr-dict `:` qualified(type(operands))

AscendC::Atanh is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.axpy (ascendc::AxpyOp)

Call AscendC::Axpy function

Syntax:

operation ::= `ascendc.axpy` operands attr-dict `:` qualified(type(operands))

AscendC::Axpy is a math library operation.

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

scalar

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.axpy_l0 (ascendc::AxpyL0Op)

Call AscendC::Axpy function

Syntax:

operation ::= `ascendc.axpy_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Axpy is a vector-scalar operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL0OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.axpy_l1 (ascendc::AxpyL1Op)

Call AscendC::Axpy function

Syntax:

operation ::= `ascendc.axpy_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Axpy is a vector-scalar operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.axpy_l2 (ascendc::AxpyL2Op)

Call AscendC::Axpy function

Syntax:

operation ::= `ascendc.axpy_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Axpy is a vector-scalar operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL2OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

calCount

any type

ascendc.bilinearInterpolation_l0 (ascendc::BilinearInterpolationL0Op)

Call AscendC::BilinearInterpolation function

Syntax:

operation ::= `ascendc.bilinearInterpolation_l0` operands attr-dict `:` qualified(type(operands))

AscendC::BilinearInterpolation is a vector binary operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src0

Local tensor from UB

src0Offset

Local tensor from UB

src1

Local tensor from UB

mask

any type

hRepeat

any type

repeatMode

any type

dstBlkStride

any type

vROffset

any type

vRepeat

any type

sharedTmpBuffer

Local tensor from UB

ascendc.bilinearInterpolation_l1 (ascendc::BilinearInterpolationL1Op)

Call AscendC::BilinearInterpolation function

Syntax:

operation ::= `ascendc.bilinearInterpolation_l1` operands attr-dict `:` qualified(type(operands))

AscendC::BilinearInterpolation is a vector binary operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src0

Local tensor from UB

src0Offset

Local tensor from UB

src1

Local tensor from UB

mask

variadic of 64-bit unsigned integer

hRepeat

any type

repeatMode

any type

dstBlkStride

any type

vROffset

any type

vRepeat

any type

sharedTmpBuffer

Local tensor from UB

ascendc.block_reduce_max_l0 (ascendc::BlockReduceMaxL0Op)

Call AscendC::BlockReduceMax function

Syntax:

operation ::= `ascendc.block_reduce_max_l0` operands attr-dict `:` qualified(type(operands))

Find maximum value in each block (single mask version)

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

repeatTime

any type

mask

any type

dstRepStride

any type

srcBlkStride

any type

srcRepStride

any type

ascendc.block_reduce_max_l1 (ascendc::BlockReduceMaxL1Op)

Call AscendC::BlockReduceMax function

Syntax:

operation ::= `ascendc.block_reduce_max_l1` operands attr-dict `:` qualified(type(operands))

Find maximum value in each block (mask array version)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

repeatTime

any type

mask

variadic of 64-bit unsigned integer

dstRepStride

any type

srcBlkStride

any type

srcRepStride

any type

ascendc.block_reduce_min_l0 (ascendc::BlockReduceMinL0Op)

Call AscendC::BlockReduceMin function

Syntax:

operation ::= `ascendc.block_reduce_min_l0` operands attr-dict `:` qualified(type(operands))

Find minimum value in each block (single mask version)

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

repeatTime

any type

mask

any type

dstRepStride

any type

srcBlkStride

any type

srcRepStride

any type

ascendc.block_reduce_min_l1 (ascendc::BlockReduceMinL1Op)

Call AscendC::BlockReduceMin function

Syntax:

operation ::= `ascendc.block_reduce_min_l1` operands attr-dict `:` qualified(type(operands))

Find minimum value in each block (mask array version)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

repeatTime

any type

mask

variadic of 64-bit unsigned integer

dstRepStride

any type

srcBlkStride

any type

srcRepStride

any type

ascendc.block_reduce_sum_l0 (ascendc::BlockReduceSumL0Op)

Call AscendC::BlockReduceSum function

Syntax:

operation ::= `ascendc.block_reduce_sum_l0` operands attr-dict `:` qualified(type(operands))

Sum all elements in each block (single mask version)

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

repeatTime

any type

mask

any type

dstRepStride

any type

srcBlkStride

any type

srcRepStride

any type

ascendc.block_reduce_sum_l1 (ascendc::BlockReduceSumL1Op)

Call AscendC::BlockReduceSum function

Syntax:

operation ::= `ascendc.block_reduce_sum_l1` operands attr-dict `:` qualified(type(operands))

Sum all elements in each block (mask array version)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

repeatTime

any type

mask

variadic of 64-bit unsigned integer

dstRepStride

any type

srcBlkStride

any type

srcRepStride

any type

ascendc.brcb_l0 (ascendc::BrcbL0Op)

Call AscendC::Brcb function

Syntax:

operation ::= `ascendc.brcb_l0` operands attr-dict `:` qualified(type(operands))

Brcb elements from source tensor (L0 API)

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src0

Local tensor from UB

repeatTimes

any type

repeatParams

ascendc.broadcast (ascendc::BroadcastOp)

Call AscendC::Broadcast function

Syntax:

operation ::= `ascendc.broadcast` operands attr-dict `:` qualified(type(operands))

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

dstShape

variadic of 32-bit signless integer

srcShape

variadic of 32-bit signless integer

ascendc.cast_deq_l0 (ascendc::CastDeqL0Op)

Call AscendC::CastDeq function

Syntax:

operation ::= `ascendc.cast_deq_l0` operands attr-dict `:` qualified(type(operands))

Quantize and convert the input tensor to the specified data type (L0 API)

Interfaces: APIOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute
isVecDeq::mlir::UnitAttrunit attribute
halfBlock::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.cast_deq_l1 (ascendc::CastDeqL1Op)

Call AscendC::CastDeq function

Syntax:

operation ::= `ascendc.cast_deq_l1` operands attr-dict `:` qualified(type(operands))

Quantize and convert the input tensor to the specified data type (L1 API)

Interfaces: APIOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute
isVecDeq::mlir::UnitAttrunit attribute
halfBlock::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.cast_deq_l2 (ascendc::CastDeqL2Op)

Call AscendC::CastDeq function

Syntax:

operation ::= `ascendc.cast_deq_l2` operands attr-dict `:` qualified(type(operands))

Quantize and convert the input tensor to the specified data type (L2 API)

Interfaces: APIOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isVecDeq::mlir::UnitAttrunit attribute
halfBlock::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

calCount

any type

ascendc.cast_l0 (ascendc::CastL0Op)

Call AscendC::Cast function

Syntax:

operation ::= `ascendc.cast_l0` operands attr-dict `:` qualified(type(operands))

Convert the input tensor to the specified data type (L0 API)

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
roundMode::mlir::ascendc::RoundModeAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6{{% markdown %}}Represents AscendC::RoundMode{{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

mask

any type

repeatTimes

any type

repeatParams

ascendc.cast_l1 (ascendc::CastL1Op)

Call AscendC::Cast function

Syntax:

operation ::= `ascendc.cast_l1` operands attr-dict `:` qualified(type(operands))

Convert the input tensor to the specified data type (L1 API)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
roundMode::mlir::ascendc::RoundModeAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6{{% markdown %}}Represents AscendC::RoundMode{{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.cast_l2 (ascendc::CastL2Op)

Call AscendC::Cast function

Syntax:

operation ::= `ascendc.cast_l2` operands attr-dict `:` qualified(type(operands))

Convert the input tensor to the specified data type (L2 API)

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
roundMode::mlir::ascendc::RoundModeAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6{{% markdown %}}Represents AscendC::RoundMode{{% /markdown %}}

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

calCount

any type

ascendc.ceil (ascendc::CeilOp)

Call AscendC::Ceil function

Syntax:

operation ::= `ascendc.ceil` operands attr-dict `:` qualified(type(operands))

AscendC::Ceil is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.check_local_memory_ia (ascendc::CheckLocalMemoryIAOp)

Call AscendC::CheckLocalMemoryIA function

Syntax:

operation ::= `ascendc.check_local_memory_ia` operands attr-dict `:` qualified(type(operands))

Get the values of atomic operation enable bit and atomic operation type

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

param

ascendc.clamp_max (ascendc::ClampMaxOp)

Call AscendC::ClampMax function

Syntax:

operation ::= `ascendc.clamp_max` operands attr-dict `:` qualified(type(operands))

AscendC::ClampMax is a math library operation.

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

scalar

any type

calCount

any type

isReuseSource

any type

ascendc.clamp_min (ascendc::ClampMinOp)

Call AscendC::ClampMin function

Syntax:

operation ::= `ascendc.clamp_min` operands attr-dict `:` qualified(type(operands))

AscendC::ClampMin is a math library operation.

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

scalar

any type

calCount

any type

isReuseSource

any type

ascendc.compare_l0 (ascendc::CompareL0Op)

Call AscendC::Compare function

Syntax:

operation ::= `ascendc.compare_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Compare is a vector binary operation (L0 API).

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
cmpMode::mlir::ascendc::CMPMODEAttr
allowed 64-bit signless integer cases: 0, 1, 2, 3, 4, 5{{% markdown %}}Enum cases: * LT (`LT`) * GT (`GT`) * EQ (`EQ`) * LE (`LE`) * GE (`GE`) * NE (`NE`){{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.compare_l1 (ascendc::CompareL1Op)

Call AscendC::Compare function

Syntax:

operation ::= `ascendc.compare_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Compare is a vector binary operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
cmpMode::mlir::ascendc::CMPMODEAttr
allowed 64-bit signless integer cases: 0, 1, 2, 3, 4, 5{{% markdown %}}Enum cases: * LT (`LT`) * GT (`GT`) * EQ (`EQ`) * LE (`LE`) * GE (`GE`) * NE (`NE`){{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.compare_l2 (ascendc::CompareL2Op)

Call AscendC::Compare function

Syntax:

operation ::= `ascendc.compare_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Compare is a vector binary operation (L2 API).

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
cmpMode::mlir::ascendc::CMPMODEAttr
allowed 64-bit signless integer cases: 0, 1, 2, 3, 4, 5{{% markdown %}}Enum cases: * LT (`LT`) * GT (`GT`) * EQ (`EQ`) * LE (`LE`) * GE (`GE`) * NE (`NE`){{% /markdown %}}

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.compare_r_l0 (ascendc::CompareRL0Op)

Call AscendC::Compare function

Syntax:

operation ::= `ascendc.compare_r_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Compare is a vector binary operation (store result in the register) (L0 API).

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
cmpMode::mlir::ascendc::CMPMODEAttr
allowed 64-bit signless integer cases: 0, 1, 2, 3, 4, 5{{% markdown %}}Enum cases: * LT (`LT`) * GT (`GT`) * EQ (`EQ`) * LE (`LE`) * GE (`GE`) * NE (`NE`){{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

src0

any type

src1

any type

mask

any type

repeatParams

ascendc.compare_r_l1 (ascendc::CompareRL1Op)

Call AscendC::Compare function

Syntax:

operation ::= `ascendc.compare_r_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Compare is a vector binary operation (store result in the register) (L1 API).

Interfaces: APIOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
cmpMode::mlir::ascendc::CMPMODEAttr
allowed 64-bit signless integer cases: 0, 1, 2, 3, 4, 5{{% markdown %}}Enum cases: * LT (`LT`) * GT (`GT`) * EQ (`EQ`) * LE (`LE`) * GE (`GE`) * NE (`NE`){{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatParams

ascendc.compare_scalar_l0 (ascendc::CompareScalarL0Op)

Call AscendC::CompareScalar function

Syntax:

operation ::= `ascendc.compare_scalar_l0` operands attr-dict `:` qualified(type(operands))

AscendC::CompareScalar is a vector-scalar binary operation (L0 API).

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
cmpMode::mlir::ascendc::CMPMODEAttr
allowed 64-bit signless integer cases: 0, 1, 2, 3, 4, 5{{% markdown %}}Enum cases: * LT (`LT`) * GT (`GT`) * EQ (`EQ`) * LE (`LE`) * GE (`GE`) * NE (`NE`){{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1Scalar

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.compare_scalar_l1 (ascendc::CompareScalarL1Op)

Call AscendC::CompareScalar function

Syntax:

operation ::= `ascendc.compare_scalar_l1` operands attr-dict `:` qualified(type(operands))

AscendC::CompareScalar is a vector-scalar binary operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
cmpMode::mlir::ascendc::CMPMODEAttr
allowed 64-bit signless integer cases: 0, 1, 2, 3, 4, 5{{% markdown %}}Enum cases: * LT (`LT`) * GT (`GT`) * EQ (`EQ`) * LE (`LE`) * GE (`GE`) * NE (`NE`){{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1Scalar

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.compare_scalar_l2 (ascendc::CompareScalarL2Op)

Call AscendC::CompareScalar function

Syntax:

operation ::= `ascendc.compare_scalar_l2` operands attr-dict `:` qualified(type(operands))

AscendC::CompareScalar is a vector-scalar binary operation (L2 API).

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
cmpMode::mlir::ascendc::CMPMODEAttr
allowed 64-bit signless integer cases: 0, 1, 2, 3, 4, 5{{% markdown %}}Enum cases: * LT (`LT`) * GT (`GT`) * EQ (`EQ`) * LE (`LE`) * GE (`GE`) * NE (`NE`){{% /markdown %}}

Operands:

Operand

Description

dst

any type

src0

any type

src1Scalar

any type

calCount

any type

ascendc.concat (ascendc::ConcatOp)

Call AscendC::Concat function

Syntax:

operation ::= `ascendc.concat` operands attr-dict `:` qualified(type(operands))

Preprocess source tensor data and merge it into the target tensor concat before sort operation.

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

tmp

Local tensor from UB

repeatTime

any type

ascendc.construct (ascendc::ConstructOp)

Construct Ascend C object (struct or enum)

Syntax:

operation ::= `ascendc.construct` type($result) `(` ($operands^)? `)` ($types^)? (`constexpr` $isConstexpr^)?
              (`static` $isStatic^)? attr-dict (`:` type($operands)^)?

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
types::mlir::ArrayAttrtype array attribute
isConstexpr::mlir::UnitAttrunit attribute
isStatic::mlir::UnitAttrunit attribute

Operands:

Operand

Description

operands

variadic of any type

Results:

Result

Description

result

any type

ascendc.copy_l0 (ascendc::CopyL0Op)

Copy with bitwise mask

Syntax:

operation ::= `ascendc.copy_l0` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

mask

variadic of integer

repeatTime

integer

repeatParams

isSetMask

integer

ascendc.copy_l1 (ascendc::CopyL1Op)

Copy with continuous mask

Syntax:

operation ::= `ascendc.copy_l1` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

mask

integer

repeatTime

integer

repeatParams

isSetMask

integer

ascendc.cos (ascendc::CosOp)

Call AscendC::Cos function

Syntax:

operation ::= `ascendc.cos` operands attr-dict `:` qualified(type(operands))

AscendC::Cos is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.cosh (ascendc::CoshOp)

Call AscendC::Cosh function

Syntax:

operation ::= `ascendc.cosh` operands attr-dict `:` qualified(type(operands))

AscendC::Cosh is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.count_bits_cnt_same_as_sign_bit (ascendc::CountBitsCntSameAsSignBitOp)

Call AscendC::CountBitsCntSameAsSignBit function

Syntax:

operation ::= `ascendc.count_bits_cnt_same_as_sign_bit` operands attr-dict `:` qualified(type(operands)) `->` type($count)

Count the number of consecutive bits from the highest value bit that are the same as the sign bit in an int64_t value. Returns -1 if input is -1 (all 1s) or 0 (all 0s).

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

valueIn

64-bit signless integer

Results:

Result

Description

count

64-bit signless integer

ascendc.cross_core_set_flag (ascendc::CrossCoreSetFlagOp)

Call AscendC::CrossCoreSetFlag function

Syntax:

operation ::= `ascendc.cross_core_set_flag` $flagId `,` $modeId `,` $pipe attr-dict `:` type($flagId)

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
modeId::mlir::IntegerAttr8-bit unsigned integer attribute
pipe::mlir::ascendc::PipeAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10{{% markdown %}}Represents pipe_t{{% /markdown %}}

Operands:

Operand

Description

flagId

any type

ascendc.cross_core_wait_flag (ascendc::CrossCoreWaitFlagOp)

Call AscendC::CrossCoreWaitFlag function

Syntax:

operation ::= `ascendc.cross_core_wait_flag` $flagId `,` $modeId `,` $pipe attr-dict `:` type($flagId)

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
modeId::mlir::IntegerAttr8-bit unsigned integer attribute
pipe::mlir::ascendc::PipeAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10{{% markdown %}}Represents pipe_t{{% /markdown %}}

Operands:

Operand

Description

flagId

any type

ascendc.cumsum (ascendc::CumSumOp)

Call AscendC::CumSum function

Syntax:

operation ::= `ascendc.cumsum` operands attr-dict `:` qualified(type(operands))

AscendC::CumSum is a math library operation.

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

lastRow

any type

src

any type

sharedTmpBuffer

any type

lastAxis

any type

reuseSource

any type

outputLastRow

any type

ascendc.data_cache_clean_invalid_global (ascendc::DataCacheCleanAndInvalidGlobalOp)

Call AscendC::DataCacheCleanAndInvalid function

Syntax:

operation ::= `ascendc.data_cache_clean_invalid_global` operands attr-dict `:` qualified(type(operands))

Clean and invalidate data cache for GlobalTensor (with DcciDst).

Traits: AscFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
entireType::mlir::ascendc::CacheLineAttr
allowed 32-bit signless integer cases: 0, 1{{% markdown %}}Represents AscendC::CacheLine{{% /markdown %}}
dcciDst::mlir::ascendc::DcciDstAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3{{% markdown %}}Represents AscendC::DcciDst{{% /markdown %}}

Operands:

Operand

Description

dst

Global tensor from GM (OUT)

ascendc.data_cache_clean_invalid_global_nodccidst (ascendc::DataCacheCleanAndInvalidGlobalNoDcciDstOp)

Call AscendC::DataCacheCleanAndInvalid function

Syntax:

operation ::= `ascendc.data_cache_clean_invalid_global_nodccidst` operands attr-dict `:` qualified(type(operands))

Clean and invalidate data cache for GlobalTensor.

Traits: AscFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
entireType::mlir::ascendc::CacheLineAttr
allowed 32-bit signless integer cases: 0, 1{{% markdown %}}Represents AscendC::CacheLine{{% /markdown %}}

Operands:

Operand

Description

dst

Global tensor from GM (OUT)

ascendc.data_cache_preload (ascendc::DataCachePreloadOp)

Call AscendC::DataCachePreload function

Syntax:

operation ::= `ascendc.data_cache_preload` operands attr-dict `:` qualified(type(operands))

Preload data from a specific GM address into the data cache.

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

src

Global tensor from GM (OUT)

cacheOffset

integer

ascendc.data_copy_co12dst (ascendc::DataCopyCO12DstOp)

Call AscendC::DataCopy function

Syntax:

operation ::= `ascendc.data_copy_co12dst` operands attr-dict `:` qualified(type(operands))

Perform copying between tensors (with DataCopyCO12DstParams)

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

intriParams

ascendc.data_copy_enhanced (ascendc::DataCopyEnhancedOp)

Call AscendC::DataCopy function

Syntax:

operation ::= `ascendc.data_copy_enhanced` operands attr-dict `:` qualified(type(operands))

Perform copying between tensors (with DataCopyEnhancedParams)

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

intriParams

enhancedParams

ascendc.data_copy_l0 (ascendc::DataCopyL0Op)

Call AscendC::DataCopy function

Syntax:

operation ::= `ascendc.data_copy_l0` operands attr-dict `:` qualified(type(operands))

Perform copying between tensors (L0 API)

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

repeatParams

ascendc.data_copy_l2 (ascendc::DataCopyL2Op)

Call AscendC::DataCopy function

Syntax:

operation ::= `ascendc.data_copy_l2` operands attr-dict `:` qualified(type(operands))

Perform copying between tensors (L2 API)

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface, OpWithSrcInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

calCount

any type

ascendc.data_copy_nd2nz (ascendc::DataCopyNd2NzOp)

Call AscendC::DataCopy function

Syntax:

operation ::= `ascendc.data_copy_nd2nz` operands attr-dict `:` qualified(type(operands))

Perform copying between tensors (with Nd2NzParams)

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

intriParams

ascendc.data_copy_nz2nd (ascendc::DataCopyNz2NdOp)

Call AscendC::DataCopy function

Syntax:

operation ::= `ascendc.data_copy_nz2nd` operands attr-dict `:` qualified(type(operands))

Perform copying between tensors (with Nz2NdParamsFull)

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

intriParams

ascendc.data_copy_pad_ext_params (ascendc::DataCopyPadExtParamsOp)

Instantiate DataCopyPadExtParams

Syntax:

operation ::= `ascendc.data_copy_pad_ext_params` attr-dict `:` qualified(type($params))

Traits: AscConstructor

Results:

Result

Description

params

ascendc.data_copy_pad_l0 (ascendc::DataCopyPadL0Op)

Call AscendC::DataCopyPad function

Syntax:

operation ::= `ascendc.data_copy_pad_l0` operands attr-dict `:` qualified(type(operands))

Perform copying between tensors (L0 API with DataCopyParams)

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

dataCopyParams

padParams

ascendc.data_copy_pad_l0_ext (ascendc::DataCopyPadExtL0Op)

Call AscendC::DataCopyPad function

Syntax:

operation ::= `ascendc.data_copy_pad_l0_ext` operands attr-dict `:` qualified(type(operands))

Perform copying between tensors (L0 API with DataCopyExtParams)

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

dataCopyParams

padParams

ascendc.data_copy_pad_l2 (ascendc::DataCopyPadL2Op)

Call AscendC::DataCopyPad function

Syntax:

operation ::= `ascendc.data_copy_pad_l2` operands attr-dict `:` qualified(type(operands))

Perform copying between tensors (L2 API with DataCopyParams)

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

dataCopyParams

ascendc.data_copy_pad_l2_ext (ascendc::DataCopyPadExtL2Op)

Call AscendC::DataCopyPad function

Syntax:

operation ::= `ascendc.data_copy_pad_l2_ext` operands attr-dict `:` qualified(type(operands))

Perform copying between tensors (L2 API with DataCopyExtParams)

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

dataCopyParams

ascendc.data_copy_pad_nd2nz (ascendc::DataCopyPadNd2NzOp)

Call AscendC::DataCopyPad function

Syntax:

operation ::= `ascendc.data_copy_pad_nd2nz` operands attr-dict `:` qualified(type(operands))

Perform copying between tensors (Nd2Nz with DataCopyParams)

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

dataCopyParams

nd2nzParams

ascendc.data_copy_pad_nd2nz_ext (ascendc::DataCopyPadExtNd2NzOp)

Call AscendC::DataCopyPad function

Syntax:

operation ::= `ascendc.data_copy_pad_nd2nz_ext` operands attr-dict `:` qualified(type(operands))

Perform copying between tensors (Nd2Nz with DataCopyExtParams)

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

dataCopyParams

nd2nzParams

ascendc.data_copy_slice (ascendc::DataCopySliceOp)

Call AscendC::DataCopy function

Syntax:

operation ::= `ascendc.data_copy_slice` operands attr-dict `:` qualified(type(operands))

Perform copying between tensors (with SliceInfo)

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

dstSliceInfo

variadic of

srcSliceInfo

variadic of

dimValue

32-bit unsigned integer

ascendc.data_sync_barrier (ascendc::DataSyncBarrierOp)

Call AscendC::DataSyncBarrier function

Syntax:

operation ::= `ascendc.data_sync_barrier` operands attr-dict `:` qualified(type(operands))

Synchronize data accesses by waiting for specified memory operations, controlled by the MemDsbT parameter.

Traits: AscFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
memDsbType::mlir::ascendc::MemDsbTAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3{{% markdown %}}Represents AscendC::MemDsbT, indicating memory positions to wait for in DataSyncBarrier{{% /markdown %}}

ascendc.digamma (ascendc::DigammaOp)

Call AscendC::Digamma function

Syntax:

operation ::= `ascendc.digamma` operands attr-dict `:` qualified(type(operands))

AscendC::Digamma is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.div_l0 (ascendc::DivL0Op)

Call AscendC::Div function

Syntax:

operation ::= `ascendc.div_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Div is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.div_l1 (ascendc::DivL1Op)

Call AscendC::Div function

Syntax:

operation ::= `ascendc.div_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Div is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.div_l2 (ascendc::DivL2Op)

Call AscendC::Div function

Syntax:

operation ::= `ascendc.div_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Div is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.div_l3 (ascendc::DivL3Op)

Call LocalTensor::operator/ method

Syntax:

operation ::= `ascendc.div_l3` operands attr-dict `:` qualified(type(operands))

LocalTensor::operator/ performs a vector binary operation (L3 API).

Interfaces: APIOpInterface, BinaryL3OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

ascendc.divs_l0 (ascendc::DivsL0Op)

Call AscendC::Divs function

Syntax:

operation ::= `ascendc.divs_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Divs is a vector-scalar operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL0OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.divs_l1 (ascendc::DivsL1Op)

Call AscendC::Divs function

Syntax:

operation ::= `ascendc.divs_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Divs is a vector-scalar operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.divs_l2 (ascendc::DivsL2Op)

Call AscendC::Divs function

Syntax:

operation ::= `ascendc.divs_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Divs is a vector-scalar operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL2OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

calCount

any type

ascendc.dump_acc_chk_point (ascendc::DumpAccChkPointOp)

Call AscendC::DumpAccChkPoint function

Syntax:

operation ::= `ascendc.dump_acc_chk_point` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

base tensor type

index

any type

countOff

any type

dumpSize

any type

ascendc.dump_tensor (ascendc::DumpTensorOp)

Call AscendC::DumpTensor function

Syntax:

operation ::= `ascendc.dump_tensor` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

base tensor type

desc

any type

dumpSize

any type

shapeInfo

ascendc.duplicate_l0 (ascendc::DuplicateL0Op)

Call AscendC::Duplicate function

Syntax:

operation ::= `ascendc.duplicate_l0` operands attr-dict `:` qualified(type(operands))

Duplicate elements from source tensor (L0 API)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

scalar

any type

mask

any type

repeatTimes

any type

dstBlockStride

any type

dstRepeatStride

any type

ascendc.duplicate_l1 (ascendc::DuplicateL1Op)

Call AscendC::Duplicate function

Syntax:

operation ::= `ascendc.duplicate_l1` operands attr-dict `:` qualified(type(operands))

Duplicate elements from source tensor (L1 API)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

scalar

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

dstBlockStride

any type

dstRepeatStride

any type

ascendc.duplicate_l2 (ascendc::DuplicateL2Op)

Call AscendC::Duplicate function

Syntax:

operation ::= `ascendc.duplicate_l2` operands attr-dict `:` qualified(type(operands))

Duplicate elements from source tensor (L2 API)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

scalar

any type

calCount

any type

ascendc.erf (ascendc::ErfOp)

Call AscendC::Erf function

Syntax:

operation ::= `ascendc.erf` operands attr-dict `:` qualified(type(operands))

AscendC::Erf is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.erfc (ascendc::ErfcOp)

Call AscendC::Erfc function

Syntax:

operation ::= `ascendc.erfc` operands attr-dict `:` qualified(type(operands))

AscendC::Erfc is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.exp (ascendc::ExpOp)

Call AscendC::Exp function

Syntax:

operation ::= `ascendc.exp` operands attr-dict `:` qualified(type(operands))

AscendC::Exp is a math library operation.

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

calCount

any type

taylorExpandLevel

any type

sharedTmpBuffer

any type

isReuseSource

any type

ascendc.exp_l0 (ascendc::ExpL0Op)

Call AscendC::Exp function

Syntax:

operation ::= `ascendc.exp_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Exp is a vector unary operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL0OpInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.exp_l1 (ascendc::ExpL1Op)

Call AscendC::Exp function

Syntax:

operation ::= `ascendc.exp_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Exp is a vector unary operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.exp_l2 (ascendc::ExpL2Op)

Call AscendC::Exp function

Syntax:

operation ::= `ascendc.exp_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Exp is a vector unary operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL2OpInterface, UnaryOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src

any type

calCount

any type

ascendc.extract (ascendc::ExtractOp)

Call AscendC::Extract function

Syntax:

operation ::= `ascendc.extract` operands attr-dict `:` qualified(type(operands))

Extract sorted values and indices from source tensor after sort operation.

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

dstValue

Local tensor from UB

dstIndex

Local tensor from UB

src

Local tensor from UB

repeatTime

any type

ascendc.ffts_cross_core_sync (ascendc::FftsCrossCoreSyncOp)

Call AscendC::FftsCrossCoreSync function

Syntax:

operation ::= `ascendc.ffts_cross_core_sync` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
pipe::mlir::ascendc::PipeAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10{{% markdown %}}Represents pipe_t{{% /markdown %}}

Operands:

Operand

Description

config

any type

ascendc.fixpipe (ascendc::FixpipeOp)

Call AscendC::Fixpipe function without cbufWorkspace

Syntax:

operation ::= `ascendc.fixpipe` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface, OpWithSrcInterface

Operands:

Operand

Description

dst

Global tensor from GM (OUT)

src

Local tensor from UB

intriParams

fixpipeConfig

ascendc.fixpipe_with_workspace (ascendc::FixpipeWithWorkspaceOp)

Call AscendC::Fixpipe function with cbufWorkspace

Syntax:

operation ::= `ascendc.fixpipe_with_workspace` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

Global tensor from GM (OUT)

src

Local tensor from UB

cbufWorkspace

Local tensor from UB

intriParams

fixpipeConfig

ascendc.floor (ascendc::FloorOp)

Call AscendC::Floor function

Syntax:

operation ::= `ascendc.floor` operands attr-dict `:` qualified(type(operands))

AscendC::Floor is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.frac (ascendc::FracOp)

Call AscendC::Frac function

Syntax:

operation ::= `ascendc.frac` operands attr-dict `:` qualified(type(operands))

AscendC::Frac is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.fused_abs_sub_l2 (ascendc::FusedAbsSubL2Op)

Call AscendC::FusedAbsSub function

Syntax:

operation ::= `ascendc.fused_abs_sub_l2` operands attr-dict `:` qualified(type(operands))

AscendC::FusedAbsSub is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.fused_exp_sub_l2 (ascendc::FusedExpSubL2Op)

Call AscendC::FusedExpSub function

Syntax:

operation ::= `ascendc.fused_exp_sub_l2` operands attr-dict `:` qualified(type(operands))

AscendC::FusedExpSub is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.fused_mul_add_l0 (ascendc::FusedMulAddL0Op)

Call AscendC::FusedMulAdd function

Syntax:

operation ::= `ascendc.fused_mul_add_l0` operands attr-dict `:` qualified(type(operands))

AscendC::FusedMulAdd is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.fused_mul_add_l1 (ascendc::FusedMulAddL1Op)

Call AscendC::FusedMulAdd function

Syntax:

operation ::= `ascendc.fused_mul_add_l1` operands attr-dict `:` qualified(type(operands))

AscendC::FusedMulAdd is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.fused_mul_add_l2 (ascendc::FusedMulAddL2Op)

Call AscendC::FusedMulAdd function

Syntax:

operation ::= `ascendc.fused_mul_add_l2` operands attr-dict `:` qualified(type(operands))

AscendC::FusedMulAdd is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.fused_mul_add_relu_l0 (ascendc::FusedMulAddReluL0Op)

Call AscendC::FusedMulAddRelu function

Syntax:

operation ::= `ascendc.fused_mul_add_relu_l0` operands attr-dict `:` qualified(type(operands))

AscendC::FusedMulAddRelu is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.fused_mul_add_relu_l1 (ascendc::FusedMulAddReluL1Op)

Call AscendC::FusedMulAddRelu function

Syntax:

operation ::= `ascendc.fused_mul_add_relu_l1` operands attr-dict `:` qualified(type(operands))

AscendC::FusedMulAddRelu is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.fused_mul_add_relu_l2 (ascendc::FusedMulAddReluL2Op)

Call AscendC::FusedMulAddRelu function

Syntax:

operation ::= `ascendc.fused_mul_add_relu_l2` operands attr-dict `:` qualified(type(operands))

AscendC::FusedMulAddRelu is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.gather_l0 (ascendc::GatherL0Op)

Call AscendC::Gather function

Syntax:

operation ::= `ascendc.gather_l0` operands attr-dict `:` qualified(type(operands))

Gather elements from source tensor (L0 API)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

srcOffset

Local tensor from UB

srcBaseAddr

any type

mask

any type

repeatTimes

any type

dstRepStride

any type

ascendc.gather_l1 (ascendc::GatherL1Op)

Call AscendC::Gather function

Syntax:

operation ::= `ascendc.gather_l1` operands attr-dict `:` qualified(type(operands))

Gather elements from source tensor (L1 API)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

dstOffset

Local tensor from UB

dstBase

any type

mask

variadic of any type

repeatTimes

any type

srcRepStride

any type

ascendc.gather_l2 (ascendc::GatherL2Op)

Call AscendC::Gather function

Syntax:

operation ::= `ascendc.gather_l2` operands attr-dict `:` qualified(type(operands))

Gather elements from source tensor (L2 API)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

srcOffset

Local tensor from UB

srcBaseAddr

any type

count

any type

ascendc.gather_mask (ascendc::GatherMaskOp)

Call AscendC::GatherMask function

Syntax:

operation ::= `ascendc.gather_mask` $dst `,` $src0 `,` $src1Pattern `,` $reduceMode `,` $mask `,` $params `,` $gatherMaskMode
              attr-dict `:` qualified(type($dst)) `,` qualified(type($src0)) `,` qualified(type($src1Pattern)) `,`
              type($reduceMode) `,` type($mask) `,` type($params)  `->` type($rsvdCnt)

Gather elements from source tensor using mask pattern

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
gatherMaskMode::mlir::ascendc::GatherMaskModeAttr
allowed 32-bit signless integer cases: 0{{% markdown %}}Represents AscendC::GatherMaskMode{{% /markdown %}}

Operands:

Operand

Description

dst

Local tensor from UB

src0

Local tensor from UB

src1Pattern

any type

reduceMode

any type

mask

any type

params

Results:

Result

Description

rsvdCnt

any type

ascendc.gatherb_l0 (ascendc::GatherbL0Op)

Call AscendC::Gatherb function

Syntax:

operation ::= `ascendc.gatherb_l0` operands attr-dict `:` qualified(type(operands))

Gatherb elements from source tensor (L0 API)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src0

Local tensor from UB

offset

Local tensor from UB

repeatTimes

any type

repeatParams

ascendc.get_arch_version (ascendc::GetArchVersionOp)

Call AscendC::GetArchVersion function

Syntax:

operation ::= `ascendc.get_arch_version` operands attr-dict `:` qualified(type(operands))

Obtain the architecture version

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

coreVersion

any type

ascendc.get_block_idx (ascendc::GetBlockIdxOp)

Call AscendC::GetBlockIdx function

Syntax:

operation ::= `ascendc.get_block_idx` attr-dict `:` type($value)

Obtain an index of the current block

Traits: AlwaysSpeculatableImplTrait

Interfaces: APIOpInterface, ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Results:

Result

Description

value

signless integer or index

ascendc.get_block_num (ascendc::GetBlockNumOp)

Call AscendC::GetBlockNum function

Syntax:

operation ::= `ascendc.get_block_num` attr-dict `:` type($value)

Obtain the number of active blocks

Traits: AlwaysSpeculatableImplTrait

Interfaces: APIOpInterface, ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Results:

Result

Description

value

signless integer or index

ascendc.get_buf (ascendc::GetBufOp)

Call AscendC::get_buf function

Syntax:

operation ::= `ascendc.get_buf` $pipe `,` $bufId attr-dict

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
pipe::mlir::ascendc::PipeAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10{{% markdown %}}Represents pipe_t{{% /markdown %}}
bufId::mlir::IntegerAttr32-bit signless integer attribute
mode::mlir::UnitAttrunit attribute

ascendc.get_cmp_mask (ascendc::GetCmpMaskOp)

Call AscendC::GetCmpMask function

Syntax:

operation ::= `ascendc.get_cmp_mask` operands attr-dict `:` qualified(type(operands))

get Compare(store results in register) results

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

ascendc.get_data_block_size_in_bytes (ascendc::GetDataBlockSizeInBytesOp)

Call AscendC::GetDataBlockSizeInBytes function

Syntax:

operation ::= `ascendc.get_data_block_size_in_bytes` attr-dict `:` type($value)

Obtain the size of a datablock in bytes for the current chip version

Traits: AscFunc

Interfaces: APIOpInterface

Results:

Result

Description

value

signless integer or index

ascendc.get_gather_mask_remain_count (ascendc::GetGatherMaskRemainCountOp)

Call AscendC::GetGatherMaskRemainCount function

Syntax:

operation ::= `ascendc.get_gather_mask_remain_count` attr-dict `:` type($result)

Get remaining count from last GatherMask operation

Traits: AscFunc

Interfaces: APIOpInterface

Results:

Result

Description

result

any type

ascendc.get_hccl_context (ascendc::GetHcclContextOp)

Call AscendC::GetHcclContext function

Syntax:

operation ::= `ascendc.get_hccl_context` $index attr-dict `:` type($index) `,` type($context)

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

index

any type

Results:

Result

Description

context

any type

ascendc.get_icache_preload_status (ascendc::GetICachePreloadStatusOp)

Call AscendC::GetICachePreloadStatus function

Syntax:

operation ::= `ascendc.get_icache_preload_status` operands attr-dict `:` qualified(type(operands))

Get the status of ICache preload: 0 indicates idle, 1 indicates busy.

Traits: AscFunc

Interfaces: APIOpInterface

Results:

Result

Description

status

64-bit signless integer

ascendc.get_matmul_api_tiling (ascendc::MatmulGetMatmulApiTilingOp)

Call AscendC::GetMatmulApiTiling function

Syntax:

operation ::= `ascendc.get_matmul_api_tiling` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
matmulType::mlir::TypeAttrany type attribute

Operands:

Operand

Description

mmCFG

l1Size

any type

Results:

Result

Description

result

ascendc.get_mrg_sort_result (ascendc::GetMrgSortResultOp)

Call AscendC::GetMrgSortResult function

Syntax:

operation ::= `ascendc.get_mrg_sort_result` attr-dict `:` type($mrgSortList1) `,` type($mrgSortList2) `,`  type($mrgSortList3) `,` type($mrgSortList4)

Get merge sort result

Interfaces: APIOpInterface, VectorOpInterface

Results:

Result

Description

mrgSortList1

any type

mrgSortList2

any type

mrgSortList3

any type

mrgSortList4

any type

ascendc.get_program_counter (ascendc::GetProgramCounterOp)

Call AscendC::GetProgramCounter function

Syntax:

operation ::= `ascendc.get_program_counter` attr-dict `:` type($value)

Get the program counter pointer

Traits: AscFunc

Interfaces: APIOpInterface

Results:

Result

Description

value

signless integer or index

ascendc.get_shape_size (ascendc::GetShapeSizeOp)

Call AscendC::GetShapeSize function

Syntax:

operation ::= `ascendc.get_shape_size` $shapeInfo attr-dict `:` qualified(type($shapeInfo)) `->` type($result)

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

shapeInfo

Results:

Result

Description

result

signless integer or index

ascendc.get_sort_len (ascendc::GetSortLenOp)

Call AscendC::GetSortLen<float> function

Syntax:

operation ::= `ascendc.get_sort_len` operands attr-dict `:` qualified(type(operands))

Get sort length in the sorted structure

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Operands:

Operand

Description

elemCount

32-bit unsigned integer

Results:

Result

Description

result

32-bit unsigned integer

ascendc.get_sort_offset (ascendc::GetSortOffsetOp)

Call AscendC::GetSortOffset<float> function

Syntax:

operation ::= `ascendc.get_sort_offset` operands attr-dict `:` qualified(type(operands))

Get sort offset in the sorted structure

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Operands:

Operand

Description

elemOffset

32-bit unsigned integer

Results:

Result

Description

result

32-bit unsigned integer

ascendc.get_store_atomic_config (ascendc::GetStoreAtomicConfigOp)

Get atomic operation enable bit and atomic operation type

Syntax:

operation ::= `ascendc.get_store_atomic_config` attr-dict `:` type($atomicType) `,` type($atomicOp)

Get the values of atomic operation enable bit and atomic operation type

Interfaces: APIOpInterface

Results:

Result

Description

atomicType

any type

atomicOp

any type

ascendc.get_sub_block_idx (ascendc::GetSubBlockIdxOp)

Call AscendC::GetSubBlockIdx function

Syntax:

operation ::= `ascendc.get_sub_block_idx` attr-dict `:` type($value)

Get the vector core ID in AI Core

Traits: AscFunc

Interfaces: APIOpInterface

Results:

Result

Description

value

64-bit signless integer

ascendc.get_sub_block_num (ascendc::GetSubBlockNumOp)

Call AscendC::GetSubBlockNum function

Syntax:

operation ::= `ascendc.get_sub_block_num` attr-dict `:` type($value)

Get the num of vector core in aicore

Traits: AscFunc

Interfaces: APIOpInterface

Results:

Result

Description

value

64-bit unsigned integer

ascendc.get_sys_workspace_ptr (ascendc::GetSysWorkspacePtrOp)

Call AscendC::GetSysWorkSpacePtr function

Syntax:

operation ::= `ascendc.get_sys_workspace_ptr` attr-dict `:` type($value)

Interfaces: APIOpInterface

Results:

Result

Description

value

any type

ascendc.get_system_cycle (ascendc::GetSystemCycleOp)

Call AscendC::GetSystemCycle function

Syntax:

operation ::= `ascendc.get_system_cycle` attr-dict `:` type($value)

Get the current system cycle count

Traits: AscFunc

Interfaces: APIOpInterface

Results:

Result

Description

value

signless integer or index

ascendc.get_task_ratio (ascendc::GetTaskRatioOp)

Call AscendC::GetTaskRatio function

Syntax:

operation ::= `ascendc.get_task_ratio` attr-dict `:` type($value)

Get the ratio of task cores to AI Core, return 1 in coupled mode

Traits: AscFunc

Interfaces: APIOpInterface

Results:

Result

Description

value

64-bit signless integer

ascendc.global_tensor (ascendc::GlobalTensorOp)

Instantiate global tensor

Syntax:

operation ::= `ascendc.global_tensor` attr-dict `:` qualified(type($tensor))

Traits: AscConstructor

Results:

Result

Description

tensor

Global tensor from GM (OUT)

ascendc.global_tensor.bracket (ascendc::GlobalTensorBracketOp)

Call AscendC::GlobalTensor::operator() method

Syntax:

operation ::= `ascendc.global_tensor.bracket` $tensor `(` $index `)`  attr-dict `:` qualified(type($tensor)) `,`
              type($index) `,` qualified(type($result))

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand

Description

tensor

Global tensor from GM (OUT)

index

signless integer or index

Results:

Result

Description

result

Global tensor from GM (OUT)

ascendc.global_tensor.get_phy_addr (ascendc::GlobalTensorGetPhyAddrOp)

Call AscendC::GlobalTensor::GetPhyAddr method

Syntax:

operation ::= `ascendc.global_tensor.get_phy_addr` $tensor attr-dict (`,` $offset^)? `:` qualified(type($tensor))
              `,` qualified(type($result)) (`,` type($offset)^)?

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Global tensor from GM (OUT)

offset

64-bit unsigned integer

Results:

Result

Description

result

ranked or unranked memref of any type values

ascendc.global_tensor.get_shape_info (ascendc::GlobalTensorGetShapeInfoOp)

Call AscendC::GlobalTensor::GetShapeInfo method

Syntax:

operation ::= `ascendc.global_tensor.get_shape_info` $tensor attr-dict `:` qualified(type($tensor)) `,` type($results)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Global tensor from GM (OUT)

Results:

Result

Description

results

ascendc.global_tensor.get_size (ascendc::GlobalTensorGetSizeOp)

Call AscendC::GlobalTensor::GetSize method

Syntax:

operation ::= `ascendc.global_tensor.get_size` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Global tensor from GM (OUT)

Results:

Result

Description

value

64-bit unsigned integer

ascendc.global_tensor.get_value (ascendc::GlobalTensorGetValueOp)

Call AscendC::GlobalTensor::GetValue method

Syntax:

operation ::= `ascendc.global_tensor.get_value` $tensor `,` $offset attr-dict `:` qualified(type($tensor)) `,`
              qualified(type($offset)) `,` qualified(type($value))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Global tensor from GM (OUT)

offset

any type

Results:

Result

Description

value

any type

ascendc.global_tensor.set_global_buffer (ascendc::GlobalTensorSetGlobalBufferOp)

Set data buffer of global tensor

Syntax:

operation ::= `ascendc.global_tensor.set_global_buffer` $tensor `,` $buffer attr-dict (`,` $size^)? `:` qualified(type($tensor)) `,`
              qualified(type($buffer)) (`,` type($size)^)?

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Global tensor from GM (OUT)

buffer

ranked or unranked memref of any type values

size

integer

ascendc.global_tensor.set_l2_cache_hint (ascendc::GlobalTensorSetL2CacheHintOp)

Call AscendC::GlobalTensor::SetL2CacheHint method

Syntax:

operation ::= `ascendc.global_tensor.set_l2_cache_hint` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
mode::mlir::ascendc::CacheModeAttr
allowed 32-bit signless integer cases: 0, 1{{% markdown %}}Represents AscendC::CacheMode{{% /markdown %}}
rwMode::mlir::ascendc::CacheRwModeAttr
allowed 32-bit signless integer cases: 1, 2, 3{{% markdown %}}Represents AscendC::CacheRwMode{{% /markdown %}}

Operands:

Operand

Description

tensor

Global tensor from GM (OUT)

ascendc.global_tensor.set_shape_info (ascendc::GlobalTensorSetShapeInfoOp)

Call AscendC::GlobalTensor::SetShapeInfo method

Syntax:

operation ::= `ascendc.global_tensor.set_shape_info` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Global tensor from GM (OUT)

shapeInfo

ascendc.global_tensor.set_shape_info_v2 (ascendc::GlobalTensorSetShapeInfoV2Op)

Call AscendC::GlobalTensor::SetShapeInfo method

Syntax:

operation ::= `ascendc.global_tensor.set_shape_info_v2` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Global tensor from GM (OUT)

dims

variadic of integer

ascendc.global_tensor.set_value (ascendc::GlobalTensorSetValueOp)

Call AscendC::GlobalTensor::SetValue method

Syntax:

operation ::= `ascendc.global_tensor.set_value` $tensor `,` $offset `,` $value attr-dict `:` qualified(type($tensor)) `,`
              qualified(type($offset)) `,` qualified(type($value))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Global tensor from GM (OUT)

offset

64-bit unsigned integer

value

any type

ascendc.global_tensor.subindex (ascendc::GlobalTensorSubIndexOp)

Call AscendC::GlobalTensor::operator[] method

Syntax:

operation ::= `ascendc.global_tensor.subindex` $tensor `[` $index `]`  attr-dict `:` qualified(type($tensor)) `,`
              type($index) `,` qualified(type($result))

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand

Description

tensor

Global tensor from GM (OUT)

index

signless integer or index

Results:

Result

Description

result

Global tensor from GM (OUT)

ascendc.ib_set (ascendc::IBSetOp)

Call AscendC::IBSet function

Syntax:

operation ::= `ascendc.ib_set` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
isAIVOnly::mlir::UnitAttrunit attribute

Operands:

Operand

Description

gmWorkspace

Global tensor from GM (OUT)

ubWorkspace

Local tensor from UB

blockIdx

any type

eventId

any type

ascendc.ib_wait (ascendc::IBWaitOp)

Call AscendC::IBWait function

Syntax:

operation ::= `ascendc.ib_wait` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
isAIVOnly::mlir::UnitAttrunit attribute

Operands:

Operand

Description

gmWorkspace

Global tensor from GM (OUT)

ubWorkspace

Local tensor from UB

blockIdx

any type

eventId

any type

ascendc.icache_preload (ascendc::ICachePreLoadOp)

Call AscendC::ICachePreLoad function

Syntax:

operation ::= `ascendc.icache_preload` operands attr-dict `:` qualified(type(operands))

Preload instructions from DDR address to ICache.

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

preFetchLen

64-bit signless integer

ascendc.init_const_value (ascendc::InitConstValueOp)

Call AscendC::InitConstValue function

Syntax:

operation ::= `ascendc.init_const_value` operands attr-dict `:` qualified(type(operands))

Initialize the LocalTensor at a specific TPosition to a specific value.

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

initConstValueParams

ascendc.init_soc_state (ascendc::InitSocStateOp)

Initialize AI Core global state

Syntax:

operation ::= `ascendc.init_soc_state` attr-dict

Initialize global state registers like atomic accumulation state and mask mode

Traits: AscFunc

Interfaces: APIOpInterface

ascendc.kfc_server.init (ascendc::KfcInitOp)

Call AscendC::Init function

Syntax:

operation ::= `ascendc.kfc_server.init` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Operands:

Operand

Description

server

workspace

any type

ascendc.kfc_server.init_obj (ascendc::KfcInitObjOp)

Call AscendC::InitObj function

Syntax:

operation ::= `ascendc.kfc_server.init_obj` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Operands:

Operand

Description

server

pipe

ops

variadic of any type

ascendc.kfc_server.is_run (ascendc::KfcIsRunOp)

Call AscendC::isRun function

Syntax:

operation ::= `ascendc.kfc_server.is_run` $server attr-dict `:` type($value)

Interfaces: APIOpInterface

Operands:

Operand

Description

server

Results:

Result

Description

value

any type

ascendc.kfc_server.quit (ascendc::KfcQuitOp)

Call AscendC::Quit function

Syntax:

operation ::= `ascendc.kfc_server.quit` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Operands:

Operand

Description

server

ascendc.kfc_server.run (ascendc::KfcRunOp)

Call AscendC::Run function

Syntax:

operation ::= `ascendc.kfc_server.run` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Operands:

Operand

Description

server

matmul

ascendc.leaky_relu_l0 (ascendc::LeakyReluL0Op)

Call AscendC::LeakyRelu function

Syntax:

operation ::= `ascendc.leaky_relu_l0` operands attr-dict `:` qualified(type(operands))

AscendC::LeakyRelu is a vector-scalar operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL0OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.leaky_relu_l1 (ascendc::LeakyReluL1Op)

Call AscendC::LeakyRelu function

Syntax:

operation ::= `ascendc.leaky_relu_l1` operands attr-dict `:` qualified(type(operands))

AscendC::LeakyRelu is a vector-scalar operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.leaky_relu_l2 (ascendc::LeakyReluL2Op)

Call AscendC::LeakyRelu function

Syntax:

operation ::= `ascendc.leaky_relu_l2` operands attr-dict `:` qualified(type(operands))

AscendC::LeakyRelu is a vector-scalar operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL2OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

calCount

any type

ascendc.lgamma (ascendc::LgammaOp)

Call AscendC::Lgamma function

Syntax:

operation ::= `ascendc.lgamma` operands attr-dict `:` qualified(type(operands))

AscendC::Lgamma is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.list_tensor_desc (ascendc::ListTensorDescOp)

Constructs a ListTensorDesc object

Syntax:

operation ::= `ascendc.list_tensor_desc` attr-dict `:` qualified(type($result))

Traits: AscConstructor

Results:

Result

Description

result

ascendc.list_tensor_desc_get_data_ptr (ascendc::ListTensorDescGetDataPtrOp)

Call AscendC::ListTensorDesc::GetDataPtr method

Syntax:

operation ::= `ascendc.list_tensor_desc_get_data_ptr` $tensor `,` $index attr-dict `:` qualified(type($result))

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
dtype::mlir::TypeAttrany type attribute

Operands:

Operand

Description

tensor

index

32-bit unsigned integer

Results:

Result

Description

result

ranked or unranked memref of any type values

ascendc.list_tensor_desc_get_desc (ascendc::ListTensorDescGetDescOp)

Call AscendC::ListTensorDesc::GetDesc method

Syntax:

operation ::= `ascendc.list_tensor_desc_get_desc` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

desc

index

32-bit unsigned integer

ascendc.list_tensor_desc_get_size (ascendc::ListTensorDescGetSizeOp)

Call AscendC::ListTensorDesc::GetSize method

Syntax:

operation ::= `ascendc.list_tensor_desc_get_size` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Results:

Result

Description

result

32-bit unsigned integer

ascendc.list_tensor_desc_init (ascendc::ListTensorDescInitOp)

Call AscendC::ListTensorDesc::Init method

Syntax:

operation ::= `ascendc.list_tensor_desc_init` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

data

any type

length

32-bit unsigned integer

shapeSize

32-bit unsigned integer

ascendc.list_tensor_desc_v2 (ascendc::ListTensorDescV2Op)

Constructs a ListTensorDesc object

Syntax:

operation ::= `ascendc.list_tensor_desc_v2` $data `,` $length `,` $shapeSize attr-dict `:` qualified(type($result)) `,` type($data) `,` type($length) `,` type($shapeSize)

Operands:

Operand

Description

data

any type

length

32-bit unsigned integer

shapeSize

32-bit unsigned integer

Results:

Result

Description

result

ascendc.ln_l0 (ascendc::LnL0Op)

Call AscendC::Ln function

Syntax:

operation ::= `ascendc.ln_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Ln is a vector unary operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL0OpInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.ln_l1 (ascendc::LnL1Op)

Call AscendC::Ln function

Syntax:

operation ::= `ascendc.ln_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Ln is a vector unary operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.ln_l2 (ascendc::LnL2Op)

Call AscendC::Ln function

Syntax:

operation ::= `ascendc.ln_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Ln is a vector unary operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL2OpInterface, UnaryOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src

any type

calCount

any type

ascendc.load_data (ascendc::LoadDataOp)

Call AscendC::LoadData function

Syntax:

operation ::= `ascendc.load_data` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

loadDataParams

base load data params type

ascendc.load_data_3d_l0_v1 (ascendc::LoadData3DL0V1Op)

Call AscendC::LoadData function

Syntax:

operation ::= `ascendc.load_data_3d_l0_v1` operands attr-dict `:` qualified(type(operands))

Perform 3D LoadData V1 between LocalTensor and LocalTensor

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

loadDataParams

ascendc.load_data_3d_l0_v2 (ascendc::LoadData3DL0V2Op)

Call AscendC::LoadData function

Syntax:

operation ::= `ascendc.load_data_3d_l0_v2` operands attr-dict `:` qualified(type(operands))

Perform 3D LoadData V2 between LocalTensor and LocalTensor

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

loadDataParams

ascendc.load_data_3d_l0_v2pro (ascendc::LoadData3DL0V2ProOp)

Call AscendC::LoadData function

Syntax:

operation ::= `ascendc.load_data_3d_l0_v2pro` operands attr-dict `:` qualified(type(operands))

Perform 3D LoadData V2Pro between LocalTensor and LocalTensor

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

loadDataParams

ascendc.load_data_g2l (ascendc::LoadDataG2LOp)

Call AscendC::LoadData function

Syntax:

operation ::= `ascendc.load_data_g2l` operands attr-dict `:` qualified(type(operands))

Perform 2D LoadData from GlobalTensor to LocalTensor

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface, OpWithSrcInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

loadDataParams

ascendc.load_data_g2l_v2 (ascendc::LoadDataG2LV2Op)

Call AscendC::LoadData function

Syntax:

operation ::= `ascendc.load_data_g2l_v2` operands attr-dict `:` qualified(type(operands))

Perform 2D LoadData V2 from GlobalTensor to LocalTensor

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface, OpWithSrcInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

loadDataParams

ascendc.load_data_l0 (ascendc::LoadDataL0Op)

Call AscendC::LoadData function

Syntax:

operation ::= `ascendc.load_data_l0` operands attr-dict `:` qualified(type(operands))

Perform 2D LoadData between LocalTensor and LocalTensor

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

loadDataParams

ascendc.load_data_l0_v2 (ascendc::LoadDataL0V2Op)

Call AscendC::LoadData function

Syntax:

operation ::= `ascendc.load_data_l0_v2` operands attr-dict `:` qualified(type(operands))

Perform 2D LoadData V2 between LocalTensor and LocalTensor

Traits: AscFunc

Interfaces: APIOpInterface, DataCopyOpInterface, OpWithDstInterface, OpWithSrcInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

loadDataParams

ascendc.load_data_with_sparse (ascendc::LoadDataWithSparseOp)

Call AscendC::LoadDataWithSparse function

Syntax:

operation ::= `ascendc.load_data_with_sparse` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

idx

Local tensor from UB

loadDataParam

ascendc.load_data_with_transpose (ascendc::LoadDataWithTransposeOp)

Call AscendC::LoadDataWithTranspose function

Syntax:

operation ::= `ascendc.load_data_with_transpose` operands attr-dict `:` qualified(type(operands))

Perform 2D LoadData with transpose between tensors

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

loadDataParams

ascendc.load_data_with_transpose_v2 (ascendc::LoadDataWithTransposeV2Op)

Call AscendC::LoadDataWithTranspose function

Syntax:

operation ::= `ascendc.load_data_with_transpose_v2` operands attr-dict `:` qualified(type(operands))

Perform 2D LoadData with transpose (V2 params) between tensors

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

base tensor type

src

base tensor type

loadDataParams

ascendc.load_image_to_local (ascendc::LoadImageToLocalOp)

Call AscendC::LoadImageToLocal function

Syntax:

operation ::= `ascendc.load_image_to_local` operands attr-dict `:` qualified(type(operands))

Load image data from Global Memory to LocalTensor (supports TPosition A1/B1).

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

loadDataParams

ascendc.local_mem_allocator (ascendc::LocalMemAllocatorOp)

Instantiate LocalMemAllocator with specified hardware position

Syntax:

operation ::= `ascendc.local_mem_allocator` $hardware attr-dict `:` type($hardware) `,` qualified(type($allocator))

Traits: AscConstructor

Operands:

Operand

Description

hardware

64-bit signless integer

Results:

Result

Description

allocator

Represents AscendC::LocalMemAllocator

ascendc.local_mem_allocator.alloc (ascendc::LocalMemAllocatorAllocOp)

Call AscendC::LocalMemAllocator::Alloc method with tileSize as template parameter

Syntax:

operation ::= `ascendc.local_mem_allocator.alloc` $allocator `,` $pos `,` $tileSize `,` $dtype attr-dict
              `:` qualified(type($allocator)) `,` type($tileSize) `,` type($result)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
pos::mlir::ascendc::TPositionAttr
queue/buffer position{{% markdown %}}Represents AscendC::TPosition{{% /markdown %}}
dtype::mlir::TypeAttrany type attribute

Operands:

Operand

Description

allocator

Represents AscendC::LocalMemAllocator

tileSize

32-bit signless integer

Results:

Result

Description

result

Local tensor from UB

ascendc.local_mem_allocator.alloc_dynamic (ascendc::LocalMemAllocatorAllocDynamicOp)

Call AscendC::LocalMemAllocator::Alloc method with tileSize as runtime parameter

Syntax:

operation ::= `ascendc.local_mem_allocator.alloc_dynamic` $allocator `,` $pos `,` $tileSize `,` $dtype attr-dict
              `:` qualified(type($allocator)) `,` type($tileSize) `,` type($result)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
pos::mlir::ascendc::TPositionAttr
queue/buffer position{{% markdown %}}Represents AscendC::TPosition{{% /markdown %}}
dtype::mlir::TypeAttrany type attribute

Operands:

Operand

Description

allocator

Represents AscendC::LocalMemAllocator

tileSize

32-bit signless integer

Results:

Result

Description

result

Local tensor from UB

ascendc.local_mem_allocator.get_cur_addr (ascendc::LocalMemAllocatorGetCurAddrOp)

Call AscendC::LocalMemAllocator::GetCurAddr method

Syntax:

operation ::= `ascendc.local_mem_allocator.get_cur_addr` $allocator attr-dict `:` qualified(type($allocator)) `,` type($result)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

allocator

Represents AscendC::LocalMemAllocator

Results:

Result

Description

result

32-bit unsigned integer

ascendc.local_tensor (ascendc::LocalTensorOp)

Instantiate local tensor

Syntax:

operation ::= `ascendc.local_tensor` attr-dict `:` qualified(type($tensor))

Traits: AscConstructor

Results:

Result

Description

tensor

Local tensor from UB

ascendc.local_tensor.bracket (ascendc::LocalTensorBracketOp)

Call AscendC::LocalTensor::operator() method

Syntax:

operation ::= `ascendc.local_tensor.bracket` $tensor `(` $index `)`  attr-dict `:` qualified(type($tensor)) `,`
              type($index) `,` qualified(type($result))

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand

Description

tensor

Local tensor from UB

index

signless integer or index

Results:

Result

Description

result

Local tensor from UB

ascendc.local_tensor.get_length (ascendc::LocalTensorGetLengthOp)

Call AscendC::LocalTensor::GetLength method

Syntax:

operation ::= `ascendc.local_tensor.get_length` $tensor attr-dict `:` qualified(type($tensor)) `,` type($result)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Local tensor from UB

Results:

Result

Description

result

32-bit unsigned integer

ascendc.local_tensor.get_phy_addr (ascendc::LocalTensorGetPhyAddrOp)

Call AscendC::LocalTensor::GetPhyAddr method

Syntax:

operation ::= `ascendc.local_tensor.get_phy_addr` $tensor attr-dict (`,` $offset^)? `:` qualified(type($tensor))
              `,` qualified(type($result)) (`,` type($offset)^)?

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Local tensor from UB

offset

32-bit unsigned integer

Results:

Result

Description

result

any type

ascendc.local_tensor.get_position (ascendc::LocalTensorGetPositionOp)

Call AscendC::LocalTensor::GetPosition method

Syntax:

operation ::= `ascendc.local_tensor.get_position` $tensor attr-dict `:` qualified(type($tensor)) `,` type($result)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Local tensor from UB

Results:

Result

Description

result

32-bit signless integer

ascendc.local_tensor.get_shape_info (ascendc::LocalTensorGetShapeInfoOp)

Call AscendC::LocalTensor::GetShapeInfo method

Syntax:

operation ::= `ascendc.local_tensor.get_shape_info` $tensor attr-dict `:` qualified(type($tensor)) `,` qualified(type($results))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Local tensor from UB

Results:

Result

Description

results

ascendc.local_tensor.get_size (ascendc::LocalTensorGetSizeOp)

Call AscendC::LocalTensor::GetSize method

Syntax:

operation ::= `ascendc.local_tensor.get_size` $tensor attr-dict `:` qualified(type($tensor)) `,` type($result)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Local tensor from UB

Results:

Result

Description

result

signless integer or index

ascendc.local_tensor.get_user_tag (ascendc::LocalTensorGetUserTagOp)

Call AscendC::LocalTensor::GetUserTag method

Syntax:

operation ::= `ascendc.local_tensor.get_user_tag` $tensor attr-dict `:` qualified(type($tensor)) `,` type($result)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Local tensor from UB

Results:

Result

Description

result

signless integer or index

ascendc.local_tensor.get_value (ascendc::LocalTensorGetValueOp)

Call AscendC::LocalTensor::GetValue method

Syntax:

operation ::= `ascendc.local_tensor.get_value` $tensor `,` $index attr-dict `:` qualified(type($tensor)) `,`
              qualified(type($index)) `,` qualified(type($value))

Traits: AscMemberFunc

Interfaces: APIOpInterface, OpWithSrcInterface

Operands:

Operand

Description

tensor

Local tensor from UB

index

any type

Results:

Result

Description

value

any type

ascendc.local_tensor.print (ascendc::LocalTensorPrintOp)

Call AscendC::LocalTensor::Print method

Syntax:

operation ::= `ascendc.local_tensor.print` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Local tensor from UB

len

32-bit unsigned integer

ascendc.local_tensor.set_addr_with_offset (ascendc::LocalTensorSetAddrWithOffsetOp)

Call AscendC::LocalTensor::SetAddrWithOffset method

Syntax:

operation ::= `ascendc.local_tensor.set_addr_with_offset` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Local tensor from UB

src

Local tensor from UB

offset

32-bit unsigned integer

ascendc.local_tensor.set_buffer_len (ascendc::LocalTensorSetBufferLenOp)

Call AscendC::LocalTensor::SetBufferLen method

Syntax:

operation ::= `ascendc.local_tensor.set_buffer_len` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Local tensor from UB

dataLen

32-bit unsigned integer

ascendc.local_tensor.set_shape_info (ascendc::LocalTensorSetShapeInfoOp)

Call AscendC::LocalTensor::SetShapeInfo method

Syntax:

operation ::= `ascendc.local_tensor.set_shape_info` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Local tensor from UB

shapeInfo

ascendc.local_tensor.set_size (ascendc::LocalTensorSetSizeOp)

Call AscendC::LocalTensor::SetSize method

Syntax:

operation ::= `ascendc.local_tensor.set_size` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Local tensor from UB

size

32-bit unsigned integer

ascendc.local_tensor.set_user_tag (ascendc::LocalTensorSetUserTagOp)

Call AscendC::LocalTensor::SetUserTag method

Syntax:

operation ::= `ascendc.local_tensor.set_user_tag` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensor

Local tensor from UB

tag

32-bit signless integer

ascendc.local_tensor.set_value (ascendc::LocalTensorSetValueOp)

Call AscendC::LocalTensor::SetValue method

Syntax:

operation ::= `ascendc.local_tensor.set_value` $tensor `,` $index `,` $value attr-dict `:` qualified(type($tensor)) `,`
              type($index) `,` type($value)

Traits: AscMemberFunc

Interfaces: APIOpInterface, OpWithSrcInterface

Operands:

Operand

Description

tensor

Local tensor from UB

index

any type

value

any type

ascendc.local_tensor.subindex (ascendc::LocalTensorSubIndexOp)

Call AscendC::LocalTensor::operator[] method

Syntax:

operation ::= `ascendc.local_tensor.subindex` $tensor `[` $index `]`  attr-dict `:` qualified(type($tensor)) `,`
              type($index) `,` qualified(type($result))

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand

Description

tensor

Local tensor from UB

index

signless integer or index

Results:

Result

Description

result

Local tensor from UB

ascendc.local_tensor.to_file (ascendc::LocalTensorToFileOp)

Call AscendC::LocalTensor::ToFile method

Syntax:

operation ::= `ascendc.local_tensor.to_file` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
fileName::mlir::StringAttrstring attribute

Operands:

Operand

Description

tensor

Local tensor from UB

ascendc.local_tensor_auto (ascendc::LocalTensorAutoOp)

Create virtual tensor with automatic allocation semantic

Syntax:

operation ::= `ascendc.local_tensor_auto` $position `(` $dynamicShape `)` (`input` $input^)? (`output` $output^)? attr-dict `:`
              type($result)

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
input::mlir::UnitAttrunit attribute
output::mlir::UnitAttrunit attribute
position::mlir::ascendc::TPositionAttr
queue/buffer position{{% markdown %}}Represents AscendC::TPosition{{% /markdown %}}

Operands:

Operand

Description

dynamicShape

variadic of 64-bit signless integer

Results:

Result

Description

result

Local tensor from UB

ascendc.local_tensor_v2 (ascendc::LocalTensorV2Op)

Instantiate local tensor

Syntax:

operation ::= `ascendc.local_tensor_v2` $pos `,` $addr `,` $tileSize attr-dict `:` qualified(type($result))

Attributes:

AttributeMLIR TypeDescription
pos::mlir::ascendc::TPositionAttr
queue/buffer position{{% markdown %}}Represents AscendC::TPosition{{% /markdown %}}

Operands:

Operand

Description

addr

32-bit unsigned integer

tileSize

32-bit unsigned integer

Results:

Result

Description

result

Local tensor from UB

ascendc.local_tensor_v3 (ascendc::LocalTensorV3Op)

Instantiate local tensor

Syntax:

operation ::= `ascendc.local_tensor_v3` $pos `,` $addr `,` $tileSize attr-dict `:` qualified(type($result))

Attributes:

AttributeMLIR TypeDescription
pos::mlir::ascendc::TPositionAttr
queue/buffer position{{% markdown %}}Represents AscendC::TPosition{{% /markdown %}}
addr::mlir::IntegerAttr32-bit signless integer attribute
tileSize::mlir::IntegerAttr32-bit signless integer attribute

Results:

Result

Description

result

Local tensor from UB

ascendc.log (ascendc::LogOp)

Call AscendC::Log function

Syntax:

operation ::= `ascendc.log` operands attr-dict `:` qualified(type(operands))

AscendC::Log is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.log2 (ascendc::Log2Op)

Call AscendC::Log2 function

Syntax:

operation ::= `ascendc.log2` operands attr-dict `:` qualified(type(operands))

AscendC::Log2 is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.matmul.async_get_tensor_c (ascendc::MatmulAsyncGetTensorCOp)

Call AscendC::Matmul::AsyncGetTensorC method

Syntax:

operation ::= `ascendc.matmul.async_get_tensor_c` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

aux

tensor

Local tensor from UB

ascendc.matmul.disable_bias (ascendc::MatmulDisableBiasOp)

Call AscendC::DisableBias function

Syntax:

operation ::= `ascendc.matmul.disable_bias` operands attr-dict `:` qualified(type(operands))

Matmul disable bias flag

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

ascendc.matmul.end (ascendc::MatmulEndOp)

Call AscendC::End function

Syntax:

operation ::= `ascendc.matmul.end` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

ascendc.matmul.get_batch_tensor_c (ascendc::MatmulGetBatchTensorCOp)

Call AscendC::GetBatchTensorC function

Syntax:

operation ::= `ascendc.matmul.get_batch_tensor_c` $matmul `,` $batchA `,` $batchB `,` $sequentialwrite `,` $sync attr-dict `:`
              qualified(type($matmul)) `,` type($batchA) `,` type($batchB) `,` type($sequentialwrite) `,`
              type($sync) `,` qualified(type($result))

Matmul get batch tensor C result

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

batchA

any type

batchB

any type

sequentialwrite

any type

sync

any type

Results:

Result

Description

result

Global tensor from GM (OUT)

ascendc.matmul.get_batch_tensor_c_local_mem (ascendc::MatmulGetBatchTensorCLocalMemOp)

Call AscendC::GetBatchTensorC function

Syntax:

operation ::= `ascendc.matmul.get_batch_tensor_c_local_mem` operands attr-dict `:` qualified(type(operands))

Matmul get batch tensor C result use local memory

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

c

Local tensor from UB

batchA

any type

batchB

any type

sequentialwrite

any type

sync

any type

ascendc.matmul.get_offset_c (ascendc::MatmulGetOffsetCOp)

Call AscendC::Matmul::GetOffsetC method

Syntax:

operation ::= `ascendc.matmul.get_offset_c` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

aux

Results:

Result

Description

result

ascendc.matmul.get_tensor_c (ascendc::MatmulGetTensorCOp)

Call AscendC::GetTensorC function

Syntax:

operation ::= `ascendc.matmul.get_tensor_c` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

tensor

base tensor type

tensor2

base tensor type

atomic

any type

sequentialwrite

any type

sync

any type

ascendc.matmul.get_tensor_c_return (ascendc::MatmulGetTensorCReturnOp)

Call AscendC::GetTensorC function

Syntax:

operation ::= `ascendc.matmul.get_tensor_c_return` $matmul `,` $atomic `,` $sequentialwrite `,` $sync attr-dict `:`
              qualified(type($matmul)) `,` type($atomic) `,` type($sequentialwrite) `,`
              type($sync) `,` qualified(type($result))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

atomic

any type

sequentialwrite

any type

sync

any type

Results:

Result

Description

result

Global tensor from GM (OUT)

ascendc.matmul.init (ascendc::MatmulInitOp)

Call AscendC::Init function

Syntax:

operation ::= `ascendc.matmul.init` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

cubeTiling

pipe

ascendc.matmul.iterate (ascendc::MatmulIterateOp)

Call AscendC::Iterate function

Syntax:

operation ::= `ascendc.matmul.iterate` $matmul `,` $partialsum `,` $sync attr-dict (`,` $localCmaxtrix^)? `:`
              qualified(type($matmul)) `,` type($partialsum) `,` type($sync) (`,` type($localCmaxtrix)^)? `,` type($result)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

partialsum

any type

localCmaxtrix

Local tensor from UB

sync

any type

Results:

Result

Description

result

any type

ascendc.matmul.iterate_all (ascendc::MatmulIterateAllOp)

Call AscendC::IterateAll function

Syntax:

operation ::= `ascendc.matmul.iterate_all` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc, AttrSizedOperandSegments

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

tensor

base tensor type

enAtomic

any type

enSenquentialWrite

any type

waitIterateAll

any type

fakeMsg

any type

sync

any type

ascendc.matmul.iterate_batch (ascendc::MatmulIterateBatchOp)

Call AscendC::IterateBatch function

Syntax:

operation ::= `ascendc.matmul.iterate_batch` operands attr-dict `:` qualified(type(operands))

Matmul iterate batch interface for mix scence

Traits: AscMemberFunc, AttrSizedOperandSegments

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

tensor

base tensor type

batchA

any type

batchB

any type

enSenquentialWrite

any type

maxtrixStrideA

any type

maxtrixStrideB

any type

maxtrixStrideC

any type

enPartialSum

any type

enAtomic

any type

sync

any type

waitIterateBatch

any type

ascendc.matmul.iterate_batch_cube_only (ascendc::MatmulIterateBatchCubeOnlyOp)

Call AscendC::IterateBatch function

Syntax:

operation ::= `ascendc.matmul.iterate_batch_cube_only` operands attr-dict `:` qualified(type(operands))

Matmul iterate batch interface for cube-only scence

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

tensor

base tensor type

enPartialSum

any type

enAtomic

any type

enSenquentialWrite

any type

maxtrixStrideA

any type

maxtrixStrideB

any type

maxtrixStrideC

any type

ascendc.matmul.iterate_n_batch (ascendc::MatmulIterateNBatchOp)

Call AscendC::Matmul::IterateNBatch method

Syntax:

operation ::= `ascendc.matmul.iterate_n_batch` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

aux

batchLoop

any type

batchA

any type

batchB

any type

enSequentialWrite

any type

matrixStrideA

any type

matrixStrideB

any type

matrixStrideC

any type

sync

any type

waitIterateBatch

any type

ascendc.matmul.set_batch_num (ascendc::MatmulSetBatchNumOp)

Call AscendC::Matmul::SetBatchNum method

Syntax:

operation ::= `ascendc.matmul.set_batch_num` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

aux

batchA

any type

batchB

any type

ascendc.matmul.set_bias (ascendc::MatmulSetBiasOp)

Call AscendC::SetBias function

Syntax:

operation ::= `ascendc.matmul.set_bias` operands attr-dict `:` qualified(type(operands))

Matmul set bias tensor

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

tensor

base tensor type

ascendc.matmul.set_hf32 (ascendc::MatmulSetHF32Op)

Call AscendC::Matmul::SetHF32 method

Syntax:

operation ::= `ascendc.matmul.set_hf32` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

aux

enableHF32

any type

transMode

any type

ascendc.matmul.set_org_shape (ascendc::MatmulSetOrgShapeOp)

Call AscendC::Matmul::SetOrgShape method

Syntax:

operation ::= `ascendc.matmul.set_org_shape` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc, AttrSizedOperandSegments

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

orgm

any type

orgn

any type

orgka

any type

orgkb

any type

orgkc

any type

ascendc.matmul.set_quant_scalar (ascendc::MatmulSetQuantScalarOp)

Call AscendC::Matmul::SetQuantScalar method

Syntax:

operation ::= `ascendc.matmul.set_quant_scalar` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

quantscalar

any type

ascendc.matmul.set_quant_vector (ascendc::MatmulSetQuantVectorOp)

Call AscendC::Matmul::SetQuantVector method

Syntax:

operation ::= `ascendc.matmul.set_quant_vector` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

quantvector

Global tensor from GM (OUT)

ascendc.matmul.set_self_define_data (ascendc::MatmulSetSelfDefineDataOp)

Call AscendC::SetSelfDefineData function

Syntax:

operation ::= `ascendc.matmul.set_self_define_data` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

dataPtr

any type

ascendc.matmul.set_single_shape (ascendc::MatmulSetSingleShapeOp)

Call AscendC::Matmul::SetSingleShape method

Syntax:

operation ::= `ascendc.matmul.set_single_shape` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

singlem

any type

singlen

any type

singlek

any type

ascendc.matmul.set_sparse_index (ascendc::MatmulSetSparseIndexOp)

Call AscendC::SetSparseIndex function

Syntax:

operation ::= `ascendc.matmul.set_sparse_index` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

indexGlobal

Global tensor from GM (OUT)

ascendc.matmul.set_tail (ascendc::MatmulSetTailOp)

Call AscendC::Matmul::SetTail method

Syntax:

operation ::= `ascendc.matmul.set_tail` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

aux

tailM

any type

tailN

any type

tailK

any type

ascendc.matmul.set_tensor_a (ascendc::MatmulSetTensorAOp)

Call AscendC::SetTensorA function

Syntax:

operation ::= `ascendc.matmul.set_tensor_a` operands attr-dict `:` qualified(type(operands))

Matmul set left tensor input

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

tensor

base tensor type

transpose

any type

ascendc.matmul.set_tensor_a_scalar (ascendc::MatmulSetTensorAScalarOp)

Call AscendC::SetTensorA function

Syntax:

operation ::= `ascendc.matmul.set_tensor_a_scalar` operands attr-dict `:` qualified(type(operands))

Matmul set left scalar input

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

aScalar

any type

ascendc.matmul.set_tensor_b (ascendc::MatmulSetTensorBOp)

Call AscendC::SetTensorB function

Syntax:

operation ::= `ascendc.matmul.set_tensor_b` operands attr-dict `:` qualified(type(operands))

Matmul set right tensor input

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

tensor

base tensor type

transpose

any type

ascendc.matmul.set_tensor_b_scalar (ascendc::MatmulSetTensorBScalarOp)

Call AscendC::SetTensorB function

Syntax:

operation ::= `ascendc.matmul.set_tensor_b_scalar` operands attr-dict `:` qualified(type(operands))

Matmul set right scalar input

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

bScalar

any type

ascendc.matmul.set_user_def_info (ascendc::MatmulSetUserDefInfoOp)

Call AscendC::SetUserDefInfo function

Syntax:

operation ::= `ascendc.matmul.set_user_def_info` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

tilingPtr

memref of any type values

ascendc.matmul.set_workspace (ascendc::MatmulSetWorkspaceOp)

Call AscendC::Matmul::SetWorkspace method

Syntax:

operation ::= `ascendc.matmul.set_workspace` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

aux

tensor

any type

size

any type

ascendc.matmul.wait_get_tensor_c (ascendc::MatmulWaitGetTensorCOp)

Call AscendC::Matmul::WaitGetTensorC method

Syntax:

operation ::= `ascendc.matmul.wait_get_tensor_c` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

aux

ascendc.matmul.wait_iterate_all (ascendc::MatmulWaitIterateAllOp)

Call AscendC::WaitIterateAll function

Syntax:

operation ::= `ascendc.matmul.wait_iterate_all` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

ascendc.matmul.wait_iterate_batch (ascendc::MatmulWaitIterateBatchOp)

Call AscendC::WaitIterateBatch function

Syntax:

operation ::= `ascendc.matmul.wait_iterate_batch` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

matmul

ascendc.max_l0 (ascendc::MaxL0Op)

Call AscendC::Max function

Syntax:

operation ::= `ascendc.max_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Max is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.max_l1 (ascendc::MaxL1Op)

Call AscendC::Max function

Syntax:

operation ::= `ascendc.max_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Max is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.max_l2 (ascendc::MaxL2Op)

Call AscendC::Max function

Syntax:

operation ::= `ascendc.max_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Max is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.maxs_l0 (ascendc::MaxsL0Op)

Call AscendC::Maxs function

Syntax:

operation ::= `ascendc.maxs_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Maxs is a vector-scalar operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL0OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.maxs_l1 (ascendc::MaxsL1Op)

Call AscendC::Maxs function

Syntax:

operation ::= `ascendc.maxs_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Maxs is a vector-scalar operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.maxs_l2 (ascendc::MaxsL2Op)

Call AscendC::Maxs function

Syntax:

operation ::= `ascendc.maxs_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Maxs is a vector-scalar operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL2OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

calCount

any type

ascendc.metrics_prof_start (ascendc::MetricsProfStartOp)

Call AscendC::MetricsProfStart function

Syntax:

operation ::= `ascendc.metrics_prof_start` attr-dict

Start performance metrics collection for a code region; pair with MetricsProfStop.

Traits: AscFunc

Interfaces: APIOpInterface

ascendc.metrics_prof_stop (ascendc::MetricsProfStopOp)

Call AscendC::MetricsProfStop function

Syntax:

operation ::= `ascendc.metrics_prof_stop` attr-dict

Stop performance metrics collection started by MetricsProfStart.

Traits: AscFunc

Interfaces: APIOpInterface

ascendc.min_l0 (ascendc::MinL0Op)

Call AscendC::Min function

Syntax:

operation ::= `ascendc.min_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Min is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.min_l1 (ascendc::MinL1Op)

Call AscendC::Min function

Syntax:

operation ::= `ascendc.min_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Min is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.min_l2 (ascendc::MinL2Op)

Call AscendC::Min function

Syntax:

operation ::= `ascendc.min_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Min is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.mins_l0 (ascendc::MinsL0Op)

Call AscendC::Mins function

Syntax:

operation ::= `ascendc.mins_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Mins is a vector-scalar operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL0OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.mins_l1 (ascendc::MinsL1Op)

Call AscendC::Mins function

Syntax:

operation ::= `ascendc.mins_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Mins is a vector-scalar operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.mins_l2 (ascendc::MinsL2Op)

Call AscendC::Mins function

Syntax:

operation ::= `ascendc.mins_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Mins is a vector-scalar operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL2OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

calCount

any type

ascendc.mmad (ascendc::MmadOp)

Call AscendC::Mmad function

Syntax:

operation ::= `ascendc.mmad` operands attr-dict `:` qualified(type(operands))

Matrix multiply-accumulate between LocalTensors (dst += fm * filter)

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface

Operands:

Operand

Description

dst

base tensor type

fm

base tensor type

filter

base tensor type

mmadParams

ascendc.mmad_with_bias (ascendc::MmadWithBiasOp)

Call AscendC::Mmad function

Syntax:

operation ::= `ascendc.mmad_with_bias` operands attr-dict `:` qualified(type(operands))

Matrix multiply-accumulate with bias (dst += fm * filter + bias)

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

base tensor type

fm

base tensor type

filter

base tensor type

bias

base tensor type

mmadParams

ascendc.mmad_with_sparse (ascendc::MmadWithSparseOp)

Call AscendC::MmadWithSparse function

Syntax:

operation ::= `ascendc.mmad_with_sparse` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

fm

Local tensor from UB

filter

Local tensor from UB

mmadParams

ascendc.mrg_sort (ascendc::MrgSortOp)

Call AscendC::MrgSort method

Syntax:

operation ::= `ascendc.mrg_sort` operands attr-dict `:` qualified(type(operands))

AscendC::MrgSort merges sorted queues into one queue.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
isExhaustedSuspension::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

sortList

elementCountList

variadic of 16-bit unsigned integer

sortedNum

variadic of 32-bit unsigned integer

validBit

any type

repeatTime

any type

ascendc.mrg_sort4 (ascendc::MrgSort4Op)

Call AscendC::MrgSort4 method

Syntax:

operation ::= `ascendc.mrg_sort4` operands attr-dict `:` qualified(type(operands))

AscendC::MrgSort4 merges sorted Region Proposals queues into one queue.

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

any type

src

params

ascendc.mrg_sort_src_list (ascendc::MrgSortSrcListOp)

Instantiate MrgSortSrcList

Syntax:

operation ::= `ascendc.mrg_sort_src_list` attr-dict `:` qualified(type($params))

Traits: AscConstructor

Results:

Result

Description

params

ascendc.mrg_sort_with_info (ascendc::MrgSortWithInfoOp)

Call AscendC::MrgSort method with MrgSort4Info parameter

Syntax:

operation ::= `ascendc.mrg_sort_with_info` operands attr-dict `:` qualified(type(operands))

AscendC::MrgSort merges sorted queues into one queue using MrgSort4Info parameter.

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

any type

src

params

ascendc.mul_add_dst_l0 (ascendc::MulAddDstL0Op)

Call AscendC::MulAddDst function

Syntax:

operation ::= `ascendc.mul_add_dst_l0` operands attr-dict `:` qualified(type(operands))

AscendC::MulAddDst is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.mul_add_dst_l1 (ascendc::MulAddDstL1Op)

Call AscendC::MulAddDst function

Syntax:

operation ::= `ascendc.mul_add_dst_l1` operands attr-dict `:` qualified(type(operands))

AscendC::MulAddDst is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.mul_add_dst_l2 (ascendc::MulAddDstL2Op)

Call AscendC::MulAddDst function

Syntax:

operation ::= `ascendc.mul_add_dst_l2` operands attr-dict `:` qualified(type(operands))

AscendC::MulAddDst is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.mul_cast_l0 (ascendc::MulCastL0Op)

Call AscendC::MulCast function

Syntax:

operation ::= `ascendc.mul_cast_l0` operands attr-dict `:` qualified(type(operands))

AscendC::MulCast is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.mul_cast_l1 (ascendc::MulCastL1Op)

Call AscendC::MulCast function

Syntax:

operation ::= `ascendc.mul_cast_l1` operands attr-dict `:` qualified(type(operands))

AscendC::MulCast is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.mul_cast_l2 (ascendc::MulCastL2Op)

Call AscendC::MulCast function

Syntax:

operation ::= `ascendc.mul_cast_l2` operands attr-dict `:` qualified(type(operands))

AscendC::MulCast is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.mul_l0 (ascendc::MulL0Op)

Call AscendC::Mul function

Syntax:

operation ::= `ascendc.mul_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Mul is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.mul_l1 (ascendc::MulL1Op)

Call AscendC::Mul function

Syntax:

operation ::= `ascendc.mul_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Mul is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.mul_l2 (ascendc::MulL2Op)

Call AscendC::Mul function

Syntax:

operation ::= `ascendc.mul_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Mul is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.mul_l3 (ascendc::MulL3Op)

Call LocalTensor::operator* method

Syntax:

operation ::= `ascendc.mul_l3` operands attr-dict `:` qualified(type(operands))

LocalTensor::operator* performs a vector binary operation (L3 API).

Interfaces: APIOpInterface, BinaryL3OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

ascendc.muls_l0 (ascendc::MulsL0Op)

Call AscendC::Muls function

Syntax:

operation ::= `ascendc.muls_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Muls is a vector-scalar operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL0OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.muls_l1 (ascendc::MulsL1Op)

Call AscendC::Muls function

Syntax:

operation ::= `ascendc.muls_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Muls is a vector-scalar operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.muls_l2 (ascendc::MulsL2Op)

Call AscendC::Muls function

Syntax:

operation ::= `ascendc.muls_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Muls is a vector-scalar operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL2OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

calCount

any type

ascendc.neg_l2 (ascendc::NegL2Op)

Call AscendC::Neg function

Syntax:

operation ::= `ascendc.neg_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Neg is a vector unary operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL2OpInterface, UnaryOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src

any type

calCount

any type

ascendc.noop (ascendc::NoOp)

Noop

Syntax:

operation ::= `ascendc.noop` attr-dict

ascendc.not_l0 (ascendc::NotL0Op)

Call AscendC::Not function

Syntax:

operation ::= `ascendc.not_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Not is a vector unary operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL0OpInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.not_l1 (ascendc::NotL1Op)

Call AscendC::Not function

Syntax:

operation ::= `ascendc.not_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Not is a vector unary operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.not_l2 (ascendc::NotL2Op)

Call AscendC::Not function

Syntax:

operation ::= `ascendc.not_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Not is a vector unary operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL2OpInterface, UnaryOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src

any type

calCount

any type

ascendc.notify_next_block (ascendc::NotifyNextBlockOp)

Notify the next core that the current core’s operation is complete.

Syntax:

operation ::= `ascendc.notify_next_block` $gmWorkspace `,` $ubWorkspace attr-dict `:` type($gmWorkspace) `,` type($ubWorkspace)

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

gmWorkspace

Global tensor from GM (OUT)

ubWorkspace

Local tensor from UB

ascendc.or_l0 (ascendc::OrL0Op)

Call AscendC::Or function

Syntax:

operation ::= `ascendc.or_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Or is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.or_l1 (ascendc::OrL1Op)

Call AscendC::Or function

Syntax:

operation ::= `ascendc.or_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Or is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.or_l2 (ascendc::OrL2Op)

Call AscendC::Or function

Syntax:

operation ::= `ascendc.or_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Or is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.pair_reduce_sum_l0 (ascendc::PairReduceSumL0Op)

Call AscendC::PairReduceSum function

Syntax:

operation ::= `ascendc.pair_reduce_sum_l0` operands attr-dict `:` qualified(type(operands))

Pair reduce sum operation with continuous mask (L0 API)

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

repeatTime

any type

mask

any type

dstRepStride

any type

srcBlkStride

any type

srcRepStride

any type

ascendc.pair_reduce_sum_l1 (ascendc::PairReduceSumL1Op)

Call AscendC::PairReduceSum function

Syntax:

operation ::= `ascendc.pair_reduce_sum_l1` operands attr-dict `:` qualified(type(operands))

Pair reduce sum operation with bit mask (L1 API)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

repeatTime

any type

mask

variadic of 64-bit unsigned integer

dstRepStride

any type

srcBlkStride

any type

srcRepStride

any type

ascendc.pipe (ascendc::PipeOp)

Instantiate pipe

Syntax:

operation ::= `ascendc.pipe` attr-dict

Traits: AscConstructor

Results:

Result

Description

pipe

ascendc.pipe.alloc_event_id (ascendc::TPipeAllocEventIDOp)

TPipe AllocEventID

Syntax:

operation ::= `ascendc.pipe.alloc_event_id` $pipe `,` $event  attr-dict `:` type($event_id)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
event::mlir::ascendc::HardEventAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35{{% markdown %}}Represents AscendC::HardEvent{{% /markdown %}}

Operands:

Operand

Description

pipe

Results:

Result

Description

event_id

signless integer or index

ascendc.pipe.destroy (ascendc::TPipeTQueBindDestroyOp)

TPipe Destroy

Syntax:

operation ::= `ascendc.pipe.destroy` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

pipe

ascendc.pipe.fetch_event_id (ascendc::TPipeFetchEventIDOp)

TPipe FetchEventID

Syntax:

operation ::= `ascendc.pipe.fetch_event_id` $pipe `,` $event  attr-dict `:` type($event_id)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
event::mlir::ascendc::HardEventAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35{{% markdown %}}Represents AscendC::HardEvent{{% /markdown %}}

Operands:

Operand

Description

pipe

Results:

Result

Description

event_id

signless integer or index

ascendc.pipe.get_base_addr (ascendc::TPipeGetBaseAddrOp)

TPipe GetBaseAddr

Syntax:

operation ::= `ascendc.pipe.get_base_addr` $pipe `,` $logicPos  attr-dict `:` type($value)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
logicPos::mlir::ascendc::TPositionAttr
queue/buffer position{{% markdown %}}Represents AscendC::TPosition{{% /markdown %}}

Operands:

Operand

Description

pipe

Results:

Result

Description

value

any type

ascendc.pipe.init (ascendc::TPipeInitOp)

TPipe Initialize

Syntax:

operation ::= `ascendc.pipe.init` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

pipe

ascendc.pipe.init_buf_pool (ascendc::TPipeInitBufPoolOp)

TPipe InitBufPool

Syntax:

operation ::= `ascendc.pipe.init_buf_pool` `(` $pipe `,` $bufPool `,` $len `)`
              attr-dict (` ` `,` ` ` $shareBuf^)?
              `:` type($pipe) `,` type($bufPool) `,` type($len)
              (` ` `,` ` ` type($shareBuf)^)? `->` type($value)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

pipe

bufPool

any type

len

any type

shareBuf

any type

Results:

Result

Description

value

any type

ascendc.pipe.init_buffer (ascendc::TPipeInitBufferOp)

Initialize raw buffer

Syntax:

operation ::= `ascendc.pipe.init_buffer` $pipe `,` $buffer `,` $length attr-dict `:` qualified(type($buffer)) `,`
              type($length)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

pipe

buffer

length

any type

ascendc.pipe.init_queue (ascendc::TPipeInitQueueOp)

Initialize queue

Syntax:

operation ::= `ascendc.pipe.init_queue` $pipe `,` $queue `,` $num `,` $length attr-dict `:` qualified(type($queue))
              `,` type($num) `,` type($length)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

pipe

queue

base queue type

num

any type

length

any type

ascendc.pipe.release_event_id (ascendc::TPipeReleaseEventIDOp)

TPipe ReleaseEventID

Syntax:

operation ::= `ascendc.pipe.release_event_id` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
event::mlir::ascendc::HardEventAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35{{% markdown %}}Represents AscendC::HardEvent{{% /markdown %}}

Operands:

Operand

Description

pipe

id

any type

ascendc.pipe.reset (ascendc::TPipeResetOp)

TPipe Reset

Syntax:

operation ::= `ascendc.pipe.reset` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

pipe

ascendc.pipe_barrier (ascendc::PipeBarrierOp)

Call AscendC::PipeBarrier function

Syntax:

operation ::= `ascendc.pipe_barrier` $pipe attr-dict

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
pipe::mlir::ascendc::PipeAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10{{% markdown %}}Represents pipe_t{{% /markdown %}}

ascendc.pop_stack_buffer (ascendc::PopStackBufferOp)

Call AscendC::PopStackBuffer function

Syntax:

operation ::= `ascendc.pop_stack_buffer` $pos $tensor attr-dict `:` qualified(type($tensor))

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
pos::mlir::ascendc::TPositionAttr
queue/buffer position{{% markdown %}}Represents AscendC::TPosition{{% /markdown %}}

Operands:

Operand

Description

tensor

Local tensor from UB

ascendc.power (ascendc::PowerOp)

Call AscendC::Power function

Syntax:

operation ::= `ascendc.power` operands attr-dict `:` qualified(type(operands))

AscendC::Power is a binary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, BinaryMathOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src0

any type

src1

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.prelu_l2 (ascendc::PreluL2Op)

Call AscendC::Prelu function

Syntax:

operation ::= `ascendc.prelu_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Prelu is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.print_time_stamp (ascendc::PrintTimeStampOp)

Call AscendC::PrintTimeStamp function

Syntax:

operation ::= `ascendc.print_time_stamp` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

descId

any type

ascendc.printf (ascendc::PrintfOp)

Call AscendC::printf function

Syntax:

operation ::= `ascendc.printf` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
desc::mlir::StringAttrstring attribute

Operands:

Operand

Description

vars

variadic of any type

ascendc.proposal_concat (ascendc::ProposalConcatOp)

Call AscendC::ProposalConcat function

Syntax:

operation ::= `ascendc.proposal_concat` operands attr-dict `:` qualified(type(operands))

Merge continuous elements into the corresponding positions within the Region Proposal

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

repeatTime

any type

modeNumber

any type

ascendc.proposal_extract (ascendc::ProposalExtractOp)

Call AscendC::ProposalExtract function

Syntax:

operation ::= `ascendc.proposal_extract` operands attr-dict `:` qualified(type(operands))

Extract the individual elements at the corresponding positions from the Region Proposals and then rearrange them.

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

repeatTime

any type

modeNumber

any type

ascendc.quant (ascendc::QuantOp)

Call AscendC::AscendQuant function

Syntax:

operation ::= `ascendc.quant` operands attr-dict `:` qualified(type(operands))

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, OpWithDstInterface

Attributes:

AttributeMLIR TypeDescription
isReuseSource::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

srcTensor

Local tensor from UB

scale

floating-point

offset

floating-point

calCount

integer

sharedTmpBuffer

Local tensor from UB

config

ascendc.que_bind (ascendc::QueBindOp)

Instantiate QueBind

Syntax:

operation ::= `ascendc.que_bind` attr-dict `:` type($que_bind)

Traits: AscConstructor

Results:

Result

Description

que_bind

ascendc.que_bind.alloc_tensor (ascendc::TQueBindAllocTensorOp)

Allocate tensor on queue wrapped buffer

Syntax:

operation ::= `ascendc.que_bind.alloc_tensor` $queue attr-dict `:` qualified(type($queue)) `,` qualified(type($tensor))

Interfaces: APIOpInterface

Operands:

Operand

Description

queue

base queue type

Results:

Result

Description

tensor

Local tensor from UB

ascendc.que_bind.alloc_tensor_in_place (ascendc::TQueBindAllocTensorInPlaceOp)

Allocate tensor on queue wrapped buffer

Syntax:

operation ::= `ascendc.que_bind.alloc_tensor_in_place` $queue `,` $tensor attr-dict `:` qualified(type($queue)) `,`
              qualified(type($tensor))

Interfaces: APIOpInterface

Operands:

Operand

Description

queue

base queue type

tensor

Local tensor from UB

ascendc.que_bind.deque_tensor (ascendc::TQueBindDequeTensorOp)

Pop tensor out from queue

Syntax:

operation ::= `ascendc.que_bind.deque_tensor` $queue attr-dict `:` qualified(type($queue)) `,` qualified(type($tensor))

Interfaces: APIOpInterface

Operands:

Operand

Description

queue

base queue type

Results:

Result

Description

tensor

Local tensor from UB

ascendc.que_bind.deque_tensor_in_place (ascendc::TQueBindDequeTensorInPlaceOp)

Pop tensor out from queue

Syntax:

operation ::= `ascendc.que_bind.deque_tensor_in_place` $queue `,` $tensor attr-dict `:` qualified(type($queue)) `,`
              qualified(type($tensor))

Interfaces: APIOpInterface

Operands:

Operand

Description

queue

base queue type

tensor

Local tensor from UB

ascendc.que_bind.deque_tensor_pos (ascendc::TQueBindDequeTensorPosOp)

Pop tensor out from queue

Syntax:

operation ::= `ascendc.que_bind.deque_tensor_pos` $queue `,` $srcUserPos `,` $dstUserPos attr-dict `:` qualified(type($queue)) `,`
              qualified(type($tensor))

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
srcUserPos::mlir::ascendc::TPositionAttr
queue/buffer position{{% markdown %}}Represents AscendC::TPosition{{% /markdown %}}
dstUserPos::mlir::ascendc::TPositionAttr
queue/buffer position{{% markdown %}}Represents AscendC::TPosition{{% /markdown %}}

Operands:

Operand

Description

queue

base queue type

Results:

Result

Description

tensor

Local tensor from UB

ascendc.que_bind.destroy (ascendc::TQueBindDestroyOp)

Push tensor back to queue

Syntax:

operation ::= `ascendc.que_bind.destroy` $queue attr-dict `:` qualified(type($queue))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

queue

base queue type

ascendc.que_bind.enque_tensor (ascendc::TQueBindEnqueTensorOp)

Push tensor back to queue

Syntax:

operation ::= `ascendc.que_bind.enque_tensor` $queue `,` $tensor attr-dict `:` qualified(type($queue)) `,`
              qualified(type($tensor))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

queue

base queue type

tensor

Local tensor from UB

ascendc.que_bind.enque_tensor_pos (ascendc::TQueBindEnqueTensorPosOp)

Push tensor back to queue with position

Syntax:

operation ::= `ascendc.que_bind.enque_tensor_pos` $queue `,` $tensor `,` $srcUserPos `,` $dstUserPos attr-dict `:` qualified(type($queue)) `,`
              qualified(type($tensor))

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
srcUserPos::mlir::ascendc::TPositionAttr
queue/buffer position{{% markdown %}}Represents AscendC::TPosition{{% /markdown %}}
dstUserPos::mlir::ascendc::TPositionAttr
queue/buffer position{{% markdown %}}Represents AscendC::TPosition{{% /markdown %}}

Operands:

Operand

Description

queue

base queue type

tensor

Local tensor from UB

ascendc.que_bind.free_tensor (ascendc::TQueBindFreeTensorOp)

Release buffer held by tensor

Syntax:

operation ::= `ascendc.que_bind.free_tensor` $queue `,` $tensor attr-dict `:` qualified(type($queue)) `,`
              qualified(type($tensor))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

queue

base queue type

tensor

Local tensor from UB

ascendc.que_bind.get_tensor_count_in_que (ascendc::TQueBindGetTensorCountInQueOp)

GetTensorCountInQue

Syntax:

operation ::= `ascendc.que_bind.get_tensor_count_in_que` $queue  attr-dict `:` qualified(type($queue)) `,` type($value)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

queue

base queue type

Results:

Result

Description

value

any type

ascendc.que_bind.has_idle_buffer (ascendc::TQueBindHasIdleBufferOp)

HasIdleBuffer

Syntax:

operation ::= `ascendc.que_bind.has_idle_buffer` $queue  attr-dict `:` qualified(type($queue)) `,` type($value)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

queue

base queue type

Results:

Result

Description

value

any type

ascendc.que_bind.has_tensor_in_que (ascendc::TQueBindHasTensorInQueOp)

TQueBind HasTensorInQue

Syntax:

operation ::= `ascendc.que_bind.has_tensor_in_que` $queue  attr-dict `:` qualified(type($queue)) `,` type($value)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

queue

base queue type

Results:

Result

Description

value

any type

ascendc.que_bind.init_buf_handle (ascendc::TQueBindInitBufHandleOp)

TQueBind InitBufHandle

Syntax:

operation ::= `ascendc.que_bind.init_buf_handle` $queue `,` $bufPool `,` $index `,` $bufhandle `,` $curPoolAddr `,` $len attr-dict `:`
              qualified(type($queue)) `,` qualified(type($bufPool)) `,` qualified(type($index)) `,`
              qualified(type($bufhandle)) `,` qualified(type($curPoolAddr)) `,` qualified(type($len))

Interfaces: APIOpInterface

Operands:

Operand

Description

queue

base queue type

bufPool

any type

index

32-bit unsigned integer

bufhandle

any type

curPoolAddr

32-bit signless integer

len

32-bit unsigned integer

ascendc.que_bind.init_start_buf_handle (ascendc::TQueBindInitStartBufHandleOp)

TQueBind InitStartBufHandle

Syntax:

operation ::= `ascendc.que_bind.init_start_buf_handle` $queue `,` $startBufhandle `,` $num `,` $len attr-dict `:` qualified(type($queue)) `,`
              qualified(type($startBufhandle)) `,` qualified(type($num)) `,` qualified(type($len))

Interfaces: APIOpInterface

Operands:

Operand

Description

queue

base queue type

startBufhandle

any type

num

8-bit unsigned integer

len

32-bit unsigned integer

ascendc.que_bind.vacant_in_que (ascendc::TQueBindVacantInQueOp)

VacantInQue

Syntax:

operation ::= `ascendc.que_bind.vacant_in_que` $queue  attr-dict `:` qualified(type($queue)) `,` type($value)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

queue

base queue type

Results:

Result

Description

value

any type

ascendc.queue (ascendc::QueueOp)

Instantiate queue

Syntax:

operation ::= `ascendc.queue` attr-dict `:` type($queue)

Traits: AscConstructor

Results:

Result

Description

queue

ascendc.reciprocal_l0 (ascendc::ReciprocalL0Op)

Call AscendC::Reciprocal function

Syntax:

operation ::= `ascendc.reciprocal_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Reciprocal is a vector unary operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL0OpInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.reciprocal_l1 (ascendc::ReciprocalL1Op)

Call AscendC::Reciprocal function

Syntax:

operation ::= `ascendc.reciprocal_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Reciprocal is a vector unary operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.reciprocal_l2 (ascendc::ReciprocalL2Op)

Call AscendC::Reciprocal function

Syntax:

operation ::= `ascendc.reciprocal_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Reciprocal is a vector unary operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL2OpInterface, UnaryOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src

any type

calCount

any type

ascendc.reduce_max (ascendc::ReduceMaxOp)

Call AscendC::ReduceMax function

Syntax:

operation ::= `ascendc.reduce_max` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, ReduceOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
pattern::mlir::ascendc::ReducePatternAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15{{% markdown %}}Describes reduction pattern from reduce_common.h{{% /markdown %}}

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

srcShape

variadic of 32-bit signless integer

ascendc.reduce_max_l0 (ascendc::ReduceMaxL0Op)

Call AscendC::ReduceMax function

Syntax:

operation ::= `ascendc.reduce_max_l0` operands attr-dict `:` qualified(type(operands))

Reduce maximum elements (L0 API).

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

mask

any type

repeatTime

any type

srcRepStride

any type

calIndex

any type

ascendc.reduce_max_l1 (ascendc::ReduceMaxL1Op)

Call AscendC::ReduceMax function

Syntax:

operation ::= `ascendc.reduce_max_l1` operands attr-dict `:` qualified(type(operands))

Reduce maximum elements (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

mask

variadic of any type

repeatTime

any type

srcRepStride

any type

calIndex

any type

ascendc.reduce_max_l2 (ascendc::ReduceMaxL2Op)

Call AscendC::ReduceMax function

Syntax:

operation ::= `ascendc.reduce_max_l2` operands attr-dict `:` qualified(type(operands))

Reduce maximum elements (L2 API).

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

count

any type

calIndex

any type

ascendc.reduce_min (ascendc::ReduceMinOp)

Call AscendC::ReduceMin function

Syntax:

operation ::= `ascendc.reduce_min` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, ReduceOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
pattern::mlir::ascendc::ReducePatternAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15{{% markdown %}}Describes reduction pattern from reduce_common.h{{% /markdown %}}

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

srcShape

variadic of 32-bit signless integer

ascendc.reduce_min_l0 (ascendc::ReduceMinL0Op)

Call AscendC::ReduceMin function

Syntax:

operation ::= `ascendc.reduce_min_l0` operands attr-dict `:` qualified(type(operands))

Reduce minimum elements (L0 API).

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

mask

any type

repeatTime

any type

srcRepStride

any type

calIndex

any type

ascendc.reduce_min_l1 (ascendc::ReduceMinL1Op)

Call AscendC::ReduceMin function

Syntax:

operation ::= `ascendc.reduce_min_l1` operands attr-dict `:` qualified(type(operands))

Reduce minimum elements (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

mask

variadic of any type

repeatTime

any type

srcRepStride

any type

calIndex

any type

ascendc.reduce_min_l2 (ascendc::ReduceMinL2Op)

Call AscendC::ReduceMin function

Syntax:

operation ::= `ascendc.reduce_min_l2` operands attr-dict `:` qualified(type(operands))

Reduce minimum elements (L2 API).

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

count

any type

calIndex

any type

ascendc.reduce_prod (ascendc::ReduceProdOp)

Call AscendC::ReduceProd function

Syntax:

operation ::= `ascendc.reduce_prod` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, ReduceOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
pattern::mlir::ascendc::ReducePatternAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15{{% markdown %}}Describes reduction pattern from reduce_common.h{{% /markdown %}}

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

srcShape

variadic of 32-bit signless integer

ascendc.reduce_sum (ascendc::ReduceSumOp)

Call AscendC::ReduceSum function

Syntax:

operation ::= `ascendc.reduce_sum` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, ReduceOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
pattern::mlir::ascendc::ReducePatternAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15{{% markdown %}}Describes reduction pattern from reduce_common.h{{% /markdown %}}

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

srcShape

variadic of 32-bit signless integer

ascendc.reduce_sum_l0 (ascendc::ReduceSumL0Op)

Call AscendC::ReduceSum function

Syntax:

operation ::= `ascendc.reduce_sum_l0` operands attr-dict `:` qualified(type(operands))

Reduce sum elements (L0 API, int32_t mask).

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

mask

any type

repeatTime

any type

srcRepStride

any type

ascendc.reduce_sum_l1 (ascendc::ReduceSumL1Op)

Call AscendC::ReduceSum function

Syntax:

operation ::= `ascendc.reduce_sum_l1` operands attr-dict `:` qualified(type(operands))

Reduce sum elements (L1 API, uint64_t[] mask).

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

mask

variadic of any type

repeatTime

any type

srcRepStride

any type

ascendc.reduce_sum_l2 (ascendc::ReduceSumL2Op)

Call AscendC::ReduceSum function

Syntax:

operation ::= `ascendc.reduce_sum_l2` operands attr-dict `:` qualified(type(operands))

Reduce sum elements (L2 API, int32_t count).

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

count

any type

ascendc.regist_matmul_obj (ascendc::RegistMatmulObjOp)

Call AscendC::REGIST_MATMUL_OBJ function

Syntax:

operation ::= `ascendc.regist_matmul_obj` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Operands:

Operand

Description

pipe

workspace

any type

matmul

tiling

ascendc.reinterpret_cast (ascendc::LocalTensorReinterpretCastOp)

Call AscendC::LocalTensor::ReinterpretCast method

Syntax:

operation ::= `ascendc.reinterpret_cast` $in attr-dict `:` qualified(type($in)) `to` qualified(type($out))

Traits: AlwaysSpeculatableImplTrait

Interfaces: APIOpInterface, CastOpInterface, ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand

Description

in

Local tensor from UB

Results:

Result

Description

out

Local tensor from UB

ascendc.relu_l0 (ascendc::ReluL0Op)

Call AscendC::Relu function

Syntax:

operation ::= `ascendc.relu_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Relu is a vector unary operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL0OpInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.relu_l1 (ascendc::ReluL1Op)

Call AscendC::Relu function

Syntax:

operation ::= `ascendc.relu_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Relu is a vector unary operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.relu_l2 (ascendc::ReluL2Op)

Call AscendC::Relu function

Syntax:

operation ::= `ascendc.relu_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Relu is a vector unary operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL2OpInterface, UnaryOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src

any type

calCount

any type

ascendc.repeat_reduce_sum_l0 (ascendc::RepeatReduceSumL0Op)

Call AscendC::RepeatReduceSum function

Syntax:

operation ::= `ascendc.repeat_reduce_sum_l0` operands attr-dict `:` qualified(type(operands))

Repeat reduce sum operation (L0 API)

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

repeatTime

any type

mask

any type

dstBlkStride

any type

srcBlkStride

any type

dstRepStride

any type

srcRepStride

any type

ascendc.reset_mask (ascendc::ResetMaskOp)

Reset mask

Syntax:

operation ::= `ascendc.reset_mask` attr-dict

Traits: AscFunc

Interfaces: APIOpInterface

ascendc.rls_buf (ascendc::RlsBufOp)

Call AscendC::rls_buf function

Syntax:

operation ::= `ascendc.rls_buf` $pipe `,` $bufId attr-dict

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
pipe::mlir::ascendc::PipeAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10{{% markdown %}}Represents pipe_t{{% /markdown %}}
bufId::mlir::IntegerAttr32-bit signless integer attribute
mode::mlir::UnitAttrunit attribute

ascendc.rmsnorm (ascendc::RmsNormOp)

Call AscendC::RmsNorm function

Syntax:

operation ::= `ascendc.rmsnorm` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
basicBlock::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

gamma

Local tensor from UB

epsilon

any type

tiling

sharedTmpBuffer

Local tensor from UB

ascendc.round (ascendc::RoundOp)

Call AscendC::Round function

Syntax:

operation ::= `ascendc.round` operands attr-dict `:` qualified(type(operands))

AscendC::Round is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.rp_sort16 (ascendc::RpSort16Op)

Call AscendC::RpSort16 method

Syntax:

operation ::= `ascendc.rp_sort16` operands attr-dict `:` qualified(type(operands))

AscendC::RpSort16 sorts Region Proposals by score field (higher scores first), 16 proposals at a time.

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

any type

src

any type

repeatTime

any type

ascendc.rsqrt_l0 (ascendc::RsqrtL0Op)

Call AscendC::Rsqrt function

Syntax:

operation ::= `ascendc.rsqrt_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Rsqrt is a vector unary operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL0OpInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.rsqrt_l1 (ascendc::RsqrtL1Op)

Call AscendC::Rsqrt function

Syntax:

operation ::= `ascendc.rsqrt_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Rsqrt is a vector unary operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.rsqrt_l2 (ascendc::RsqrtL2Op)

Call AscendC::Rsqrt function

Syntax:

operation ::= `ascendc.rsqrt_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Rsqrt is a vector unary operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL2OpInterface, UnaryOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src

any type

calCount

any type

ascendc.scalar_cast (ascendc::ScalarCastOp)

Call AscendC::ScalarCast function

Syntax:

operation ::= `ascendc.scalar_cast` $valueIn attr-dict `:` type($valueIn) `->` type($valueOut)

Convert the data type of a scalar value.

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
dtype::mlir::TypeAttrany type attribute
roundMode::mlir::ascendc::RoundModeAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6{{% markdown %}}Represents AscendC::RoundMode{{% /markdown %}}

Operands:

Operand

Description

valueIn

any type

Results:

Result

Description

valueOut

any type

ascendc.scalar_count_leading_zero (ascendc::ScalarCountLeadingZeroOp)

Call AscendC::ScalarCountLeadingZero function

Syntax:

operation ::= `ascendc.scalar_count_leading_zero` operands attr-dict `:` qualified(type(operands)) `->` type($count)

Count the number of leading zeros in a uint64_t value. Returns the count of leading zeros from MSB to the first 1.

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

valueIn

64-bit unsigned integer

Results:

Result

Description

count

64-bit signless integer

ascendc.scalar_get_count_of_value (ascendc::ScalarGetCountOfValueOp)

Call AscendC::ScalarGetCountOfValue function

Syntax:

operation ::= `ascendc.scalar_get_count_of_value` operands attr-dict `:` qualified(type(operands)) `->` type($count)

Count the number of 0 or 1 bits in a uint64_t value. Returns the count of specified bit value.

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

valueIn

64-bit unsigned integer

countValue

32-bit signless integer

Results:

Result

Description

count

64-bit signless integer

ascendc.scalar_get_sff_value (ascendc::ScalarGetSFFValueOp)

Call AscendC::ScalarGetSFFValue function

Syntax:

operation ::= `ascendc.scalar_get_sff_value` operands attr-dict `:` qualified(type(operands)) `->` type($position)

Get the position of the first 0 or 1 (from LSB) in a uint64_t value. Returns -1 if not found.

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

valueIn

64-bit unsigned integer

countValue

integer

Results:

Result

Description

position

signless integer or index

ascendc.scatter_l0 (ascendc::ScatterL0Op)

Call AscendC::Scatter function

Syntax:

operation ::= `ascendc.scatter_l0` operands attr-dict `:` qualified(type(operands))

Scatter elements from source tensor to destination tensor (L0 API).

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

dstOffset

Local tensor from UB

dstBase

any type

mask

any type

repeatTimes

any type

srcRepStride

any type

ascendc.scatter_l1 (ascendc::ScatterL1Op)

Call AscendC::Scatter function

Syntax:

operation ::= `ascendc.scatter_l1` operands attr-dict `:` qualified(type(operands))

Scatter elements from source tensor to destination tensor (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

dstOffset

Local tensor from UB

dstBase

any type

mask

variadic of any type

repeatTimes

any type

srcRepStride

any type

ascendc.scatter_l2 (ascendc::ScatterL2Op)

Call AscendC::Scatter function

Syntax:

operation ::= `ascendc.scatter_l2` operands attr-dict `:` qualified(type(operands))

Scatter elements from source tensor to destination tensor (L2 API).

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

dstOffset

Local tensor from UB

dstBase

any type

count

any type

ascendc.select_l0 (ascendc::SelectL0Op)

Call AscendC::Select function

Syntax:

operation ::= `ascendc.select_l0` operands attr-dict `:` qualified(type(operands))

Select elements from two source tensors (L0 API)

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
selMode::mlir::ascendc::SELMODEAttr
allowed 32-bit signless integer cases: 0, 1, 2{{% markdown %}}Represents AscendC::SELMODE{{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

selMask

Local tensor from UB

src0

Local tensor from UB

src1

Local tensor from UB

mask

any type

repeatTimes

any type

repeatParams

ascendc.select_l1 (ascendc::SelectL1Op)

Call AscendC::Select function

Syntax:

operation ::= `ascendc.select_l1` operands attr-dict `:` qualified(type(operands))

Select elements from two source tensors (L1 API)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
selMode::mlir::ascendc::SELMODEAttr
allowed 32-bit signless integer cases: 0, 1, 2{{% markdown %}}Represents AscendC::SELMODE{{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

selMask

Local tensor from UB

src0

Local tensor from UB

src1

Local tensor from UB

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.select_l2 (ascendc::SelectL2Op)

Call AscendC::Select function

Syntax:

operation ::= `ascendc.select_l2` operands attr-dict `:` qualified(type(operands))

Select elements from two source tensors (L2 API)

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
selMode::mlir::ascendc::SELMODEAttr
allowed 32-bit signless integer cases: 0, 1, 2{{% markdown %}}Represents AscendC::SELMODE{{% /markdown %}}

Operands:

Operand

Description

dst

Local tensor from UB

selMask

Local tensor from UB

src0

Local tensor from UB

src1

Local tensor from UB

calCount

any type

ascendc.select_reg (ascendc::SelectRegOp)

Call AscendC::Select function

Syntax:

operation ::= `ascendc.select_reg` operands attr-dict `:` qualified(type(operands))

Select elements from two source tensors (register mask API)

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
selMode::mlir::ascendc::SELMODEAttr
allowed 32-bit signless integer cases: 0, 1, 2{{% markdown %}}Represents AscendC::SELMODE{{% /markdown %}}

Operands:

Operand

Description

dst

Local tensor from UB

src0

Local tensor from UB

src1

Local tensor from UB

repeatTimes

any type

repeatParams

ascendc.select_scalar_l0 (ascendc::SelectScalarL0Op)

Call AscendC::Select function

Syntax:

operation ::= `ascendc.select_scalar_l0` operands attr-dict `:` qualified(type(operands))

Select elements from source tensor and a scalar (L0 API)

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
selMode::mlir::ascendc::SELMODEAttr
allowed 32-bit signless integer cases: 0, 1, 2{{% markdown %}}Represents AscendC::SELMODE{{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

selMask

Local tensor from UB

src0

Local tensor from UB

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.select_scalar_l1 (ascendc::SelectScalarL1Op)

Call AscendC::Select function

Syntax:

operation ::= `ascendc.select_scalar_l1` operands attr-dict `:` qualified(type(operands))

Select elements from source tensor and a scalar (L1 API)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
selMode::mlir::ascendc::SELMODEAttr
allowed 32-bit signless integer cases: 0, 1, 2{{% markdown %}}Represents AscendC::SELMODE{{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

selMask

Local tensor from UB

src0

Local tensor from UB

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.select_scalar_l2 (ascendc::SelectScalarL2Op)

Call AscendC::Select function

Syntax:

operation ::= `ascendc.select_scalar_l2` operands attr-dict `:` qualified(type(operands))

Select elements from source tensor and a scalar (L2 API)

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
selMode::mlir::ascendc::SELMODEAttr
allowed 32-bit signless integer cases: 0, 1, 2{{% markdown %}}Represents AscendC::SELMODE{{% /markdown %}}

Operands:

Operand

Description

dst

Local tensor from UB

selMask

Local tensor from UB

src0

Local tensor from UB

src1

any type

calCount

any type

ascendc.select_scalar_reg (ascendc::SelectScalarRegOp)

Call AscendC::Select function

Syntax:

operation ::= `ascendc.select_scalar_reg` operands attr-dict `:` qualified(type(operands))

Select elements from source tensor and a scalar (register mask API)

Traits: AscFunc

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

selMask

Local tensor from UB

src0

Local tensor from UB

repeatTimes

any type

repeatParams

ascendc.set_aipp_functions (ascendc::SetAippFunctionsOp)

Call AscendC::SetAippFunctions method for AIPP configuration

Syntax:

operation ::= `ascendc.set_aipp_functions` $src0 (`,` $src1^)? `,` $config `,` `format` `=` $format
              attr-dict
              `:` functional-type(operands, results)

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
format::mlir::ascendc::AippInputFormatAttr
allowed 32-bit signless integer cases: 0, 1, 4, 9{{% markdown %}}Enum cases: * YUV420SP_U8 (`YUV420SP_U8`) * XRGB8888_U8 (`XRGB8888_U8`) * RGB888_U8 (`RGB888_U8`) * YUV400_U8 (`YUV400_U8`){{% /markdown %}}

Operands:

Operand

Description

src0

Global tensor from GM (OUT)

src1

Global tensor from GM (OUT)

config

ascendc.set_atomic_add (ascendc::SetAtomicAddOp)

Enable atomic addition for subsequent data transfers using the specified data type

Syntax:

operation ::= `ascendc.set_atomic_add` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
dtype::mlir::TypeAttrany type attribute

ascendc.set_atomic_max (ascendc::SetAtomicMaxOp)

Enable atomic maximum comparison using the specified data type

Syntax:

operation ::= `ascendc.set_atomic_max` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
dtype::mlir::TypeAttrany type attribute

ascendc.set_atomic_min (ascendc::SetAtomicMinOp)

Enable atomic minimum comparison using the specified data type

Syntax:

operation ::= `ascendc.set_atomic_min` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
dtype::mlir::TypeAttrany type attribute

ascendc.set_atomic_none (ascendc::SetAtomicNoneOp)

Disable all atomic operations for subsequent data transfers

Syntax:

operation ::= `ascendc.set_atomic_none` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

ascendc.set_atomic_type (ascendc::SetAtomicTypeOp)

Set atomic operation data type by template type parameter

Syntax:

operation ::= `ascendc.set_atomic_type` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
dtype::mlir::TypeAttrany type attribute

ascendc.set_cmp_mask (ascendc::SetCmpMaskOp)

Call AscendC::SetCmpMask function

Syntax:

operation ::= `ascendc.set_cmp_mask` operands attr-dict `:` qualified(type(operands))

set register for Select(without mask)

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Operands:

Operand

Description

src

Local tensor from UB

ascendc.set_deq_scale (ascendc::SetDeqScaleOp)

Call AscendC::SetDeqScale function

Syntax:

operation ::= `ascendc.set_deq_scale` $scale attr-dict (`,` $offset^)? (`,` $signMode^)? `:`
              qualified(type($scale)) (`,` type($offset)^)? (`,` type($signMode)^)?

Traits: AscFunc, AttrSizedOperandSegments

Interfaces: APIOpInterface

Operands:

Operand

Description

scale

any type

offset

16-bit signless integer

signMode

any type

ascendc.set_deq_scale_l4 (ascendc::SetDeqScaleL4Op)

Call AscendC::SetDeqScale function

Syntax:

operation ::= `ascendc.set_deq_scale_l4` operands attr-dict `:` qualified(type(operands))

Set dequantization scale, offset and sign mode information

Interfaces: APIOpInterface, VectorOpInterface

Operands:

Operand

Description

vdeq

Local tensor from UB

vdeqInfo

ascendc.set_ffts_base_addr (ascendc::SetFftsBaseAddrOp)

Call AscendC::SetFftsBaseAddr function

Syntax:

operation ::= `ascendc.set_ffts_base_addr` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Operands:

Operand

Description

«unnamed»

memref of any type values

ascendc.set_fixpipe_pre_quant_flag (ascendc::SetFixpipePreQuantFlagOp)

Call AscendC::SetFixpipePreQuantFlag function

Syntax:

operation ::= `ascendc.set_fixpipe_pre_quant_flag` $config attr-dict `:` type($config)

Set scalar quantization parameters in fixpipe quantization process

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

config

any type

ascendc.set_flag (ascendc::SetFlagOp)

Call AscendC::SetFlag function

Syntax:

operation ::= `ascendc.set_flag` $event `,` $eventId attr-dict `:` type($eventId)

Traits: AscFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
event::mlir::ascendc::HardEventAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35{{% markdown %}}Represents AscendC::HardEvent{{% /markdown %}}

Operands:

Operand

Description

eventId

any type

ascendc.set_fmatrix (ascendc::SetFmatrixOp)

Call AscendC::SetFmatrix function

Syntax:

operation ::= `ascendc.set_fmatrix` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

l1H

signless integer or index

l1W

signless integer or index

padList

ranked or unranked memref of any type values

fmatrixMode

ascendc.set_hccl_context (ascendc::SetHcclContextOp)

Call AscendC::SetHcclContext function

Syntax:

operation ::= `ascendc.set_hccl_context` $index `,` $context attr-dict `:` type($index) `,` type($context)

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

index

any type

context

any type

ascendc.set_hf32_mode (ascendc::SetHF32ModeOp)

Set HF32 compute mode

Syntax:

operation ::= `ascendc.set_hf32_mode` $mode attr-dict `:` type($mode)

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

mode

1-bit signless integer

ascendc.set_hf32_trans_mode (ascendc::SetHF32TransModeOp)

Set HF32 transform mode

Syntax:

operation ::= `ascendc.set_hf32_trans_mode` $trans_mode attr-dict `:` type($trans_mode)

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

trans_mode

1-bit signless integer

ascendc.set_load_data_boundary (ascendc::SetLoadDataBoundaryOp)

Call AscendC::SetLoadDataBoundary function

Syntax:

operation ::= `ascendc.set_load_data_boundary` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

value

signless integer or index

ascendc.set_load_data_padding_value (ascendc::SetLoadDataPaddingValueOp)

Call AscendC::SetLoadDataPaddingValue function

Syntax:

operation ::= `ascendc.set_load_data_padding_value` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

padValue

any type

ascendc.set_load_data_repeat (ascendc::SetLoadDataRepeatOp)

Call AscendC::SetLoadDataRepeat function

Syntax:

operation ::= `ascendc.set_load_data_repeat` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

repeatParams

ascendc.set_mask_count (ascendc::SetMaskCountOp)

Set mask count

Syntax:

operation ::= `ascendc.set_mask_count` attr-dict

Traits: AscFunc

Interfaces: APIOpInterface

ascendc.set_mask_norm (ascendc::SetMaskNormOp)

Set mask normalization

Syntax:

operation ::= `ascendc.set_mask_norm` attr-dict

Traits: AscFunc

Interfaces: APIOpInterface

ascendc.set_mm_layout_transform (ascendc::SetMMLayoutTransformOp)

Set MM layout transform mode

Syntax:

operation ::= `ascendc.set_mm_layout_transform` $mm_layout_mode attr-dict `:` type($mm_layout_mode)

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

mm_layout_mode

1-bit signless integer

ascendc.set_pad_value (ascendc::SetPadValueOp)

Call AscendC::SetPadValue function

Syntax:

operation ::= `ascendc.set_pad_value` operands attr-dict `:` qualified(type(operands))

Set padding value for DataCopyPad

Traits: AscFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
pos::mlir::ascendc::TPositionAttr
queue/buffer position{{% markdown %}}Represents AscendC::TPosition{{% /markdown %}}

Operands:

Operand

Description

paddingValue

any type

ascendc.set_store_atomic_config (ascendc::SetStoreAtomicConfigOp)

Set atomic operation enable bit and atomic operation type

Syntax:

operation ::= `ascendc.set_store_atomic_config` $atomicType `,` $atomicOp attr-dict

Configure atomic operation enable bit and atomic operation type

Traits: AscFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
atomicType::mlir::ascendc::AtomicDtypeAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6{{% markdown %}}Represents AscendC::AtomicDtype{{% /markdown %}}
atomicOp::mlir::ascendc::AtomicOpAttr
allowed 32-bit signless integer cases: 0{{% markdown %}}Represents AscendC::AtomicOp{{% /markdown %}}

ascendc.set_sys_workspace (ascendc::SetSysWorkspaceOp)

Call AscendC::SetSysWorkspace function

Syntax:

operation ::= `ascendc.set_sys_workspace` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface

Operands:

Operand

Description

workspace

any type

ascendc.set_vector_mask_l0 (ascendc::SetVectorMaskL0Op)

Set vector mask in continuous mode (L0 API, Normal or Counter mode)

Syntax:

operation ::= `ascendc.set_vector_mask_l0` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
dtype::mlir::TypeAttrany type attribute
mode::mlir::ascendc::MaskModeAttr
allowed 32-bit signless integer cases: 0, 1{{% markdown %}}Represents AscendC::MaskMode{{% /markdown %}}

Operands:

Operand

Description

len

any type

ascendc.set_vector_mask_l1 (ascendc::SetVectorMaskL1Op)

Set vector mask in bit mode (L1 API, Normal or Counter mode)

Syntax:

operation ::= `ascendc.set_vector_mask_l1` operands attr-dict `:` qualified(type(operands))

Interfaces: APIOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
dtype::mlir::TypeAttrany type attribute
mode::mlir::ascendc::MaskModeAttr
allowed 32-bit signless integer cases: 0, 1{{% markdown %}}Represents AscendC::MaskMode{{% /markdown %}}

Operands:

Operand

Description

maskHigh

any type

maskLow

any type

ascendc.shape_info.original_shape (ascendc::ShapeInfoOriginalShapeOp)

Syntax:

operation ::= `ascendc.shape_info.original_shape` $base `,` $dim attr-dict type($dim) `,` type($result)

Operands:

Operand

Description

base

dim

signless integer or index

Results:

Result

Description

result

signless integer or index

ascendc.shape_info.shape (ascendc::ShapeInfoShapeOp)

Syntax:

operation ::= `ascendc.shape_info.shape` $base `,` $dim attr-dict type($dim) `,` type($result)

Operands:

Operand

Description

base

dim

signless integer or index

Results:

Result

Description

result

signless integer or index

ascendc.shift_left_l0 (ascendc::ShiftLeftL0Op)

Call AscendC::ShiftLeft function

Syntax:

operation ::= `ascendc.shift_left_l0` operands attr-dict `:` qualified(type(operands))

AscendC::ShiftLeft is a vector-scalar operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL0OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.shift_left_l1 (ascendc::ShiftLeftL1Op)

Call AscendC::ShiftLeft function

Syntax:

operation ::= `ascendc.shift_left_l1` operands attr-dict `:` qualified(type(operands))

AscendC::ShiftLeft is a vector-scalar operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.shift_left_l2 (ascendc::ShiftLeftL2Op)

Call AscendC::ShiftLeft function

Syntax:

operation ::= `ascendc.shift_left_l2` operands attr-dict `:` qualified(type(operands))

AscendC::ShiftLeft is a vector-scalar operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL2OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

calCount

any type

ascendc.shift_right_l0 (ascendc::ShiftRightL0Op)

Call AscendC::ShiftRight function

Syntax:

operation ::= `ascendc.shift_right_l0` operands attr-dict `:` qualified(type(operands))

AscendC::ShiftRight is a vector-scalar operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL0OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.shift_right_l1 (ascendc::ShiftRightL1Op)

Call AscendC::ShiftRight function

Syntax:

operation ::= `ascendc.shift_right_l1` operands attr-dict `:` qualified(type(operands))

AscendC::ShiftRight is a vector-scalar operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.shift_right_l2 (ascendc::ShiftRightL2Op)

Call AscendC::ShiftRight function

Syntax:

operation ::= `ascendc.shift_right_l2` operands attr-dict `:` qualified(type(operands))

AscendC::ShiftRight is a vector-scalar operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL2OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

calCount

any type

ascendc.sign (ascendc::SignOp)

Call AscendC::Sign function

Syntax:

operation ::= `ascendc.sign` operands attr-dict `:` qualified(type(operands))

AscendC::Sign is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.simple_softmax (ascendc::SimpleSoftMaxOp)

Call AscendC::SimpleSoftMax function

Syntax:

operation ::= `ascendc.simple_softmax` operands attr-dict `:` qualified(type(operands))

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
reuseSource::mlir::UnitAttrunit attribute
basicBlock::mlir::UnitAttrunit attribute
dataFormatNZ::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

sumTensor

Local tensor from UB

maxTensor

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

tiling

softmaxShapeInfo

any type

ascendc.sin (ascendc::SinOp)

Call AscendC::Sin function

Syntax:

operation ::= `ascendc.sin` operands attr-dict `:` qualified(type(operands))

AscendC::Sin is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.sinh (ascendc::SinhOp)

Call AscendC::Sinh function

Syntax:

operation ::= `ascendc.sinh` operands attr-dict `:` qualified(type(operands))

AscendC::Sinh is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.slice_info.subindex (ascendc::SliceInfoSubIndexOp)

Call AscendC::SliceInfo::operator[] method

Syntax:

operation ::= `ascendc.slice_info.subindex` $sliceInfo `[` $index `]`  attr-dict `:` qualified(type($sliceInfo)) `,`
              type($index) `,` qualified(type($result))

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand

Description

sliceInfo

index

signless integer or index

Results:

Result

Description

result

ascendc.softmax (ascendc::SoftMaxOp)

Call AscendC::SoftMax function

Syntax:

operation ::= `ascendc.softmax` operands attr-dict `:` qualified(type(operands))

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
reuseSource::mlir::UnitAttrunit attribute
basicBlock::mlir::UnitAttrunit attribute
dataFormatNZ::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

sumTensor

Local tensor from UB

maxTensor

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

tiling

softmaxShapeInfo

any type

ascendc.sort (ascendc::SortOp)

Call AscendC::Sort method

Syntax:

operation ::= `ascendc.sort` operands attr-dict `:` qualified(type(operands))

AscendC::Sort performs descending sort with different data layouts for different platforms.

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
isFullSort::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

concat

any type

index

any type

tmp

any type

repeatTime

any type

ascendc.sort32 (ascendc::Sort32Op)

Call AscendC::Sort32 method

Syntax:

operation ::= `ascendc.sort32` operands attr-dict `:` qualified(type(operands))

AscendC::Sort32 sorts 32 elements per iteration, storing results as (score, index) pairs.

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

repeatTime

any type

ascendc.sqrt_l0 (ascendc::SqrtL0Op)

Call AscendC::Sqrt function

Syntax:

operation ::= `ascendc.sqrt_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Sqrt is a vector unary operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL0OpInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.sqrt_l1 (ascendc::SqrtL1Op)

Call AscendC::Sqrt function

Syntax:

operation ::= `ascendc.sqrt_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Sqrt is a vector unary operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.sqrt_l2 (ascendc::SqrtL2Op)

Call AscendC::Sqrt function

Syntax:

operation ::= `ascendc.sqrt_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Sqrt is a vector unary operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryL2OpInterface, UnaryOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src

any type

calCount

any type

ascendc.sub_l0 (ascendc::SubL0Op)

Call AscendC::Sub function

Syntax:

operation ::= `ascendc.sub_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Sub is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.sub_l1 (ascendc::SubL1Op)

Call AscendC::Sub function

Syntax:

operation ::= `ascendc.sub_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Sub is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.sub_l2 (ascendc::SubL2Op)

Call AscendC::Sub function

Syntax:

operation ::= `ascendc.sub_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Sub is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.sub_l3 (ascendc::SubL3Op)

Call LocalTensor::operator- method

Syntax:

operation ::= `ascendc.sub_l3` operands attr-dict `:` qualified(type(operands))

LocalTensor::operator- performs a vector binary operation (L3 API).

Interfaces: APIOpInterface, BinaryL3OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

ascendc.sub_relu_cast_l0 (ascendc::SubReluCastL0Op)

Call AscendC::SubReluCast function

Syntax:

operation ::= `ascendc.sub_relu_cast_l0` operands attr-dict `:` qualified(type(operands))

AscendC::SubReluCast is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.sub_relu_cast_l1 (ascendc::SubReluCastL1Op)

Call AscendC::SubReluCast function

Syntax:

operation ::= `ascendc.sub_relu_cast_l1` operands attr-dict `:` qualified(type(operands))

AscendC::SubReluCast is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.sub_relu_cast_l2 (ascendc::SubReluCastL2Op)

Call AscendC::SubReluCast function

Syntax:

operation ::= `ascendc.sub_relu_cast_l2` operands attr-dict `:` qualified(type(operands))

AscendC::SubReluCast is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.sub_relu_l0 (ascendc::SubReluL0Op)

Call AscendC::SubRelu function

Syntax:

operation ::= `ascendc.sub_relu_l0` operands attr-dict `:` qualified(type(operands))

AscendC::SubRelu is a vector binary operation (L0 API).

Interfaces: APIOpInterface, BinaryL0OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.sub_relu_l1 (ascendc::SubReluL1Op)

Call AscendC::SubRelu function

Syntax:

operation ::= `ascendc.sub_relu_l1` operands attr-dict `:` qualified(type(operands))

AscendC::SubRelu is a vector binary operation (L1 API).

Interfaces: APIOpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.sub_relu_l2 (ascendc::SubReluL2Op)

Call AscendC::SubRelu function

Syntax:

operation ::= `ascendc.sub_relu_l2` operands attr-dict `:` qualified(type(operands))

AscendC::SubRelu is a vector binary operation (L2 API).

Interfaces: APIOpInterface, BinaryL2OpInterface, BinaryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

any type

src0

any type

src1

any type

calCount

any type

ascendc.subs_l0 (ascendc::SubsL0Op)

Call AscendC::Subs function

Syntax:

operation ::= `ascendc.subs_l0` operands attr-dict `:` qualified(type(operands))

AscendC::Subs is a vector-scalar operation (L0 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL0OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

any type

repeatTimes

any type

repeatParams

ascendc.subs_l1 (ascendc::SubsL1Op)

Call AscendC::Subs function

Syntax:

operation ::= `ascendc.subs_l1` operands attr-dict `:` qualified(type(operands))

AscendC::Subs is a vector-scalar operation (L1 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

mask

variadic of 64-bit unsigned integer

repeatTimes

any type

repeatParams

ascendc.subs_l2 (ascendc::SubsL2Op)

Call AscendC::Subs function

Syntax:

operation ::= `ascendc.subs_l2` operands attr-dict `:` qualified(type(operands))

AscendC::Subs is a vector-scalar operation (L2 API).

Interfaces: APIOpInterface, OpWithDstInterface, OpWithSrcInterface, VecScalarL2OpInterface, VecScalarOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

any type

src

any type

scalar

any type

calCount

any type

ascendc.sync_all_hard (ascendc::SyncAllHardOp)

Call AscendC::SyncAll function

Syntax:

operation ::= `ascendc.sync_all_hard` attr-dict

Traits: AscFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
isAIVOnly::mlir::UnitAttrunit attribute

ascendc.sync_all_soft (ascendc::SyncAllSoftOp)

Call AscendC::SyncAll function

Syntax:

operation ::= `ascendc.sync_all_soft` operands attr-dict `:` qualified(type(operands))

Traits: AscFunc

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
isAIVOnly::mlir::UnitAttrunit attribute

Operands:

Operand

Description

gmWorkspace

Global tensor from GM (OUT)

ubWorkspace

Local tensor from UB

usedCores

any type

ascendc.tan (ascendc::TanOp)

Call AscendC::Tan function

Syntax:

operation ::= `ascendc.tan` operands attr-dict `:` qualified(type(operands))

AscendC::Tan is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.tanh (ascendc::TanhOp)

Call AscendC::Tanh function

Syntax:

operation ::= `ascendc.tanh` operands attr-dict `:` qualified(type(operands))

AscendC::Tanh is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.tbuf (ascendc::TBufOp)

Instantiate buffer

Syntax:

operation ::= `ascendc.tbuf` attr-dict `:` type($buffer)

Traits: AscConstructor

Results:

Result

Description

buffer

ascendc.tbuf.get_tensor (ascendc::TBufGetTensorOp)

Obtain tensor from initialized buffer

Syntax:

operation ::= `ascendc.tbuf.get_tensor` $buffer attr-dict (`,` $len^)? `:` qualified(type($buffer)) `,` qualified(type($tensor)) (`,` type($len)^)?

Interfaces: APIOpInterface

Operands:

Operand

Description

buffer

len

any type

Results:

Result

Description

tensor

Local tensor from UB

ascendc.tbuf.get_with_offset (ascendc::TBufGetWithOffsetOp)

Obtain tensor from initialized buffer with offset

Syntax:

operation ::= `ascendc.tbuf.get_with_offset` $buffer `,` $size `,` $bufOffset attr-dict `:`
              qualified(type($buffer)) `,` qualified(type($size)) `,` qualified(type($bufOffset)) `,`
              qualified(type($tensor))

Interfaces: APIOpInterface

Operands:

Operand

Description

buffer

size

any type

bufOffset

any type

Results:

Result

Description

tensor

Local tensor from UB

ascendc.tbuf_pool.init_buf_pool (ascendc::TBufPoolInitBufPoolOp)

TBufPool InitBufPool

Syntax:

operation ::= `ascendc.tbuf_pool.init_buf_pool` `(` $origin `,` $bufPool `,` $len `)`
              attr-dict (` ` `,` ` ` $shareBuf^)?
              `:` type($origin) `,` type($bufPool) `,` type($len)
              (` ` `,` ` ` type($shareBuf)^)? `->` type($value)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

origin

bufPool

any type

len

any type

shareBuf

any type

Results:

Result

Description

value

any type

ascendc.tbuf_pool.init_buffer (ascendc::TBufPoolInitBufferOp)

TBufPool initialize raw buffer

Syntax:

operation ::= `ascendc.tbuf_pool.init_buffer` $bufPool `,` $buffer `,` $length attr-dict `:` qualified(type($bufPool)) `,` qualified(type($buffer)) `,`
              type($length)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

bufPool

buffer

length

any type

ascendc.tbuf_pool.init_queue (ascendc::TBufPoolInitQueueOp)

TBufPool initialize queue

Syntax:

operation ::= `ascendc.tbuf_pool.init_queue` $bufPool `,` $queue `,` $num `,` $length attr-dict `:` qualified(type($bufPool)) `,` qualified(type($queue))
              `,` type($num) `,` type($length)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

bufPool

queue

base queue type

num

any type

length

any type

ascendc.tbuf_pool.reset (ascendc::TBufPoolResetOp)

TBufPool Reset

Syntax:

operation ::= `ascendc.tbuf_pool.reset` operands attr-dict `:` qualified(type(operands))

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

bufPool

ascendc.tBufPool (ascendc::TBufPoolOp)

Instantiate tBufPool

Syntax:

operation ::= `ascendc.tBufPool` attr-dict `:` type($tBufPool)

Traits: AscConstructor

Results:

Result

Description

tBufPool

ascendc.tensor_desc (ascendc::TensorDescOp)

Syntax:

operation ::= `ascendc.tensor_desc` $elementType attr-dict `:` qualified(type($tensorDesc))

Attributes:

AttributeMLIR TypeDescription
elementType::mlir::TypeAttrany type attribute

Results:

Result

Description

tensorDesc

ascendc.tensor_desc_get_data_obj (ascendc::TensorDescGetDataObjOp)

Call AscendC::GetDataObj function

Syntax:

operation ::= `ascendc.tensor_desc_get_data_obj` $tensorDesc attr-dict `:` qualified(type($tensorDesc)) `,` type($result)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensorDesc

Results:

Result

Description

result

Global tensor from GM (OUT)

ascendc.tensor_desc_get_data_ptr (ascendc::TensorDescGetDataPtrOp)

Call AscendC::GetDataPtr function

Syntax:

operation ::= `ascendc.tensor_desc_get_data_ptr` $tensorDesc attr-dict `:` qualified(type($tensorDesc)) `,` type($result)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensorDesc

Results:

Result

Description

result

ranked or unranked memref of any type values

ascendc.tensor_desc_get_dim (ascendc::TensorDescGetDimOp)

Call AscendC::GetDim function

Syntax:

operation ::= `ascendc.tensor_desc_get_dim` $tensorDesc attr-dict `:` qualified(type($tensorDesc)) `,` type($result)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensorDesc

Results:

Result

Description

result

64-bit unsigned integer

ascendc.tensor_desc_get_index (ascendc::TensorDescGetIndexOp)

Call AscendC::GetIndex function

Syntax:

operation ::= `ascendc.tensor_desc_get_index` $tensorDesc attr-dict `:` qualified(type($tensorDesc)) `,` type($result)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensorDesc

Results:

Result

Description

result

64-bit unsigned integer

ascendc.tensor_desc_get_shape (ascendc::TensorDescGetShapeOp)

Call AscendC::GetShape function

Syntax:

operation ::= `ascendc.tensor_desc_get_shape` $tensorDesc `,` $offset attr-dict `:` qualified(type($tensorDesc)) `,` type($result) `,` type($offset)

Traits: AscMemberFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

tensorDesc

offset

signless integer or index

Results:

Result

Description

result

signless integer or index

ascendc.tensor_desc_set_shape_addr (ascendc::TensorDescSetShapeAddrOp)

Call AscendC::TensorDesc::SetShapeAddr method

Syntax:

operation ::= `ascendc.tensor_desc_set_shape_addr` $tensorDesc `,` $shapePtr attr-dict `:` qualified(type($tensorDesc)) `,` qualified(type($shapePtr))

Interfaces: APIOpInterface

Operands:

Operand

Description

tensorDesc

shapePtr

64-bit unsigned integer

ascendc.to_que_bind (ascendc::ToQueBindOp)

Obtain AscendC::TQueBind from its derivative class instances

Syntax:

operation ::= `ascendc.to_que_bind` $source attr-dict `:` type($source) `,` qualified(type($result))

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand

Description

source

base queue type

Results:

Result

Description

result

ascendc.trans_data_to_5hd (ascendc::TransDataTo5HDOp)

Call AscendC::TransDataTo5HD with LocalTensor<uint64_t>

Syntax:

operation ::= `ascendc.trans_data_to_5hd` operands attr-dict `:` qualified(type(operands))

AscendC::TransDataTo5HD is a data conversion operation.

Interfaces: APIOpInterface, DataConversionOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

params

ascendc.trans_data_to_5hd_tensor_list (ascendc::TransDataTo5HDTensorListOp)

Call AscendC::TransDataTo5HD with LocalTensor lists

Syntax:

operation ::= `ascendc.trans_data_to_5hd_tensor_list` operands attr-dict `:` qualified(type(operands))

AscendC::TransDataTo5HD is a data conversion operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, DataConversionOpInterface

Operands:

Operand

Description

dstList

variadic of Local tensor from UB

srcList

variadic of Local tensor from UB

params

ascendc.trans_data_to_5hd_uint_list (ascendc::TransDataTo5HDUintListOp)

Call AscendC::TransDataTo5HD with uint64_t address lists

Syntax:

operation ::= `ascendc.trans_data_to_5hd_uint_list` operands attr-dict `:` qualified(type(operands))

AscendC::TransDataTo5HD is a data conversion operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, DataConversionOpInterface

Operands:

Operand

Description

dstList

variadic of unsigned integer

srcList

variadic of unsigned integer

params

ascendc.transpose (ascendc::TransposeOp)

Call AscendC::Transpose method (simple version)

Syntax:

operation ::= `ascendc.transpose` operands attr-dict `:` qualified(type(operands))

AscendC::Transpose is a data conversion operation.

Traits: AscFunc

Interfaces: APIOpInterface, DataConversionOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

ascendc.transpose_ext (ascendc::TransposeExtOp)

Call AscendC::Transpose method (extended version)

Syntax:

operation ::= `ascendc.transpose_ext` operands attr-dict `:` qualified(type(operands))

AscendC::Transpose is a data conversion operation.

Traits: AscFunc

Interfaces: APIOpInterface, DataConversionOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

sharedTmpBuffer

Local tensor from UB

params

ascendc.trap (ascendc::TrapOp)

Call AscendC::Trap function

Syntax:

operation ::= `ascendc.trap` attr-dict

Interrupt AI Core execution in NPU mode, equivalent to assert in CPU mode

Traits: AscFunc

Interfaces: APIOpInterface

ascendc.trunc (ascendc::TruncOp)

Call AscendC::Trunc function

Syntax:

operation ::= `ascendc.trunc` operands attr-dict `:` qualified(type(operands))

AscendC::Trunc is a unary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, UnaryMathOpInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

ascendc.wait_flag (ascendc::WaitFlagOp)

Call AscendC::WaitFlag function

Syntax:

operation ::= `ascendc.wait_flag` $event `,` $eventId attr-dict `:` type($eventId)

Interfaces: APIOpInterface

Attributes:

AttributeMLIR TypeDescription
event::mlir::ascendc::HardEventAttr
allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35{{% markdown %}}Represents AscendC::HardEvent{{% /markdown %}}

Operands:

Operand

Description

eventId

any type

ascendc.wait_pre_block (ascendc::WaitPreBlockOp)

Wait for the previous core to complete its operation.

Syntax:

operation ::= `ascendc.wait_pre_block` $gmWorkspace `,` $ubWorkspace attr-dict `:` type($gmWorkspace) `,` type($ubWorkspace)

Traits: AscFunc

Interfaces: APIOpInterface

Operands:

Operand

Description

gmWorkspace

Global tensor from GM (OUT)

ubWorkspace

Local tensor from UB

ascendc.whole_reduce_max_l0 (ascendc::WholeReduceMaxL0Op)

Call AscendC::WholeReduceMax function

Syntax:

operation ::= `ascendc.whole_reduce_max_l0` operands attr-dict `:` qualified(type(operands))

Whole reduce max operation with continuous mask (L0 API)

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
order::mlir::ascendc::ReduceOrderAttr
reduce result order and behavior{{% markdown %}}Represents AscendC::ReduceOrder{{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

mask

any type

repeatTime

any type

dstRepStride

any type

srcBlkStride

any type

srcRepStride

any type

ascendc.whole_reduce_max_l1 (ascendc::WholeReduceMaxL1Op)

Call AscendC::WholeReduceMax function

Syntax:

operation ::= `ascendc.whole_reduce_max_l1` operands attr-dict `:` qualified(type(operands))

Whole reduce max operation with bit mask (L1 API)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
order::mlir::ascendc::ReduceOrderAttr
reduce result order and behavior{{% markdown %}}Represents AscendC::ReduceOrder{{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

mask

variadic of 64-bit unsigned integer

repeatTime

any type

dstRepStride

any type

srcBlkStride

any type

srcRepStride

any type

ascendc.whole_reduce_min_l0 (ascendc::WholeReduceMinL0Op)

Call AscendC::WholeReduceMin function

Syntax:

operation ::= `ascendc.whole_reduce_min_l0` operands attr-dict `:` qualified(type(operands))

Whole reduce min operation with continuous mask (L0 API)

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
order::mlir::ascendc::ReduceOrderAttr
reduce result order and behavior{{% markdown %}}Represents AscendC::ReduceOrder{{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

mask

any type

repeatTime

any type

dstRepStride

any type

srcBlkStride

any type

srcRepStride

any type

ascendc.whole_reduce_min_l1 (ascendc::WholeReduceMinL1Op)

Call AscendC::WholeReduceMin function

Syntax:

operation ::= `ascendc.whole_reduce_min_l1` operands attr-dict `:` qualified(type(operands))

Whole reduce min operation with bit mask (L1 API)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
order::mlir::ascendc::ReduceOrderAttr
reduce result order and behavior{{% markdown %}}Represents AscendC::ReduceOrder{{% /markdown %}}
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

mask

variadic of 64-bit unsigned integer

repeatTime

any type

dstRepStride

any type

srcBlkStride

any type

srcRepStride

any type

ascendc.whole_reduce_sum_l0 (ascendc::WholeReduceSumL0Op)

Call AscendC::WholeReduceSum function

Syntax:

operation ::= `ascendc.whole_reduce_sum_l0` operands attr-dict `:` qualified(type(operands))

Whole reduce sum operation with continuous mask (L0 API)

Traits: AscFunc

Interfaces: APIOpInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

mask

any type

repeatTime

any type

dstRepStride

any type

srcBlkStride

any type

srcRepStride

any type

ascendc.whole_reduce_sum_l1 (ascendc::WholeReduceSumL1Op)

Call AscendC::WholeReduceSum function

Syntax:

operation ::= `ascendc.whole_reduce_sum_l1` operands attr-dict `:` qualified(type(operands))

Whole reduce sum operation with bit mask (L1 API)

Interfaces: APIOpInterface, OpWithDstInterface, VectorOpInterface

Attributes:

AttributeMLIR TypeDescription
isSetMask::mlir::UnitAttrunit attribute

Operands:

Operand

Description

dst

Local tensor from UB

src

Local tensor from UB

mask

variadic of 64-bit unsigned integer

repeatTime

any type

dstRepStride

any type

srcBlkStride

any type

srcRepStride

any type

ascendc.xor (ascendc::XorOp)

Call AscendC::Xor function

Syntax:

operation ::= `ascendc.xor` operands attr-dict `:` qualified(type(operands))

AscendC::Xor is a binary math library operation.

Traits: AttrSizedOperandSegments

Interfaces: APIOpInterface, BinaryMathOpInterface, MathLibraryOpInterface, OpWithDstInterface, OpWithSrcInterface, VectorOpInterface

Operands:

Operand

Description

dst

Local tensor from UB

src0

any type

src1

any type

sharedTmpBuffer

any type

calCount

any type

isReuseSource

any type

Attributes

APIAttr

Syntax:

#ascendc.api<
  StringAttr,   # group
  StringAttr,   # name
  StringAttr,   # pipe_in
  StringAttr,   # pipe_out
  ArrayAttr   # args
>

Parameters:

Parameter

C++ type

Description

group

StringAttr

name

StringAttr

pipe_in

StringAttr

pipe_out

StringAttr

args

ArrayAttr

MatmulConfigAttr

Syntax:

#ascendc.matmul_config<
  BoolAttr,   # do_norm
  BoolAttr,   # do_basic_block
  BoolAttr,   # do_multi_data_load
  IntegerAttr,   # basic_m
  IntegerAttr,   # basic_n
  IntegerAttr,   # basic_k
  BoolAttr,   # intrinsics_check
  BoolAttr,   # is_n_batch
  BoolAttr,   # en_vec_nd2nz
  BoolAttr,   # do_special_basic_block
  IntegerAttr,   # do_mte2_preload
  IntegerAttr,   # single_core_m
  IntegerAttr,   # single_core_n
  IntegerAttr,   # single_core_k
  IntegerAttr,   # step_m
  IntegerAttr,   # step_n
  IntegerAttr,   # base_mn
  IntegerAttr,   # single_core_mn
  BoolAttr,   # en_unit_flag
  BoolAttr,   # is_per_tensor
  BoolAttr,   # has_anti_quant_offset
  BoolAttr,   # do_ib_share_norm
  BoolAttr,   # do_special_mdl
  BoolAttr,   # enable_init
  IntegerAttr,   # batch_mode
  BoolAttr,   # enable_end
  BoolAttr,   # enable_get_tensor_c
  BoolAttr,   # enable_set_org_shape
  BoolAttr,   # enable_set_bias
  BoolAttr,   # enable_set_tail
  BoolAttr,   # enable_quant_vector
  BoolAttr,   # enable_set_define_data
  IntegerAttr,   # iterate_mode
  BoolAttr,   # enable_reuse
  BoolAttr,   # enable_ub_reuse
  BoolAttr,   # enable_l1_cache_ub
  BoolAttr,   # intra_block_part_sum
  IntegerAttr,   # iterate_order
  IntegerAttr,   # schedule_type
  BoolAttr,   # enable_double_cache
  BoolAttr,   # is_bias_batch
  BoolAttr,   # enable_static_pad_zeros
  BoolAttr,   # is_partial_output
  BoolAttr,   # enable_mix_dual_master
  BoolAttr,   # is_a2b2_shared
  BoolAttr,   # is_enable_channel_split
  BoolAttr,   # enable_kdim_reorder_load
  BoolAttr,   # is_co1_shared
  IntegerAttr,   # shared_co1_buffer_size
  IntegerAttr   # batch_out_mode
>

Parameters:

Parameter

C++ type

Description

do_norm

BoolAttr

do_basic_block

BoolAttr

do_multi_data_load

BoolAttr

basic_m

IntegerAttr

basic_n

IntegerAttr

basic_k

IntegerAttr

intrinsics_check

BoolAttr

is_n_batch

BoolAttr

en_vec_nd2nz

BoolAttr

do_special_basic_block

BoolAttr

do_mte2_preload

IntegerAttr

single_core_m

IntegerAttr

single_core_n

IntegerAttr

single_core_k

IntegerAttr

step_m

IntegerAttr

step_n

IntegerAttr

base_mn

IntegerAttr

single_core_mn

IntegerAttr

en_unit_flag

BoolAttr

is_per_tensor

BoolAttr

has_anti_quant_offset

BoolAttr

do_ib_share_norm

BoolAttr

do_special_mdl

BoolAttr

enable_init

BoolAttr

batch_mode

IntegerAttr

enable_end

BoolAttr

enable_get_tensor_c

BoolAttr

enable_set_org_shape

BoolAttr

enable_set_bias

BoolAttr

enable_set_tail

BoolAttr

enable_quant_vector

BoolAttr

enable_set_define_data

BoolAttr

iterate_mode

IntegerAttr

enable_reuse

BoolAttr

enable_ub_reuse

BoolAttr

enable_l1_cache_ub

BoolAttr

intra_block_part_sum

BoolAttr

iterate_order

IntegerAttr

schedule_type

IntegerAttr

enable_double_cache

BoolAttr

is_bias_batch

BoolAttr

enable_static_pad_zeros

BoolAttr

is_partial_output

BoolAttr

enable_mix_dual_master

BoolAttr

is_a2b2_shared

BoolAttr

is_enable_channel_split

BoolAttr

enable_kdim_reorder_load

BoolAttr

is_co1_shared

BoolAttr

shared_co1_buffer_size

IntegerAttr

batch_out_mode

IntegerAttr

SampleAttr

Syntax:

#ascendc.sample<
  IntegerAttr   # number
>

Parameters:

Parameter

C++ type

Description

number

IntegerAttr

Types

AippChannelPaddingParamsType

Syntax: !ascendc.aipp_cpadding_params

Represents AscendC::AippChannelPaddingParams

AippColorSpaceConvParamsType

Syntax: !ascendc.aipp_csc_params

Represents AscendC::AippColorSpaceConvParams

AippDataTypeConvParamsType

Syntax: !ascendc.aipp_dtc_params

Represents AscendC::AippDataTypeConvParams

AippInputFormatType

Syntax: !ascendc.aipp_input_format

Represents AscendC::AippInputFormat

AippPaddingParamsType

Syntax: !ascendc.aipp_padding_params

Represents AscendC::AippPaddingParams

AippParamsType

Syntax: !ascendc.aipp_params

Represents AscendC::AippParams

AippSingleLineParamsType

Syntax: !ascendc.aipp_single_line_params

Represents AscendC::AippSingleLineParams

AippSwapParamsType

Syntax: !ascendc.aipp_swap_params

Represents AscendC::AippSwapParams

AscendQuantConfigType

Syntax: !ascendc.ascend_quant_config

Represents AscendC::AscendQuantConfig

BaseGlobalTensorType

Represents AscendC::BaseGlobalTensor

Parameters:

Parameter

C++ type

Description

shape

::llvm::ArrayRef<int64_t>

elementType

Type

BaseLocalTensorType

Represents AscendC::BaseLocalTensor

Parameters:

Parameter

C++ type

Description

shape

::llvm::ArrayRef<int64_t>

elementType

Type

BatchModeType

Syntax: !ascendc.batch_mode

Represents BatchMode

BatchOutModeType

Syntax: !ascendc.batch_out_mode

Represents BatchOutMode

BinaryRepeatParamsType

Syntax: !ascendc.binary_repeat_params

Represents AscendC::BinaryRepeatParams

BlockModeType

Syntax: !ascendc.block_mode

Represents AscendC::BlockMode

BrcbRepeatParamsType

Syntax: !ascendc.brcb_repeat_params

Represents AscendC::BrcbRepeatParams

BufAddrType

Syntax: !ascendc.buf_addr

Represents AscendC::TBuffAddr

CO2LayoutType

Syntax: !ascendc.co2_layout

Represents AscendC::CO2Layout

CheckLocalMemoryIAParamType

Syntax: !ascendc.check_local_memory_ia_param

Represents AscendC::CheckLocalMemoryIAParam

CopyRepeatParamsType

Syntax: !ascendc.copy_repeat_params

Represents AscendC::CopyRepeatParams

DataCopyCO12DstParamsType

Syntax: !ascendc.data_copy_co12dst_params

Represents AscendC::DataCopyCO12DstParams

DataCopyEnhancedParamsType

Syntax: !ascendc.data_copy_enhanced_params

Represents AscendC::DataCopyEnhancedParams

DataCopyExtParamsType

Syntax: !ascendc.data_copy_ext_params

Represents AscendC::DataCopyExtParams

DataCopyPadExtParamsType

Syntax:

!ascendc.data_copy_pad_ext_params<
  Type   # elementType
>

Represents AscendC::DataCopyPadExtParams

Parameters:

Parameter

C++ type

Description

elementType

Type

DataCopyPadParamsType

Syntax: !ascendc.data_copy_pad_params

Represents AscendC::DataCopyPadParams

DataCopyParamsType

Syntax: !ascendc.data_copy_params

Represents AscendC::DataCopyParams

DataFormatType

Syntax: !ascendc.data_format

Represents AscendC::DataFormat

DeqScaleType

Syntax: !ascendc.deq_scale

Represents AscendC::DeqScale

FixpipeConfigType

Syntax: !ascendc.fixpipe_config

Represents AscendC::FixpipeConfig

FixpipeParamsType

Syntax:

!ascendc.fixpipe_params<
  Type   # type
>

Represents AscendC::FixpipeParams

Parameters:

Parameter

C++ type

Description

type

Type

FixpipeParamsV220Type

Syntax: !ascendc.fixpipe_params_v220

Represents AscendC::FixpipeParamsV220

FmatrixModeType

Syntax: !ascendc.fmatrix_mode

Represents AscendC::FmatrixMode

GatherMaskParamsType

Syntax: !ascendc.gather_mask_params

Represents AscendC::GatherMaskParams

GatherRepeatParamsType

Syntax: !ascendc.gather_repeat_params

Represents AscendC::GatherRepeatParams

GlobalTensorType

Global tensor from GM (OUT)

Parameters:

Parameter

C++ type

Description

shape

::llvm::ArrayRef<int64_t>

elementType

Type

InitConstValueParamsType

Syntax: !ascendc.init_const_value_params

Represents AscendC::InitConstValueParams

IsResetLoad3dConfigType

Syntax: !ascendc.is_reset_load_3d_config

Represents AscendC::IsResetLoad3dConfig

IterateModeType

Syntax: !ascendc.iterate_mode

Represents IterateMode

IterateOrderType

Syntax: !ascendc.iterate_order

Represents IterateOrder

KfcServerType

Syntax: !ascendc.kfc_server

Represents AscendC::KfcServer

ListTensorDescType

Syntax: !ascendc.list_tensor_desc

Represents AscendC::ListTensorDesc

LoadData2DParamsType

Syntax: !ascendc.load_data_2d_params

Represents AscendC::LoadData2DParams

LoadData2DParamsV2Type

Syntax: !ascendc.load_data_2d_params_v2

Represents AscendC::LoadData2DParamsV2

LoadData2dTransposeParamsType

Syntax: !ascendc.load_data_2d_transpose_params

Represents AscendC::LoadData2dTransposeParams

LoadData2dTransposeParamsV2Type

Syntax: !ascendc.load_data_2d_transpose_params_v2

Represents AscendC::LoadData2dTransposeParamsV2

LoadData3DParamsV1Type

Syntax: !ascendc.load_data_3d_params_v1

Represents AscendC::LoadData3DParamsV1

LoadData3DParamsV2Type

Syntax: !ascendc.load_data_3d_params_v2

Represents AscendC::LoadData3DParamsV2

LoadData3DParamsV2ProType

Syntax: !ascendc.load_data_3d_params_v2_pro

Represents AscendC::LoadData3DParamsV2Pro

LoadDataRepeatParamType

Syntax: !ascendc.load_data_repeat_param

Represents AscendC::LoadDataRepeatParam

LoadImageToLocalParamsType

Syntax: !ascendc.load_image_to_local_params

Represents AscendC::LoadImageToLocalParams

LocalMemAllocatorType

Represents AscendC::LocalMemAllocator

Syntax:

!ascendc.local_mem_allocator<
  uint64_t   # hardware
>

Parameters:

Parameter

C++ type

Description

hardware

uint64_t

LocalTensorType

Local tensor from UB

Parameters:

Parameter

C++ type

Description

shape

::llvm::ArrayRef<int64_t>

elementType

Type

MaskType

Represents vector mask (bit mode)

Syntax: !ascendc.mask

MaskModeType

Syntax: !ascendc.mask_mode

Represents AscendC::MaskMode

MatmulType

Syntax:

!ascendc.matmul<
  TPositionAttr,   # srcAPositionAttr
  CubeFormatAttr,   # cubeFormatAAttr
  Type,   # typeA
  bool,   # isTransA
  LayoutModeAttr,   # layoutModeAAttr
  TPositionAttr,   # srcBPositionAttr
  CubeFormatAttr,   # cubeFormatBAttr
  Type,   # typeB
  bool,   # isTransB
  LayoutModeAttr,   # layoutModeBAttr
  TPositionAttr,   # srcCPositionAttr
  CubeFormatAttr,   # cubeFormatCAttr
  Type,   # typeC
  bool,   # isTransC
  LayoutModeAttr,   # layoutModeCAttr
  TPositionAttr,   # srcBiasPositionAttr
  CubeFormatAttr,   # cubeFormatBiasAttr
  Type,   # typeBias
  MatmulConfigAttr   # matmulConfig
>

Represents matmul::Matmul

Parameters:

Parameter

C++ type

Description

srcAPositionAttr

TPositionAttr

cubeFormatAAttr

CubeFormatAttr

typeA

Type

isTransA

bool

layoutModeAAttr

LayoutModeAttr

srcBPositionAttr

TPositionAttr

cubeFormatBAttr

CubeFormatAttr

typeB

Type

isTransB

bool

layoutModeBAttr

LayoutModeAttr

srcCPositionAttr

TPositionAttr

cubeFormatCAttr

CubeFormatAttr

typeC

Type

isTransC

bool

layoutModeCAttr

LayoutModeAttr

srcBiasPositionAttr

TPositionAttr

cubeFormatBiasAttr

CubeFormatAttr

typeBias

Type

matmulConfig

MatmulConfigAttr

MatmulApiStaticTilingType

Syntax: !ascendc.matmul_api_static_tiling

Represents MatmulApiStaticTiling

MatmulConfigType

Syntax: !ascendc.matmul_config

Represents MatmulConfig

MatrixOffsetType

Syntax: !ascendc.matrix_offset

Represents MatrixOffset

MmadParamsType

Syntax: !ascendc.mmad_params

Represents AscendC::MmadParams

MrgSort4InfoType

Syntax: !ascendc.mrg_sort4_info

Represents AscendC::MrgSort4Info

MrgSortSrcListType

Syntax:

!ascendc.mrg_sort_src_list<
  Type   # elementType
>

Represents AscendC::MrgSortSrcList

Parameters:

Parameter

C++ type

Description

elementType

Type

Nd2NzParamsType

Syntax: !ascendc.nd2nz_params

Represents AscendC::Nd2NzParams

Nz2NdParamsType

Syntax: !ascendc.nz2nd_params

Represents AscendC::Nz2NdParams

Nz2NdParamsFullType

Syntax: !ascendc.nz2nd_params_full

Represents AscendC::Nz2NdParamsFull

PipeType

Syntax: !ascendc.pipe

Represents AscendC::TPipe

QuantModesType

Syntax: !ascendc.quant_mode_t

Represents QuantMode_t

QuantParamsType

Syntax: !ascendc.quant_params

Represents AscendC::QuantParams

QueBindType

Syntax:

!ascendc.que_bind<
  TPositionAttr,   # srcPositionAttr
  TPositionAttr,   # dstPositionAttr
  int64_t   # depth
>

Represents AscendC::TQueBind

Parameters:

Parameter

C++ type

Description

srcPositionAttr

TPositionAttr

dstPositionAttr

TPositionAttr

depth

int64_t

QueueType

Syntax:

!ascendc.queue<
  TPositionAttr,   # tPositionAttr
  int64_t   # depth
>

Represents AscendC::TQue

Parameters:

Parameter

C++ type

Description

tPositionAttr

TPositionAttr

depth

int64_t

ReduceOrderType

Syntax: !ascendc.reduce_order

Represents AscendC::ReduceOrder

RmsNormTilingType

Syntax: !ascendc.rmsnorm_tiling

Represents RmsNormTiling

ScheduleTypeType

Syntax: !ascendc.schedule_type

Represents ScheduleType

ShapeInfoType

Syntax: !ascendc.shape_info

Represents AscendC::ShapeInfo

SliceInfoType

Syntax: !ascendc.slice_info

Represents AscendC::SliceInfo

SoftMaxShapeInfoType

Syntax: !ascendc.softmax_shape_info

Represents AscendC::SoftMaxShapeInfo

SoftMaxTilingType

Syntax: !ascendc.softmax_tiling

Represents SoftMaxTiling

TBufType

Syntax:

!ascendc.tbuf<
  TPositionAttr   # tPositionAttr
>

Represents AscendC::TBuf

Parameters:

Parameter

C++ type

Description

tPositionAttr

TPositionAttr

TBufPoolType

Syntax:

!ascendc.tbuf_pool<
  TPositionAttr,   # tPositionAttr
  uint32_t   # bufIDSize
>

Represents AscendC::TBufPool

Parameters:

Parameter

C++ type

Description

tPositionAttr

TPositionAttr

bufIDSize

uint32_t

TCubeTilingType

Syntax: !ascendc.cube_tiling

Represents TCubeTiling

TensorDescType

Syntax: !ascendc.tensor_desc

Represents AscendC::TensorDesc

TransDataTo5HDParamsType

Syntax: !ascendc.trans_data_to_5hd_params

Represents AscendC::TransDataTo5HDParams

TransposeParamsExtType

Syntax: !ascendc.transpose_params_ext

Represents AscendC::TransposeParamsExt

TransposeTypeType

Syntax: !ascendc.transpose_type

Represents AscendC::TransposeType

UnaryRepeatParamsType

Syntax: !ascendc.unary_repeat_params

Represents AscendC::UnaryRepeatParams

VdeqInfoType

Syntax: !ascendc.vdeq_info

Represents AscendC::VdeqInfo

pad_tType

Syntax: !ascendc.pad_t

Represents AscendC::pad_t

Enums

AddressSpace

allowed 32-bit signless integer cases: 0, 22, 23, 24, 25, 26, 27, 28

Cases:

Symbol

Value

String

Default

0

Default

gm

22

gm

ca

23

ca

cb

24

cb

cc

25

cc

ubuf

26

ubuf

cbuf

27

cbuf

fbuf

28

fbuf

AippInputFormat

allowed 32-bit signless integer cases: 0, 1, 4, 9

Cases:

Symbol

Value

String

YUV420SP_U8

0

YUV420SP_U8

XRGB8888_U8

1

XRGB8888_U8

RGB888_U8

4

RGB888_U8

YUV400_U8

9

YUV400_U8

AtomicDtype

allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6

Cases:

Symbol

Value

String

ATOMIC_NONE

0

atomic_none

ATOMIC_F32

1

atomic_f32

ATOMIC_F16

2

atomic_f16

ATOMIC_S16

3

atomic_s16

ATOMIC_S32

4

atomic_s32

ATOMIC_S8

5

atomic_s8

ATOMIC_BF16

6

atomic_bf16

AtomicOp

allowed 32-bit signless integer cases: 0

Cases:

Symbol

Value

String

ATOMIC_SUM

0

atomic_sum

BatchMode

allowed 32-bit signless integer cases: 0, 1, 2, 3

Cases:

Symbol

Value

String

NONE

0

NONE

BATCH_LESS_THAN_L1

1

BATCH_LESS_THAN_L1

BATCH_LARGE_THAN_L1

2

BATCH_LARGE_THAN_L1

SINGLE_LARGE_THAN_L1

3

SINGLE_LARGE_THAN_L1

BatchOutMode

allowed 32-bit signless integer cases: 0, 1, 2

Cases:

Symbol

Value

String

SINGLE_BATCH

0

SINGLE_BATCH

MULTI_BATCH

1

MULTI_BATCH

DYNAMIC

2

DYNAMIC

CMPMODE

allowed 64-bit signless integer cases: 0, 1, 2, 3, 4, 5

Cases:

Symbol

Value

String

LT

0

LT

GT

1

GT

EQ

2

EQ

LE

3

LE

GE

4

GE

NE

5

NE

CO2Layout

allowed 32-bit signless integer cases: 0, 1, 2

Cases:

Symbol

Value

String

NZ

0

NZ

ROW_MAJOR

1

ROW_MAJOR

COLUMN_MAJOR

2

COLUMN_MAJOR

CacheLine

allowed 32-bit signless integer cases: 0, 1

Cases:

Symbol

Value

String

SINGLE_CACHE_LINE

0

single_cache_line

ENTIRE_DATA_CACHE

1

entire_data_cache

CacheMode

allowed 32-bit signless integer cases: 0, 1

Cases:

Symbol

Value

String

CACHE_MODE_DISABLE

0

CACHE_MODE_DISABLE

CACHE_MODE_NORMAL

1

CACHE_MODE_NORMAL

CacheRwMode

allowed 32-bit signless integer cases: 1, 2, 3

Cases:

Symbol

Value

String

READ

1

READ

WRITE

2

WRITE

RW

3

RW

CopyDirection

allowed 32-bit signless integer cases: 0, 1, 2, 3, 4

Cases:

Symbol

Value

String

Unknown

0

Unknown

gm_ubuf

1

gm_ubuf

ubuf_gm

2

ubuf_gm

ubuf_ubuf

3

ubuf_ubuf

gm_gm

4

gm_gm

CubeFormat

matmul tensor format

Cases:

Symbol

Value

String

ND

0

nd

NZ

1

nz

ZN

2

zn

ZZ

3

zz

NN

4

nn

ND_ALIGN

5

nd_align

SCALAR

6

scalar

VECTOR

7

vector

DcciDst

allowed 32-bit signless integer cases: 0, 1, 2, 3

Cases:

Symbol

Value

String

CACHELINE_ALL

0

cacheline_all

CACHELINE_UB

1

cacheline_ub

CACHELINE_OUT

2

cacheline_out

CACHELINE_ATOMIC

3

cacheline_atomic

FmatrixMode

allowed 32-bit signless integer cases: 0, 1

Cases:

Symbol

Value

String

FMATRIX_LEFT

0

fmatrix_left

FMATRIX_RIGHT

1

fmatrix_right

GatherMaskMode

allowed 32-bit signless integer cases: 0

Cases:

Symbol

Value

String

DEFAULT

0

default

HardEvent

allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35

Cases:

Symbol

Value

String

MTE2_MTE1

0

mte2_mte1

MTE1_MTE2

1

mte1_mte2

MTE1_M

2

mte1_m

M_MTE1

3

m_mte1

MTE2_V

4

mte2_v

V_MTE2

5

v_mte2

MTE3_V

6

mte3_v

V_MTE3

7

v_mte3

M_V

8

m_v

V_M

9

v_m

V_V

10

v_v

MTE3_MTE1

11

mte3_mte1

MTE1_MTE3

12

mte1_mte3

MTE1_V

13

mte1_v

MTE2_M

14

mte2_m

M_MTE2

15

m_mte2

V_MTE1

16

v_mte1

M_FIX

17

m_fix

FIX_M

18

fix_m

MTE3_MTE2

19

mte3_mte2

MTE2_MTE3

20

mte2_mte3

S_V

21

s_v

V_S

22

v_s

S_MTE2

23

s_mte2

MTE2_S

24

mte2_s

S_MTE3

25

s_mte3

MTE3_S

26

mte3_s

MTE2_FIX

27

mte2_fix

FIX_MTE2

28

fix_mte2

FIX_S

29

fix_s

M_S

30

m_s

FIX_MTE3

31

fix_mte3

MTE1_FIX

32

mte1_fix

FIX_MTE1

33

fix_mte1

FIX_FIX

34

fix_fix

MAX

35

max

Hardware

Hardware memory location

Cases:

Symbol

Value

String

GM

0

gm

UB

1

ub

L1

2

l1

L0A

3

l0a

L0B

4

l0b

L0C

5

l0c

BIAS

6

bias

FIXBUF

7

fixbuf

MAX

8

max

IterateMode

allowed 32-bit signless integer cases: 1, 2, 4, 8, 255

Cases:

Symbol

Value

String

ITERATE_MODE_NORMAL

1

ITERATE_MODE_NORMAL

ITERATE_MODE_ALL

2

ITERATE_MODE_ALL

ITERATE_MODE_BATCH

4

ITERATE_MODE_BATCH

ITERATE_MODE_N_BATCH

8

ITERATE_MODE_N_BATCH

ITERATE_MODE_DEFAULT

255

ITERATE_MODE_DEFAULT

IterateOrder

allowed 32-bit signless integer cases: 0, 1, 2

Cases:

Symbol

Value

String

ORDER_M

0

ORDER_M

ORDER_N

1

ORDER_N

UNDEF

2

UNDEF

LayoutMode

matmul tensor layout

Cases:

Symbol

Value

String

NONE

0

none

NORMAL

1

normal

BSNGD

2

bsngd

SBNGD

3

sbngd

BNGS1S2

4

bngs1s2

MaskMode

allowed 32-bit signless integer cases: 0, 1

Cases:

Symbol

Value

String

NORMAL

0

NORMAL

COUNTER

1

COUNTER

MatmulPolicy

allowed 32-bit signless integer cases: 0, 1, 2, 3

Cases:

Symbol

Value

String

MatmulPolicy

0

MatmulPolicy

TrianUpperMatmulPolicy

1

TrianUpperMatmulPolicy

TrianLowerMatmulPolicy

2

TrianLowerMatmulPolicy

NBuffer33MatmulPolicy

3

NBuffer33MatmulPolicy

MemDsbT

allowed 32-bit signless integer cases: 0, 1, 2, 3

Cases:

Symbol

Value

String

ALL

0

all

DDR

1

ddr

UB

2

ub

SEQ

3

seq

Pipe

allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

Cases:

Symbol

Value

String

PIPE_S

0

pipe_s

PIPE_V

1

pipe_v

PIPE_M

2

pipe_m

PIPE_MTE1

3

pipe_mte1

PIPE_MTE2

4

pipe_mte2

PIPE_MTE3

5

pipe_mte3

PIPE_ALL

6

pipe_all

PIPE_MTE4

7

pipe_mte4

PIPE_MTE5

8

pipe_mte5

PIPE_V2

9

pipe_v2

PIPE_FIX

10

pipe_fix

QuantMode

allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36

Cases:

Symbol

Value

String

NoQuant

0

no_quant

F322F16

1

f322f16

VQF322HIF8_PRE

2

vqf322hif8_pre

QF322HIF8_PRE

3

qf322hif8_pre

VQF322HIF8_PRE_HYBRID

4

vqf322hif8_pre_hybrid

QF322HIF8_PRE_HYBRID

5

qf322hif8_pre_hybrid

AttachF16Mul

6

attachf16mul

VREQ8

8

vreq8

REQ8

9

req8

VDEQF16

10

vdeqf16

DEQF16

11

deqf16

VQF322FP8_PRE

12

vqf322fp8_pre

QF322FP8_PRE

13

qf322fp8_pre

VQF322F32_PRE

14

vqf322f32_pre

QF322F32_PRE

15

qf322f32_pre

F322BF16

16

f322bf16

VQF162B8_PRE

17

vqf162b8_pre

QF162B8_PRE

18

qf162b8_pre

VQF162S4_PRE

19

vqf162s4_pre

QF162S4_PRE

20

qf162s4_pre

VREQ4

21

vreq4

REQ4

22

req4

VQF322B8_PRE

23

vqf322b8_pre

QF322B8_PRE

24

qf322b8_pre

VQF322S4_PRE

25

vqf322s4_pre

QF322S4_PRE

26

qf322s4_pre

VDEQS16

27

vdeqs16

DEQS16

28

deqs16

VQF162S16_PRE

29

vqf162s16_pre

QF162S16_PRE

30

qf162s16_pre

VQF322F16_PRE

31

vqf322f16_pre

QF322F16_PRE

32

qf322f16_pre

VQF322BF16_PRE

33

vqf322bf16_pre

QF322BF16_PRE

34

qf322bf16_pre

VQS322BF16_PRE

35

vqs322bf16_pre

QS322BF16_PRE

36

qs322bf16_pre

ReduceOrder

reduce result order and behavior

Cases:

Symbol

Value

String

ORDER_VALUE_INDEX

0

order_value_index

ORDER_INDEX_VALUE

1

order_index_value

ORDER_ONLY_VALUE

2

order_only_value

ORDER_ONLY_INDEX

3

order_only_index

ReducePattern

allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15

Cases:

Symbol

Value

String

R

0

R

AR

1

AR

RA

2

RA

ARA

3

ARA

ARAR

4

ARAR

ARARA

5

ARARA

ARARAR

6

ARARAR

ARARARA

7

ARARARA

ARARARAR

8

ARARARAR

ARARARARA

9

ARARARARA

RAR

10

RAR

RARA

11

RARA

RARAR

12

RARAR

RARARA

13

RARARA

RARARAR

14

RARARAR

RARARARA

15

RARARARA

RoundMode

allowed 32-bit signless integer cases: 0, 1, 2, 3, 4, 5, 6

Cases:

Symbol

Value

String

CAST_NONE

0

CAST_NONE

CAST_RINT

1

CAST_RINT

CAST_FLOOR

2

CAST_FLOOR

CAST_CEIL

3

CAST_CEIL

CAST_ROUND

4

CAST_ROUND

CAST_TRUNC

5

CAST_TRUNC

CAST_ODD

6

CAST_ODD

ScheduleType

allowed 32-bit signless integer cases: 0, 1

Cases:

Symbol

Value

String

INNER_PRODUCT

0

INNER_PRODUCT

OUTER_PRODUCT

1

OUTER_PRODUCT

SELMODE

allowed 32-bit signless integer cases: 0, 1, 2

Cases:

Symbol

Value

String

VSEL_CMPMASK_SPR

0

VSEL_CMPMASK_SPR

VSEL_TENSOR_SCALAR_MODE

1

VSEL_TENSOR_SCALAR_MODE

VSEL_TENSOR_TENSOR_MODE

2

VSEL_TENSOR_TENSOR_MODE

TPosition

queue/buffer position

Cases:

Symbol

Value

String

GM

0

gm

A1

1

a1

A2

2

a2

B1

3

b1

B2

4

b2

C1

5

c1

C2

6

c2

CO1

7

co1

CO2

8

co2

VECIN

9

vecin

VECOUT

10

vecout

VECCALC

11

veccalc

MAX

12

max

TransposeType

Transpose type.

Cases:

Symbol

Value

String

TRANSPOSE_TYPE_NONE

0

TRANSPOSE_TYPE_NONE

TRANSPOSE_NZ2ND_0213

1

TRANSPOSE_NZ2ND_0213

TRANSPOSE_NZ2NZ_0213

2

TRANSPOSE_NZ2NZ_0213

TRANSPOSE_NZ2NZ_012_WITH_N

3

TRANSPOSE_NZ2NZ_012_WITH_N

TRANSPOSE_NZ2ND_012_WITH_N

4

TRANSPOSE_NZ2ND_012_WITH_N

TRANSPOSE_NZ2ND_012_WITHOUT_N

5

TRANSPOSE_NZ2ND_012_WITHOUT_N

TRANSPOSE_NZ2NZ_012_WITHOUT_N

6

TRANSPOSE_NZ2NZ_012_WITHOUT_N

TRANSPOSE_ND2ND_ONLY

7

TRANSPOSE_ND2ND_ONLY

TRANSPOSE_ND_UB_GM

8

TRANSPOSE_ND_UB_GM

TRANSPOSE_GRAD_ND_UB_GM

9

TRANSPOSE_GRAD_ND_UB_GM

TRANSPOSE_ND2ND_B16

10

TRANSPOSE_ND2ND_B16

TRANSPOSE_NCHW2NHWC

11

TRANSPOSE_NCHW2NHWC

TRANSPOSE_NHWC2NCHW

12

TRANSPOSE_NHWC2NCHW