()
| 191 | |
| 192 | |
| 193 | def 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 | |
| 209 | def test_empty_dfb_after_all_removal(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…