vector.fragment
← vector dialect
Attach a matrix-fragment interpretation to a physical vector value without changing the physical vector type. The role selects how the shape operands are interpreted: lhs is [m, k], rhs is [k, n], and init/result are [m, n]. A leading block extent forms independent batched fragments [b, m, k], [b, k, n], and [b, m, n]. Dense/default fragments need only the data value and shape SSA values. Encoded fragments carry schema and scale/table/sparse metadata values in the keyed using dictionary so bulk runtime data remains ordinary SSA while lowering can consume a compact resolved fragment fact.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure, RefinableResultTypeRefs, ValueAlias |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
data |
vector |
required |
Physical vector lanes or packed registers. |
| Operand |
blocks |
index |
optional |
Optional independent matrix block count. |
| Operand |
rows |
index |
required |
Logical matrix row count for this fragment role. |
| Operand |
columns |
index |
required |
Logical matrix column count for this fragment role. |
| Operand |
params |
any |
variadic |
Optional schema, scale, table, metadata, or online state operands. |
| Result |
result |
vector |
required |
The same physical vector value with fragment facts. |
| Attribute |
role |
enum VectorFragmentRole |
required |
— |
| Attribute |
param_names |
dict |
optional |
Sorted fragment parameter names mapped to parameter operand ordinals. |
| Attribute |
predicates |
predicate_list |
optional |
Optional local facts constraining fragment shape or parameter values. |
Verification constraints
Examples
%fragment = vector.fragment<lhs> %payload shape [%m, %k] : vector<4xi32>
%fragment = vector.fragment<rhs> %payload shape [%k, %n] using {scale = %scale : vector<1xf16>, schema = %schema : encoding<schema>} : vector<4xi32>