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

Function test_block_realize

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

Source from the content-addressed store, hash-verified

123
124
125def test_block_realize():
126 i = tirx.Var("i", "int32")
127 j = tirx.Var("j", "int32")
128 k = tirx.Var("k", "int32")
129 with IRBuilder() as ib:
130 with T.sblock(name="block", no_realize=False):
131 vi = ib.name("vi", T.axis.spatial(128, i))
132 vj = ib.name("vj", T.axis.spatial(64, j))
133 vk = ib.name("vk", T.axis.reduce(32, k))
134 T.reads()
135 T.writes()
136 T.evaluate(0)
137 obj = ib.get()
138 _assert_print(
139 obj,
140 """
141i = T.int32()
142j = T.int32()
143k = T.int32()
144with T.sblock("block"):
145 vi = T.axis.spatial(128, i)
146 vj = T.axis.spatial(64, j)
147 vk = T.axis.reduce(32, k)
148 T.reads()
149 T.writes()
150 T.evaluate(0)""",
151 )
152
153
154def test_block():

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…