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

Function build_function

tests/python/relax/test_analysis_well_formed.py:35–41  ·  view source on GitHub ↗

Returns relax.function with given blocks

(blocks, params=[])

Source from the content-addressed store, hash-verified

33
34
35def 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
44def test_var():

Callers 12

test_varFunction · 0.85
test_dataflow_varFunction · 0.85
test_global_varFunction · 0.85
test_symbolic_varFunction · 0.85
test_seq_exprFunction · 0.85
test_ifFunction · 0.85
test_if_non_seq_bodyFunction · 0.85
test_ANFFunction · 0.85

Calls 3

FunctionMethod · 0.80
TensorMethod · 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…