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

Function test_seq_expr

tests/python/relax/test_ast_printer.py:181–194  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

179
180
181def test_seq_expr() -> None:
182 x = rx.Var("foo")
183 bindings = [rx.VarBinding(x, rx.const(1))]
184 blocks = [rx.BindingBlock(bindings)]
185 seqe = rx.SeqExpr(blocks, x)
186 seqe_str = dump_ast(seqe)
187 assert seqe_str.startswith("SeqExpr(")
188 assert "blocks=" in seqe_str
189 assert "BindingBlock(" in seqe_str
190 assert "VarBinding(" in seqe_str
191 assert "Constant(" in seqe_str
192 assert 'var=Var(name_hint="foo")' in seqe_str
193 assert "value=Constant(data" in strip_whitespace(seqe_str)
194 assert "body=" in seqe_str
195
196
197def test_shape_expr() -> None:

Callers

nothing calls this directly

Calls 2

dump_astFunction · 0.90
strip_whitespaceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…