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

Function test_remove_unused_undef

tests/python/relax/test_binding_rewrite.py:139–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137
138
139def test_remove_unused_undef():
140 root_fn = Identity["main"]
141 dfb = root_fn.body.blocks[0]
142
143 with pytest.raises(RuntimeError):
144 rwt = DataflowBlockRewrite(dfb, root_fn)
145 rwt.remove_unused(Var("whatever"))
146
147 rwt = DataflowBlockRewrite(dfb, root_fn)
148 rwt.remove_unused(Var("whatever"), allow_undef=True)
149
150 assert root_fn == rwt.mutated_root_fn()
151
152
153def test_simple_rm_all_unused():

Callers

nothing calls this directly

Calls 4

remove_unusedMethod · 0.95
mutated_root_fnMethod · 0.95
VarClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…