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

Function test_complete_matmul

tests/python/tvmscript/test_tvmscript_complete.py:111–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109
110
111def test_complete_matmul():
112 func = matmul
113 A, B, C = [func.buffer_map[x] for x in func.params]
114
115 block = func.body.block.body.body.body.body.block
116 assert isinstance(block, tvm.tirx.SBlock)
117 vi, vj, vk = [x.var for x in block.iter_vars]
118 access_A = tvm.tirx.BufferRegion(
119 A, [Range.from_min_extent(vi, 1), Range.from_min_extent(vk, 1)]
120 )
121 access_B = tvm.tirx.BufferRegion(
122 B, [Range.from_min_extent(vj, 1), Range.from_min_extent(vk, 1)]
123 )
124 access_C = tvm.tirx.BufferRegion(
125 C, [Range.from_min_extent(vi, 1), Range.from_min_extent(vj, 1)]
126 )
127 tvm.ir.assert_structural_equal(block.reads, [access_A, access_B])
128 tvm.ir.assert_structural_equal(block.writes, [access_C])
129
130
131def test_complete_matmul_original():

Callers

nothing calls this directly

Calls 1

from_min_extentMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…