vector.fragment.repack
← vector dialect
Repack a native matrix-fragment payload to another fragment role without going through memory. The source value must carry fragment facts naming its current role and shape; the target role interprets the result vector lanes and payload registers. The logical shape operands are shared by both roles, so result row/column payloads can become lhs row/reduction or rhs reduction/column payloads for attention-style fragment reuse. When the source and result element types differ, the op also represents a fragment-shaped numeric conversion that target lowering must select explicitly or reject with target diagnostics.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure, RefinableResultTypeRefs |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
source |
vector |
required |
Native source matrix fragment payload. |
| Operand |
blocks |
index |
optional |
Optional independent matrix block count. |
| Operand |
rows |
index |
required |
Logical matrix row count for the fragment tile. |
| Operand |
columns |
index |
required |
Logical matrix column or reduction count for the fragment tile. |
| Result |
result |
vector |
required |
Native target matrix fragment payload. |
| Attribute |
role |
enum VectorFragmentRole |
required |
— |
Examples
%lhs = vector.fragment.repack<lhs> %acc shape [%m, %k] : vector<8xf32> -> vector<16xbf16>