Skip to content

kernel.decl

← kernel dialect

Bodyless declaration of a dispatchable kernel. The first signature declares workload values consumed by launch configuration and the launch signature declares the device ABI.

Operation contract

Property Value
Semantic phase executable
Traits SymbolDefine
Interfaces FuncLike

Symbol contract

Property Value
Kind kernel
Defining field callee
Interfaces func_like, kernel
Flags declaration

Signature

Kind Name Type Cardinality Description
Operand workloads any variadic —
Operand args any variadic —
Attribute callee symbol required —
Attribute target symbol (target) optional —
Attribute export_symbol string optional Artifact export name override; omission exports the kernel's symbol name.
Attribute export_linkage enum ExportLinkage optional —
Attribute predicates predicate_list optional —
Attribute retain enum Retain optional —

Examples

kernel.decl @scale_i32_buffer(%element_count: index) launch(%element_count: index, %input: buffer, %output: buffer)
kernel.decl @no_workload() launch(%output: buffer)