()
| 152 | |
| 153 | |
| 154 | def test_block(): |
| 155 | i = tirx.Var("i", "int32") |
| 156 | j = tirx.Var("j", "int32") |
| 157 | k = tirx.Var("k", "int32") |
| 158 | with IRBuilder() as ib: |
| 159 | with T.sblock(name="block", no_realize=False): |
| 160 | vi = ib.name("vi", T.axis.spatial(128, i)) |
| 161 | vj = ib.name("vj", T.axis.spatial(64, j)) |
| 162 | vk = ib.name("vk", T.axis.reduce(32, k)) |
| 163 | T.reads() |
| 164 | T.writes() |
| 165 | T.evaluate(0) |
| 166 | obj = ib.get().block |
| 167 | _assert_print( |
| 168 | obj, |
| 169 | """ |
| 170 | with T.sblock("block", no_realize=True): |
| 171 | vi = T.axis.spatial(128) |
| 172 | vj = T.axis.spatial(64) |
| 173 | vk = T.axis.reduce(32) |
| 174 | T.reads() |
| 175 | T.writes() |
| 176 | T.evaluate(0)""", |
| 177 | ) |
| 178 | |
| 179 | |
| 180 | def test_match_buffer_region(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…