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

Function test_var_pattern

tests/python/relax/test_dataflow_pattern.py:95–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93
94
95def test_var_pattern():
96 v = is_var("x")
97 assert isinstance(v, VarPattern)
98 assert v.name == "x"
99 assert v.match(rx.Var("x"))
100 assert is_var().match(rx.Var("x"))
101 assert is_var().match(rx.DataflowVar("x")) # DataflowVar is also a Var
102 assert not v.match(rx.GlobalVar("x"))
103
104
105def test_dataflow_var_pattern():

Callers

nothing calls this directly

Calls 2

is_varFunction · 0.85
matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…