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

Function test_block

tests/python/tvmscript/test_tvmscript_printer_tir.py:154–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152
153
154def test_block():
155 i = tirx.Var("i", "int32")
156 j = tirx.Var("j", "int32")
157 k = tirx.Var("k", "int32")
158 with IRBuilder() as ib:
159 with T.sblock(name="block", no_realize=False):
160 vi = ib.name("vi", T.axis.spatial(128, i))
161 vj = ib.name("vj", T.axis.spatial(64, j))
162 vk = ib.name("vk", T.axis.reduce(32, k))
163 T.reads()
164 T.writes()
165 T.evaluate(0)
166 obj = ib.get().block
167 _assert_print(
168 obj,
169 """
170with T.sblock("block", no_realize=True):
171 vi = T.axis.spatial(128)
172 vj = T.axis.spatial(64)
173 vk = T.axis.reduce(32)
174 T.reads()
175 T.writes()
176 T.evaluate(0)""",
177 )
178
179
180def test_match_buffer_region():

Callers

nothing calls this directly

Calls 7

IRBuilderClass · 0.90
spatialMethod · 0.80
reduceMethod · 0.80
_assert_printFunction · 0.70
nameMethod · 0.45
evaluateMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…