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

Function test_add

tests/python/relax/test_codegen_coreml.py:93–105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91
92@requires_coreml_runtime
93def test_add():
94 x = relax.Var("x", relax.TensorStructInfo([10, 10], "float32"))
95 y = relax.Var("y", relax.TensorStructInfo([10, 10], "float32"))
96 bb = relax.BlockBuilder()
97 with bb.function("main", [x, y]):
98 with bb.dataflow():
99 lv0 = bb.emit(relax.op.add(x, y))
100 gv = bb.emit_output(lv0)
101 bb.emit_func_output(gv)
102 mod = bb.get()
103 x_data = tvm.runtime.tensor(np.random.rand(10, 10).astype("float32"), dev)
104 y_data = tvm.runtime.tensor(np.random.rand(10, 10).astype("float32"), dev)
105 verify(mod, [x_data, y_data])
106
107
108@requires_coreml_runtime

Callers

nothing calls this directly

Calls 9

functionMethod · 0.95
dataflowMethod · 0.95
emitMethod · 0.95
emit_outputMethod · 0.95
emit_func_outputMethod · 0.95
getMethod · 0.95
verifyFunction · 0.70
addMethod · 0.45
astypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…