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

Function before

tests/python/relax/test_transform_fuse_ops.py:38–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 """Simple testcase."""
37
38 def before():
39 bb = relax.BlockBuilder()
40 x = relax.Var("x", R.Tensor([10, 20], "float32"))
41 with bb.function("main", [x]):
42 with bb.dataflow():
43 lv0 = bb.emit_te(topi.add, x, relax.const(1, "float32"))
44 lv1 = bb.emit_te(topi.exp, lv0)
45 gv = bb.emit_output(bb.call_te(topi.squeeze, lv1))
46 bb.emit_func_output(gv)
47
48 return bb.get()
49
50 def expected():
51 bb = relax.BlockBuilder()

Callers 12

test_fuse_simpleFunction · 0.70
test_conv2d_fuseFunction · 0.70
test_concatenateFunction · 0.70
test_tuple_rootFunction · 0.70
test_tuple_get_rootFunction · 0.70
test_tuple_intermediateFunction · 0.70
test_tuple_consecutiveFunction · 0.70
test_inception_likeFunction · 0.70
test_softmaxFunction · 0.70

Calls 9

functionMethod · 0.95
dataflowMethod · 0.95
emit_teMethod · 0.95
emit_outputMethod · 0.95
call_teMethod · 0.95
emit_func_outputMethod · 0.95
getMethod · 0.95
emitMethod · 0.95
TensorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…