MCPcopy Create free account
hub / github.com/apache/tvm-ffi / get_function

Method get_function

python/tvm_ffi/module.py:172–192  ·  view source on GitHub ↗

Get function from the module. Parameters ---------- name The name of the function query_imports Whether to also query modules imported by this module. Returns ------- The result function.

(self, name: str, query_imports: bool = False)

Source from the content-addressed store, hash-verified

170 return func
171
172 def get_function(self, name: str, query_imports: bool = False) -> core.Function:
173 """Get function from the module.
174
175 Parameters
176 ----------
177 name
178 The name of the function
179
180 query_imports
181 Whether to also query modules imported by this module.
182
183 Returns
184 -------
185 The result function.
186
187 """
188 func = _ffi_api.ModuleGetFunction(self, name, query_imports)
189 func = cast(core.Function, func)
190 if func is None:
191 raise AttributeError(f"Module has no function '{name}'")
192 return func
193
194 def get_function_metadata(
195 self, name: str, query_imports: bool = False

Callers 15

__getattr__Method · 0.95
__getitem__Method · 0.95
_load_invoke_nFunction · 0.45
addMethod · 0.45
set_link_orderMethod · 0.45
test_load_and_executeFunction · 0.45
test_function_not_foundFunction · 0.45

Calls

no outgoing calls