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

Function get_func

python/tvm/tirx/script/parser/parser.py:677–687  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

675 definition_depth = len(self.var_table.frames)
676
677 def get_func():
678 func_ast = from_doc(node)
679 module_ast = ast.Module(body=[func_ast], type_ignores=[])
680 ast.fix_missing_locations(module_ast)
681 # set the filename to the source name, so that the error message can be reported correctly
682 code_obj = compile(module_ast, filename=self.diag.source.source_name, mode="exec")
683 namespace = self.var_table.get()
684 exec(code_obj, namespace) # pylint: disable=exec-used
685 func_name = func_ast.name
686 func = namespace[func_name]
687 return func, func_name
688
689 func, func_name = get_func()
690 wrapper = inline(func, definition_depth=definition_depth, defining_var_table=self.var_table)

Callers 1

Calls 4

from_docFunction · 0.90
ModuleMethod · 0.80
compileFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…