Skip to content

global.variable

← global dialect

Mutable global value with an optional inline scalar default initializer. Can be stored from any function at any time. Declaration-local dim/encoding names and predicates work the same as global.constant.

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.variable @kv_cache : tile<[%s]x[%d]xf32> where [mul(%s, 64)]
global.variable @step_count : index = 0