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

Method call_py_func

python/tvm/relax/base_py_module.py:277–282  ·  view source on GitHub ↗

Call a Python function stored in the module's pyfuncs.

(self, func_name: str, args)

Source from the content-addressed store, hash-verified

275 return out[0] if len(out) == 1 else out
276
277 def call_py_func(self, func_name: str, args):
278 """Call a Python function stored in the module's pyfuncs."""
279 if func_name not in self.pyfuncs:
280 raise ValueError(f"Python function '{func_name}' not found in module pyfuncs")
281 py_func = self.pyfuncs[func_name]
282 return py_func(self, *args)
283
284 def _create_output_tensors(self, out_sinfo, in_args=None):
285 # pylint: disable=import-outside-toplevel

Callers 8

call_py_funcFunction · 0.80
test_invalid_callMethod · 0.80
mixed_computationMethod · 0.80
simple_callMethod · 0.80
multiple_callsMethod · 0.80
mainMethod · 0.80

Calls

no outgoing calls

Tested by 5

test_invalid_callMethod · 0.64
mixed_computationMethod · 0.64
simple_callMethod · 0.64
multiple_callsMethod · 0.64