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

Function test_compose_layout_0

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

Source from the content-addressed store, hash-verified

1184
1185 ################ Compose Layout
1186 def test_compose_layout_0():
1187 layoutA = SwizzleLayout(per_element=3, swizzle_len=3, atom_len=3)
1188 layoutB = TileLayout(S[(8, 64) : (64, 1)])
1189 layout = ComposeLayout(layoutA, layoutB)
1190 assert layout.size() == 512
1191 assert layout.span() == 512
1192 for i, j in itertools.product(range(8), range(64)):
1193 assert (
1194 layout.apply(i * 64 + j)["m"] == layoutA.apply(layoutB.apply(i * 64 + j)["m"])["m"]
1195 )
1196
1197 test_compose_layout_0()
1198

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…