()
| 109 | |
| 110 | |
| 111 | def 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 | |
| 131 | def test_complete_matmul_original(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…