Skip to content

'iree_vector_ext' Dialectlink

IREE Vector Extensions.

A dialect designed for experimenting with vector operations beyond what is currently available in the Vector Dialect.

Operationslink

iree_vector_ext.layout_conflict_resolution (VectorExt::LayoutConflictResolutionOp)link

Layout Conflict Resolution operator

Syntax:

operation ::= `iree_vector_ext.layout_conflict_resolution` $input attr-dict `:` type($input) `->` type($output)

The layout conflict resolution operator takes a vector and a desired layout and transforms the vector to one with the desired layout.

Attributes:link
AttributeMLIR TypeDescription
sourceLayout::mlir::iree_compiler::IREE::VectorExt::VectorLayoutInterfaceVectorLayoutInterface instance
desiredLayout::mlir::iree_compiler::IREE::VectorExt::VectorLayoutInterfaceVectorLayoutInterface instance
Operands:link
Operand Description
input vector of any type values
Results:link
Result Description
output vector of any type values

iree_vector_ext.to_simd (VectorExt::ToSIMDOp)link

SIMT to SIMD conversion operation

Syntax:

operation ::= `iree_vector_ext.to_simd` $input attr-dict `:` type($input) `->` type($output)

This operation is a temporary operation useful for source/target materializations when doing type conversions between distributed and not distributed vectors.

Traits: AlwaysSpeculatableImplTrait, SameOperandsAndResultElementType

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:link
Operand Description
input vector of any type values
Results:link
Result Description
output vector of any type values

iree_vector_ext.to_simt (VectorExt::ToSIMTOp)link

SIMD to SIMT conversion operation

Syntax:

operation ::= `iree_vector_ext.to_simt` $input attr-dict `:` type($input) `->` type($output)

This operation is a temporary operation useful for source/target materializations when doing type conversions between distributed and not distributed vectors.

Traits: AlwaysSpeculatableImplTrait, SameOperandsAndResultElementType

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:link
Operand Description
input vector of any type values
Results:link
Result Description
output vector of any type values

Attributeslink

LayoutAttrlink

high-dimensional vector register layout for a given vector

Syntax:

#iree_vector_ext.layout<
  ::llvm::ArrayRef<PerDimLayoutAttr>   # layouts
>

This contains a complete specification of the layout for a given vector, whereas the attribute above only specifies the per dimension layout.

Parameters:link
Parameter C++ type Description
layouts ::llvm::ArrayRef<PerDimLayoutAttr> layout for each dimension of the vector

LayoutDimensionAttrlink

Describes the dimension of the high-dimensional layout

Syntax:

#iree_vector_ext.dimension<
  ::mlir::iree_compiler::IREE::VectorExt::LayoutDimension   # value
>

Enum cases: * BATCHX (BATCHX) * BATCHY (BATCHY) * VECTORX (VECTORX) * VECTORY (VECTORY) * VECTORZ (VECTORZ) * LANEX (LANEX) * LANEY (LANEY) * LANEZ (LANEZ)

Parameters:link
Parameter C++ type Description
value ::mlir::iree_compiler::IREE::VectorExt::LayoutDimension an enum of type LayoutDimension

PerDimLayoutAttrlink

high-dimensional vector register layout for a given vector dimension

Syntax:

#iree_vector_ext.per_dim_layout<
  ::llvm::ArrayRef<LayoutDimensionAttr>,   # labels
  ::llvm::ArrayRef<int64_t>   # shapes
>

This attribute describes the per dimension register layout for a given vector that could be prescribed by an operator such as matrix multiplication. This is a way to explicitly represent the layout in the IR when it is in the SIMD form prior to converting to the SIMT form so that we can reason about layouts, propagating layouts and layout conflicts.

Parameters:link
Parameter C++ type Description
labels ::llvm::ArrayRef<LayoutDimensionAttr> labels for the high dimensional layout dims
shapes ::llvm::ArrayRef<int64_t> shapes for the high dimensional layout dims