MCPcopy Create free account
hub / github.com/apache/tvm / test_compose_layout_1

Function test_compose_layout_1

tests/python/tirx/test_layout.py:1199–1209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

test_applyFunction · 0.85

Calls 7

SwizzleLayoutClass · 0.90
TileLayoutClass · 0.90
ComposeLayoutClass · 0.90
spanMethod · 0.80
productMethod · 0.80
sizeMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…