Skip to content

vector.concat

← vector dialect

Concatenate one or more same-rank vectors along the template axis. All non-concatenated axes must match the result shape, and when static the result axis extent must equal the sum of input extents.

Operation contract

Property Value
Semantic phase —
Traits Pure

Signature

Kind Name Type Cardinality Description
Operand inputs vector variadic —
Result result vector required —
Attribute axis i64 required Axis along which input extents concatenate.

Verification constraints

  • SameElementType(inputs, result)
  • DimIndexInBounds(result, axis)

Examples

%wide = vector.concat<0> %a, %b : vector<4xf32>, vector<4xf32> -> vector<8xf32>
%cols = vector.concat<1> %a, %b : vector<4x8xf32>, vector<4x8xf32> -> vector<4x16xf32>