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

Function eval_assign

python/tvm/script/parser/core/evaluator.py:471–498  ·  view source on GitHub ↗

Expression assignment evaluation for TVMScript parser. Parameters ---------- parser : Parser The parser bound with the evaluator. target : doc.expr The root node of AST tree node of assigned expression to evaluate. source : Any The source to be assigned

(
    parser: "Parser",
    target: doc.expr,
    source: Any,
)

Source from the content-addressed store, hash-verified

469
470
471def eval_assign(
472 parser: "Parser",
473 target: doc.expr,
474 source: Any,
475) -> dict[str, Any]:
476 """Expression assignment evaluation for TVMScript parser.
477
478 Parameters
479 ----------
480 parser : Parser
481 The parser bound with the evaluator.
482
483 target : doc.expr
484 The root node of AST tree node of assigned expression to evaluate.
485
486 source : Any
487 The source to be assigned with evaluated expression.
488
489 Returns
490 -------
491 res : Any
492 The evaluation result.
493 """
494 try:
495 return _eval_assign(target, source)
496 except Exception as err: # pylint: disable=broad-except
497 parser.report_error(target, err)
498 raise
499
500
501def _eval_expr(

Callers 1

eval_assignMethod · 0.85

Calls 2

_eval_assignFunction · 0.85
report_errorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…