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

Function test_empty_dfb_after_removal

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

Source from the content-addressed store, hash-verified

191
192
193def test_empty_dfb_after_removal():
194 root_fn = DeadDFBlock["main"]
195 dfb = root_fn.body.blocks[0]
196
197 rwt = DataflowBlockRewrite(dfb, root_fn)
198 rwt.remove_unused(DeadDFBlock["main"].body.blocks[0].bindings[0].var)
199
200 @tvm.script.ir_module
201 class GroundTruth:
202 @R.function
203 def main(x: R.Tensor((32, 32), "float32")) -> R.Tensor((32, 32), "float32"):
204 return x
205
206 tvm.ir.assert_structural_equal(rwt.mutated_root_fn(), GroundTruth["main"])
207
208
209def test_empty_dfb_after_all_removal():

Callers

nothing calls this directly

Calls 3

remove_unusedMethod · 0.95
mutated_root_fnMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…