()
| 137 | |
| 138 | |
| 139 | def 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 | |
| 153 | def test_simple_rm_all_unused(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…