MCPcopy Index your code
hub / github.com/apache/tvm / function

Method function

python/tvm/relax/exec_builder.py:96–101  ·  view source on GitHub ↗

annotate a VM function.

(
        self, func_name: str, num_inputs: int | None = 0, param_names: list[str] | None = None
    )

Source from the content-addressed store, hash-verified

94 _ffi_api.ExecBuilderDeclareFunction(self, func_name, kind) # type: ignore
95
96 def function(
97 self, func_name: str, num_inputs: int | None = 0, param_names: list[str] | None = None
98 ) -> VMFuncScope:
99 """annotate a VM function."""
100 _ffi_api.ExecBuilderEmitFunction(self, func_name, num_inputs, param_names) # type: ignore
101 return VMFuncScope(lambda: _ffi_api.ExecBuilderEndFunction(self, func_name)) # type: ignore
102
103 def _check_scope(self) -> None:
104 if len(VMFuncScope.stack) == 0:

Callers 15

test_vm_executeFunction · 0.95
test_vm_multiple_funcFunction · 0.95
test_vm_checkerFunction · 0.95
test_neg_immFunction · 0.95
test_emit_cacheFunction · 0.95
test_vm_formalizeFunction · 0.95
test_vm_operandFunction · 0.95
test_vm_shapeofFunction · 0.95
test_vm_storageFunction · 0.95
test_vm_gotoFunction · 0.95
test_vm_ifFunction · 0.95
test_vm_invoke_closureFunction · 0.95

Calls 1

VMFuncScopeClass · 0.85

Tested by 15

test_vm_executeFunction · 0.76
test_vm_multiple_funcFunction · 0.76
test_vm_checkerFunction · 0.76
test_neg_immFunction · 0.76
test_emit_cacheFunction · 0.76
test_vm_formalizeFunction · 0.76
test_vm_operandFunction · 0.76
test_vm_shapeofFunction · 0.76
test_vm_storageFunction · 0.76
test_vm_gotoFunction · 0.76
test_vm_ifFunction · 0.76
test_vm_invoke_closureFunction · 0.76