()
| 123 | |
| 124 | |
| 125 | def test_block_realize(): |
| 126 | i = tirx.Var("i", "int32") |
| 127 | j = tirx.Var("j", "int32") |
| 128 | k = tirx.Var("k", "int32") |
| 129 | with IRBuilder() as ib: |
| 130 | with T.sblock(name="block", no_realize=False): |
| 131 | vi = ib.name("vi", T.axis.spatial(128, i)) |
| 132 | vj = ib.name("vj", T.axis.spatial(64, j)) |
| 133 | vk = ib.name("vk", T.axis.reduce(32, k)) |
| 134 | T.reads() |
| 135 | T.writes() |
| 136 | T.evaluate(0) |
| 137 | obj = ib.get() |
| 138 | _assert_print( |
| 139 | obj, |
| 140 | """ |
| 141 | i = T.int32() |
| 142 | j = T.int32() |
| 143 | k = T.int32() |
| 144 | with T.sblock("block"): |
| 145 | vi = T.axis.spatial(128, i) |
| 146 | vj = T.axis.spatial(64, j) |
| 147 | vk = T.axis.reduce(32, k) |
| 148 | T.reads() |
| 149 | T.writes() |
| 150 | T.evaluate(0)""", |
| 151 | ) |
| 152 | |
| 153 | |
| 154 | def test_block(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…