MCPcopy Create free account
hub / github.com/apache/tvm / ASTPrinter

Class ASTPrinter

tests/python/tirx-transform/test_tir_functor.py:65–78  ·  view source on GitHub ↗

Print tirx AST in structured format. The shape of Node is ignored.

Source from the content-addressed store, hash-verified

63
64@tirx.functor.visitor
65class ASTPrinter(PyStmtExprVisitor):
66 """Print tirx AST in structured format. The shape of Node is ignored."""
67
68 def __init__(self) -> None:
69 super().__init__()
70 self.log = ASTLog()
71
72 def visit_var_(self, op: Var) -> None:
73 self.log.add("Stmt: Var")
74 super().visit_var_(op)
75
76 def visit_add_(self, op: Add) -> None:
77 self.log.add("Stmt: Add")
78 super().visit_add_(op)
79
80
81@tirx.functor.visitor

Callers 1

test_basic_visitorFunction · 0.70

Calls

no outgoing calls

Tested by 1

test_basic_visitorFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…