vector.transpose
← vector dialect
Permute vector register axes. The template list maps each result axis to a source axis: permutation[i] is the source axis used for result axis i, so <[1, 0]> maps vector to vector. This does not touch memory layout; it only reorders lanes in the register value.
Operation contract
| Property |
Value |
| Semantic phase |
— |
| Traits |
Pure |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
source |
vector |
required |
— |
| Result |
result |
vector |
required |
— |
| Attribute |
permutation |
i64_array |
required |
Result-axis to source-axis permutation. The list length must equal the source rank and must mention each source axis exactly once. |
Verification constraints
SameElementType(source, result)
Examples
%t = vector.transpose<[1, 0]> %v : vector<4x8xf32> -> vector<8x4xf32>