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

Function test_for

tests/python/tvmscript/test_tvmscript_printer_structural_equal.py:129–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127
128
129def test_for():
130 @T.prim_func(s_tir=True)
131 def func1():
132 for i, j in T.grid(128, 128):
133 with T.sblock():
134 pass
135
136 @T.prim_func(s_tir=True)
137 def func2():
138 for i, j, k in T.grid(128, 128, 128):
139 with T.sblock():
140 pass
141
142 func1 = func1.with_attr("global_symbol", "main")
143 func2 = func2.with_attr("global_symbol", "main")
144
145 with pytest.raises(ValueError) as ve:
146 assert_structural_equal(func1, func2)
147 assert _error_message(ve.value) == _expected_result(
148 func1,
149 func2,
150 AccessPath.root().attr("body").attr("block").attr("body").attr("body").attr("body"),
151 AccessPath.root().attr("body").attr("block").attr("body").attr("body").attr("body"),
152 )
153
154
155if __name__ == "__main__":

Callers

nothing calls this directly

Calls 5

assert_structural_equalFunction · 0.90
_error_messageFunction · 0.85
_expected_resultFunction · 0.85
attrMethod · 0.80
with_attrMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…