Returns relax.function with given blocks
(blocks, params=[])
| 33 | |
| 34 | |
| 35 | def build_function(blocks, params=[]): |
| 36 | """Returns relax.function with given blocks""" |
| 37 | seq_expr = rx.SeqExpr(blocks, blocks[-1].bindings[-1].var) |
| 38 | func = rx.Function([x, cond] + params, seq_expr, R.Tensor("float32")).with_attr( |
| 39 | "global_symbol", "foo" |
| 40 | ) |
| 41 | return func |
| 42 | |
| 43 | |
| 44 | def test_var(): |
no test coverage detected
searching dependent graphs…