global.constant
← global dialect
Immutable global value with an optional inline scalar initializer. Declaration-local dim/encoding names in the type annotation express structural constraints. Predicates constrain dynamic dimensions and are propagated to every load site as value facts. Non-scalar or computed initialization is modeled by global.store in initializer functions; resource-backed artifact payloads belong in global.rodata.def instead of overloading inline attrs.
Operation contract
| Property |
Value |
| Semantic phase |
— |
| Traits |
SymbolDefine |
Symbol contract
| Property |
Value |
| Kind |
global |
| Defining field |
symbol |
| Interfaces |
global |
| Flags |
— |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Result |
type |
any |
required |
— |
| Attribute |
symbol |
symbol |
required |
— |
| Attribute |
predicates |
predicate_list |
optional |
— |
| Attribute |
initializer |
any |
optional |
— |
Examples
global.constant @pi : f32 = 3.14159265358979
global.constant @weights : tile<[%m]x[%k]xf32> where [mul(%m, 16)]