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

Function test_var_binding

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

Source from the content-addressed store, hash-verified

130
131
132def test_var_binding() -> None:
133 v0 = rx.Var("v0")
134 val = rx.const(np.random.rand(24, 56))
135 b0 = rx.VarBinding(v0, val)
136 b0_str = dump_ast(b0, include_struct_info_annotations=False)
137 assert b0_str.startswith("VarBinding(")
138 assert 'var=Var(name_hint="v0")' in b0_str
139 assert "value=" in b0_str
140 assert "Constant(" in b0_str
141
142
143def test_binding_block() -> None:

Callers

nothing calls this directly

Calls 1

dump_astFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…