Skip to content

vector.refine

← vector dialect

Refine the logical shape attached to an existing vector while preserving every lane value. This is an explicit SSA assertion that dynamic and static extents in the source and result describe the same lane grid.

Operation contract

Property Value
Semantic phase —
Traits Pure, RefinableResultTypeRefs, FactIdentity

Signature

Kind Name Type Cardinality Description
Operand source vector required Source vector to refine.
Result result vector required Same vector with refined shape information.

Verification constraints

  • SameElementType(source, result)
  • RanksMatch(source, result)

Examples

%refined = vector.refine %source : vector<[%m]xf32> -> vector<[%n]xf32>