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

Function get_mod

tests/python/relax/test_codegen_coreml.py:202–210  ·  view source on GitHub ↗
(axis)

Source from the content-addressed store, hash-verified

200@requires_coreml_runtime
201def test_expand_dims():
202 def get_mod(axis):
203 x = relax.Var("x", relax.TensorStructInfo([10, 10], "float32"))
204 bb = relax.BlockBuilder()
205 with bb.function("main", [x]):
206 with bb.dataflow():
207 lv0 = bb.emit(relax.op.expand_dims(x, axis=axis))
208 gv = bb.emit_output(lv0)
209 bb.emit_func_output(gv)
210 return bb.get()
211
212 x_data = tvm.runtime.tensor(np.random.rand(10, 10).astype("float32"), dev)
213 verify(get_mod(axis=0), [x_data])

Callers 1

test_expand_dimsFunction · 0.70

Calls 7

functionMethod · 0.95
dataflowMethod · 0.95
emitMethod · 0.95
emit_outputMethod · 0.95
emit_func_outputMethod · 0.95
getMethod · 0.95
expand_dimsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…