()
| 1197 | test_compose_layout_0() |
| 1198 | |
| 1199 | def test_compose_layout_1(): |
| 1200 | layoutA = SwizzleLayout(per_element=3, swizzle_len=3, atom_len=3) |
| 1201 | layoutB = TileLayout(S[(16, 64, 8) : (64, 1, 1024)]) |
| 1202 | layout = ComposeLayout(layoutA, layoutB) |
| 1203 | assert layout.size() == 16 * 64 * 8 |
| 1204 | assert layout.span() == 16 * 64 * 8 |
| 1205 | for i, j, k in itertools.product(range(16), range(64), range(8)): |
| 1206 | assert ( |
| 1207 | layout.apply(i * 64 * 8 + j * 8 + k)["m"] |
| 1208 | == layoutA.apply(layoutB.apply(i * 64 * 8 + j * 8 + k)["m"])["m"] |
| 1209 | ) |
| 1210 | |
| 1211 | test_compose_layout_1() |
| 1212 |
no test coverage detected
searching dependent graphs…