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

Function test_basic_visitor

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

Test the basic AST printer visitor

()

Source from the content-addressed store, hash-verified

203
204
205def test_basic_visitor():
206 """Test the basic AST printer visitor"""
207 expr = Add(Var("x", dtype="int32"), Var("y", dtype="int32"))
208 printer = ASTPrinter()
209 printer.visit_expr(expr)
210 assert str(printer.log) == "\n".join(["Stmt: Add", "Stmt: Var", "Stmt: Var"])
211
212
213def test_simple_expr_counter():

Callers 1

Calls 6

visit_exprMethod · 0.95
AddClass · 0.90
VarClass · 0.90
strFunction · 0.85
ASTPrinterClass · 0.70
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…