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

Method parse

python/tvm/script/parser/core/parser.py:387–406  ·  view source on GitHub ↗

The main parse method for parser. Parameters ---------- extra_vars : Optional[Dict[str, Any]] The optional global value table for parsing. Returns ------- res : Any The doc AST node visiting result.

(self, extra_vars: dict[str, Any] | None = None)

Source from the content-addressed store, hash-verified

385 self.inside_function = False
386
387 def parse(self, extra_vars: dict[str, Any] | None = None) -> Any:
388 """The main parse method for parser.
389
390 Parameters
391 ----------
392 extra_vars : Optional[Dict[str, Any]]
393 The optional global value table for parsing.
394
395 Returns
396 -------
397 res : Any
398 The doc AST node visiting result.
399 """
400 if extra_vars is None:
401 extra_vars = {}
402 with self.var_table.with_frame():
403 for k, v in extra_vars.items():
404 self.var_table.add(k, v)
405 node = self.diag.source.as_ast()
406 self.visit(node)
407
408 def get_dispatch_token(self, node: doc.FunctionDef) -> str:
409 if not isinstance(node, doc.FunctionDef):

Callers 15

parseFunction · 0.95
from_stablehloFunction · 0.80
_get_pygments_styleFunction · 0.80
as_astMethod · 0.80
parseFunction · 0.80
checkFunction · 0.80
emit_smemFunction · 0.80
checkFunction · 0.80
emit_regFunction · 0.80
triton.pyFile · 0.80
build_test_setFunction · 0.80

Calls 5

visitMethod · 0.95
with_frameMethod · 0.80
as_astMethod · 0.80
itemsMethod · 0.45
addMethod · 0.45

Tested by 1

build_test_setFunction · 0.64