Skip to content

'npu_isa' Dialect

NPU internal near-ISA dialect Internal layer that is close to hardware instruction forms and is directly translated to simulator-compatible textual ISA.

Operations

npu_isa.dma_load (iree_compiler::NPUISA::DmaLoadOp)

Near-ISA DMA load to matrix register file

Syntax:

operation ::= `npu_isa.dma_load` `rd` `=` $rd `,` `base` `=` $base `,` `size` `=` $size `,` `flag` `=` $flag attr-dict

Attributes:

AttributeMLIR TypeDescription
rd::mlir::IntegerAttr64-bit signless integer attribute
base::mlir::IntegerAttr64-bit signless integer attribute
size::mlir::IntegerAttr64-bit signless integer attribute
flag::mlir::IntegerAttr64-bit signless integer attribute

npu_isa.dma_load_mxu0 (iree_compiler::NPUISA::DmaLoadMxu0Op)

Near-ISA DMA load to MXU0 weight buffer

Syntax:

operation ::= `npu_isa.dma_load_mxu0` `rd` `=` $rd `,` `base` `=` $base `,` `size` `=` $size `,` `flag` `=` $flag attr-dict

Attributes:

AttributeMLIR TypeDescription
rd::mlir::IntegerAttr64-bit signless integer attribute
base::mlir::IntegerAttr64-bit signless integer attribute
size::mlir::IntegerAttr64-bit signless integer attribute
flag::mlir::IntegerAttr64-bit signless integer attribute

npu_isa.dma_load_mxu1 (iree_compiler::NPUISA::DmaLoadMxu1Op)

Near-ISA DMA load to MXU1 weight buffer

Syntax:

operation ::= `npu_isa.dma_load_mxu1` `rd` `=` $rd `,` `base` `=` $base `,` `size` `=` $size `,` `flag` `=` $flag attr-dict

Attributes:

AttributeMLIR TypeDescription
rd::mlir::IntegerAttr64-bit signless integer attribute
base::mlir::IntegerAttr64-bit signless integer attribute
size::mlir::IntegerAttr64-bit signless integer attribute
flag::mlir::IntegerAttr64-bit signless integer attribute

npu_isa.dma_store (iree_compiler::NPUISA::DmaStoreOp)

Near-ISA DMA store from matrix/vector register file

Syntax:

operation ::= `npu_isa.dma_store` $src `rs1` `=` $rs1 `,` `base` `=` $base `,` `size` `=` $size `,` `flag` `=` $flag attr-dict
              `:` type($src)

Attributes:

AttributeMLIR TypeDescription
rs1::mlir::IntegerAttr64-bit signless integer attribute
base::mlir::IntegerAttr64-bit signless integer attribute
size::mlir::IntegerAttr64-bit signless integer attribute
flag::mlir::IntegerAttr64-bit signless integer attribute

Operands:

Operand Description
src any type

npu_isa.dma_wait (iree_compiler::NPUISA::DmaWaitOp)

Near-ISA DMA wait on flag

Syntax:

operation ::= `npu_isa.dma_wait` `flag` `=` $flag attr-dict

Attributes:

AttributeMLIR TypeDescription
flag::mlir::IntegerAttr64-bit signless integer attribute

npu_isa.matmul_mxu0 (iree_compiler::NPUISA::MatmulMxu0Op)

Near-ISA MXU0 matmul instruction

Syntax:

operation ::= `npu_isa.matmul_mxu0` $lhs `,` $rhs `regs` `=` `(` $rd `,` $rs1 `,` $rs2 `)` attr-dict
              `:` type($lhs) `,` type($rhs) `->` type($result)

Attributes:

AttributeMLIR TypeDescription
rd::mlir::IntegerAttr64-bit signless integer attribute
rs1::mlir::IntegerAttr64-bit signless integer attribute
rs2::mlir::IntegerAttr64-bit signless integer attribute

Operands:

Operand Description
lhs any type
rhs any type

Results:

Result Description
result any type

npu_isa.vexp (iree_compiler::NPUISA::VExpOp)

Near-ISA vector exp

Syntax:

operation ::= `npu_isa.vexp` $src `regs` `=` `(` $vrd `,` $vs1 `)` attr-dict
              `:` type($src) `->` type($result)

Attributes:

AttributeMLIR TypeDescription
vrd::mlir::IntegerAttr64-bit signless integer attribute
vs1::mlir::IntegerAttr64-bit signless integer attribute

Operands:

Operand Description
src any type

Results:

Result Description
result any type

npu_isa.vmul (iree_compiler::NPUISA::VMulOp)

Near-ISA vector multiply

Syntax:

operation ::= `npu_isa.vmul` $lhs `,` $rhs `regs` `=` `(` $vrd `,` $vs1 `,` $vs2 `)` attr-dict
              `:` type($lhs) `,` type($rhs) `->` type($result)

Attributes:

AttributeMLIR TypeDescription
vrd::mlir::IntegerAttr64-bit signless integer attribute
vs1::mlir::IntegerAttr64-bit signless integer attribute
vs2::mlir::IntegerAttr64-bit signless integer attribute

Operands:

Operand Description
lhs any type
rhs any type

Results:

Result Description
result any type

npu_isa.vrcp (iree_compiler::NPUISA::VRcpOp)

Near-ISA vector reciprocal

Syntax:

operation ::= `npu_isa.vrcp` $src `regs` `=` `(` $vrd `,` $vs1 `)` attr-dict
              `:` type($src) `->` type($result)

Attributes:

AttributeMLIR TypeDescription
vrd::mlir::IntegerAttr64-bit signless integer attribute
vs1::mlir::IntegerAttr64-bit signless integer attribute

Operands:

Operand Description
src any type

Results:

Result Description
result any type

npu_isa.vreduce_sum (iree_compiler::NPUISA::VReduceSumOp)

Near-ISA vector reduce sum

Syntax:

operation ::= `npu_isa.vreduce_sum` $src `regs` `=` `(` $vrd `,` $vs1 `)` attr-dict
              `:` type($src) `->` type($result)

Attributes:

AttributeMLIR TypeDescription
vrd::mlir::IntegerAttr64-bit signless integer attribute
vs1::mlir::IntegerAttr64-bit signless integer attribute

Operands:

Operand Description
src any type

Results:

Result Description
result any type