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

Function test_simple_used_by

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

Source from the content-addressed store, hash-verified

337
338## Graph-wise Matching
339def test_simple_used_by():
340 with PatternContext() as ctx:
341 n0 = is_var("x") # x is a free var (fn arg)
342 n1 = wildcard()
343 n0 ^ n1
344 dfb = main_fn.body.blocks[0]
345 matched = ctx.match_dfb(dfb)
346 assert matched
347 assert matched[n0] == main_fn.params[0]
348 assert matched[n1] == dfb.bindings[0].var
349
350
351def test_simple_call_tir_edge():

Callers

nothing calls this directly

Calls 4

PatternContextClass · 0.85
is_varFunction · 0.85
wildcardFunction · 0.85
match_dfbMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…