tvm_tirx.script.ir_builder.decl_function

Contents

tvm_tirx.script.ir_builder.decl_function#

tvm_tirx.script.ir_builder.decl_function(func_name, func_signature)#

Register a function signature or a completed function in the active module.

Parameters:
  • func_name (str) – The function unique name.

  • func_signature (BaseFunc) – A function signature or completed function. A signature reserves the global variable for later native frame completion; a completed function is installed directly.

Return type:

GlobalVar

Note

Native function frames complete previously declared bodies while retaining the declared global variable identity.

Returns:

gv (GlobalVar) – The corresponding GlobalVar.

Parameters:
  • func_name (str)

  • func_signature (BaseFunc)

Return type:

GlobalVar