Skip to content

'gemmini' Dialect

Gemmini accelerator recovery dialect A compiler-internal dialect used to recover Gemmini-friendly semantics from normalized IREE/MLIR IR after global optimization.

Operations

gemmini.clamp (iree_compiler::Gemmini::ClampOp)

Recovered f32 clamp

Syntax:

operation ::= `gemmini.clamp` $input attr-dict `:` type($input) `->` type($result)

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
minValue::mlir::FloatAttr32-bit float attribute
maxValue::mlir::FloatAttr32-bit float attribute

Operands:

Operand Description
input ranked tensor of any type values

Results:

Result Description
result ranked tensor of any type values

gemmini.conv2d (iree_compiler::Gemmini::Conv2DOp)

Recovered batchless CHW/FCHW int8 conv2d

Syntax:

operation ::= `gemmini.conv2d` $input `,` $filter attr-dict `:` type($input) `,` type($filter) `->` type($result)

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
strideH::mlir::IntegerAttr64-bit signless integer attribute
strideW::mlir::IntegerAttr64-bit signless integer attribute
dilationH::mlir::IntegerAttr64-bit signless integer attribute
dilationW::mlir::IntegerAttr64-bit signless integer attribute
inputZeroPoint::mlir::IntegerAttr64-bit signless integer attribute
filterZeroPoint::mlir::IntegerAttr64-bit signless integer attribute
dataflow::mlir::iree_compiler::Gemmini::DataflowAttrGemmini dataflow mode

Operands:

Operand Description
input ranked tensor of any type values
filter ranked tensor of any type values

Results:

Result Description
result ranked tensor of any type values

gemmini.matmul (iree_compiler::Gemmini::MatmulOp)

Recovered int8 x int8 -> i32 matmul

Syntax:

operation ::= `gemmini.matmul` $lhs `,` $rhs attr-dict `:` type($lhs) `,` type($rhs) `->` type($result)

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
lhsZeroPoint::mlir::IntegerAttr64-bit signless integer attribute
rhsZeroPoint::mlir::IntegerAttr64-bit signless integer attribute
dataflow::mlir::iree_compiler::Gemmini::DataflowAttrGemmini dataflow mode

Operands:

Operand Description
lhs ranked tensor of any type values
rhs ranked tensor of any type values

Results:

Result Description
result ranked tensor of any type values

gemmini.matmul_tile (iree_compiler::Gemmini::MatmulTileOp)

Recovered matmul with explicit tile metadata

Syntax:

operation ::= `gemmini.matmul_tile` $lhs `,` $rhs attr-dict `:` type($lhs) `,` type($rhs) `->` type($result)

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
lhsZeroPoint::mlir::IntegerAttr64-bit signless integer attribute
rhsZeroPoint::mlir::IntegerAttr64-bit signless integer attribute
dataflow::mlir::iree_compiler::Gemmini::DataflowAttrGemmini dataflow mode
tileM::mlir::IntegerAttr64-bit signless integer attribute
tileN::mlir::IntegerAttr64-bit signless integer attribute
tileK::mlir::IntegerAttr64-bit signless integer attribute

Operands:

Operand Description
lhs ranked tensor of any type values
rhs ranked tensor of any type values

Results:

Result Description
result ranked tensor of any type values

gemmini.requantize (iree_compiler::Gemmini::RequantizeOp)

Recovered f32 -> i8 requantization

Syntax:

operation ::= `gemmini.requantize` $input attr-dict `:` type($input) `->` type($result)

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
scale::mlir::FloatAttr32-bit float attribute
zeroPoint::mlir::IntegerAttr64-bit signless integer attribute
qmin::mlir::IntegerAttr64-bit signless integer attribute
qmax::mlir::IntegerAttr64-bit signless integer attribute

Operands:

Operand Description
input ranked tensor of any type values

Results:

Result Description
result ranked tensor of any type values