MCPcopy
hub / github.com/apache/tvm / f

Function f

tests/python/tirx/test_layout.py:1110–1119  ·  view source on GitHub ↗
(i0, i1)

Source from the content-addressed store, hash-verified

1108 layout = TileLayout(S[(2, 3, 4, 2, 2) : (1, 2, 12, 6, 48)])
1109
1110 def f(i0, i1):
1111 leaf1 = i0 // 3
1112 leaf2 = i0 % 3
1113 leaf3 = i1 // 4
1114 leaf4 = (i1 % 4) // 2
1115 leaf5 = i1 % 2
1116 assert (
1117 layout.apply(i0, i1, shape=(6, 16))["m"]
1118 == leaf1 * 1 + leaf2 * 2 + leaf3 * 12 + leaf4 * 6 + leaf5 * 48
1119 )
1120
1121 for i0, i1 in itertools.product(range(6), range(16)):
1122 f(i0, i1)

Callers 15

test_tile_layout_2Function · 0.70
test_trainium_layout_1Function · 0.70
test_sortFunction · 0.50
test_sort_npFunction · 0.50
verifyFunction · 0.50
verify_batch_matmulFunction · 0.50
verifyFunction · 0.50
verifyFunction · 0.50
check_llvmFunction · 0.50
check_throwsFunction · 0.50
checkFunction · 0.50

Calls 1

applyMethod · 0.45

Tested by

no test coverage detected