Skip to content

low.func.decl

← low dialect

Target-bound low function declaration with register-typed signature values. Allocation and scheduling exactness independently describe the imported implementation contract.

Operation contract

Property Value
Semantic phase executable
Traits SymbolDefine
Interfaces FuncLike

Symbol contract

Property Value
Kind function
Defining field callee
Interfaces func_like, callable
Flags declaration

Signature

Kind Name Type Cardinality Description
Operand args register variadic —
Result results register variadic —
Attribute callee symbol required —
Attribute target symbol (target) optional —
Attribute descriptor_set string required Canonical descriptor-set key governing the low representation.
Attribute abi enum ExportAbiKind optional —
Attribute abi_attrs dict optional —
Attribute abi_layout dict optional —
Attribute export_symbol string optional —
Attribute export_attrs dict optional —
Attribute visibility enum Visibility optional —
Attribute cc enum CallingConv optional —
Attribute purity enum Purity optional —
Attribute inline_policy enum InlinePolicy optional —
Attribute allocation enum LowAllocationMode optional —
Attribute schedule enum LowScheduleMode optional —
Attribute predicates predicate_list optional —
Attribute retain enum Retain optional —
Attribute import_kind enum LowCodeImportKind optional —
Attribute code_symbol string optional —
Attribute import_module string optional Runtime module namespace owning the imported code symbol.

Examples

low.func.decl target<amdgpu.gfx11.generic.core>(@gfx11_generic) @extern_add(%lhs: reg<amdgpu.vgpr x1>, %rhs: reg<amdgpu.vgpr x1>) -> (reg<amdgpu.vgpr x1>)
low.func.decl allocation(fixed) import(rocasm, "fixed_register_fragment") target<amdgpu.gfx11.generic.core>(@gfx11_generic) @fixed_register_fragment(%acc: reg<amdgpu.vgpr x4>) -> (reg<amdgpu.vgpr x4>)
low.func.decl schedule(locked) import(rocasm, "exact_order_fragment") target<amdgpu.gfx11.generic.core>(@gfx11_generic) @exact_order_fragment(%acc: reg<amdgpu.vgpr x4>) -> (reg<amdgpu.vgpr x4>)