MCPcopy Index your code
hub / github.com/apache/tvm / test_tile_layout_1

Function test_tile_layout_1

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

Source from the content-addressed store, hash-verified

1084 test_tile_layout_0()
1085
1086 def test_tile_layout_1():
1087 layout = TileLayout(S[(8, 8) : (10, 1)])
1088 for i, j in itertools.product(range(8), range(8)):
1089 assert layout.apply(i * 8 + j)["m"] == i * 10 + j * 1
1090 for i, j in itertools.product(range(8), range(8)):
1091 assert layout.apply(i, j, shape=(8, 8))["m"] == i * 10 + j * 1
1092
1093 # # apply can accept coord larger than size
1094 # for p in range(1024):
1095 # outer = p // 64
1096 # inner = p % 64
1097 # i, j = inner // 8, inner % 8
1098 # assert (
1099 # layout.apply(
1100 # p,
1101 # )[0]
1102 # == outer * 78 + i * 10 + j * 1
1103 # )
1104
1105 test_tile_layout_1()
1106

Callers 1

test_applyFunction · 0.85

Calls 3

TileLayoutClass · 0.90
productMethod · 0.80
applyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…