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

Function test_seq_expr

tests/python/relax/test_analysis_well_formed.py:178–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176
177
178def test_seq_expr():
179 # Error: SeqExpr in VarBinding
180 gv0 = rx.Var("gv0", R.Tensor([m, n], "float32"))
181 # build a SeqExpr
182 gv1 = rx.Var("gv1", R.Tensor([m, n], "float32"))
183 call_node = rx.op.add(x, gv0)
184 _bindings = [rx.VarBinding(gv1, call_node)]
185 _blocks = [rx.BindingBlock(_bindings)]
186 _seq_expr = rx.SeqExpr(_blocks, gv1)
187 # build a Binding with the SeqExpr as value
188 bindings = [rx.VarBinding(gv0, _seq_expr)]
189 blocks = [rx.BindingBlock(bindings)]
190 func = build_function(blocks)
191 mod = tvm.IRModule({rx.GlobalVar("foo"): func})
192 assert not rx.analysis.check_well_formed(mod, check_struct_info=False)
193
194
195def test_recursive():

Callers

nothing calls this directly

Calls 3

build_functionFunction · 0.85
TensorMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…