()
| 127 | |
| 128 | |
| 129 | def test_for(): |
| 130 | @T.prim_func(s_tir=True) |
| 131 | def func1(): |
| 132 | for i, j in T.grid(128, 128): |
| 133 | with T.sblock(): |
| 134 | pass |
| 135 | |
| 136 | @T.prim_func(s_tir=True) |
| 137 | def func2(): |
| 138 | for i, j, k in T.grid(128, 128, 128): |
| 139 | with T.sblock(): |
| 140 | pass |
| 141 | |
| 142 | func1 = func1.with_attr("global_symbol", "main") |
| 143 | func2 = func2.with_attr("global_symbol", "main") |
| 144 | |
| 145 | with pytest.raises(ValueError) as ve: |
| 146 | assert_structural_equal(func1, func2) |
| 147 | assert _error_message(ve.value) == _expected_result( |
| 148 | func1, |
| 149 | func2, |
| 150 | AccessPath.root().attr("body").attr("block").attr("body").attr("body").attr("body"), |
| 151 | AccessPath.root().attr("body").attr("block").attr("body").attr("body").attr("body"), |
| 152 | ) |
| 153 | |
| 154 | |
| 155 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected
searching dependent graphs…