vector.decode
← vector dialect
Decode physical encoded vector payload lanes into logical numeric lanes using an explicit encoding witness. The schema value carries compact representation facts such as element format, block extent, packing order, rounding, and sparsity kind. Bulk or runtime-varying interpretation data such as scales, zero-points, codebook rows, sparse metadata, residual streams, signs, and online amax values stay visible as auxiliary SSA operands instead of being hidden inside the encoding value.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure, RefinableResultTypeRefs |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
payload |
vector |
required |
Physical encoded payload lanes. |
| Operand |
schema |
encoding<schema> |
required |
Schema witness for interpreting the payload. |
| Operand |
auxiliary |
vector |
variadic |
Explicit scale, table, metadata, or online state operands. |
| Result |
result |
vector |
required |
Decoded logical numeric lanes. |
| Attribute |
auxiliary_names |
dict |
optional |
Sorted auxiliary operand keys mapped to auxiliary operand ordinals. |
Examples
%values = vector.decode %payload using %schema {scale = %scale : vector<1xf16>} : vector<4xi32>, encoding<schema> -> vector<32xf32>
%values = vector.decode %payload using %schema : vector<4xi32>, encoding<schema> -> vector<32xf32>