vector.constant
← vector dialect
Materialize a compile-time vector value whose every lane has the same scalar attribute payload. The result type supplies both the vector shape and the element type used to interpret the payload.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure, ConstantLike, RefinableResultTypeRefs |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Result |
result |
vector |
required |
— |
| Attribute |
value |
any |
required |
The constant payload. |
Verification constraints
AttrMatchesElementType(value, result)
Examples
%v = vector.constant 0.0 : vector<4xf32>