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

Function test_conv2d

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

Source from the content-addressed store, hash-verified

261
262@requires_coreml_runtime
263def test_conv2d():
264 x = relax.Var("x", relax.TensorStructInfo([1, 3, 224, 224], "float32"))
265 w = relax.const(np.zeros((16, 3, 3, 3), dtype="float32"))
266 bb = relax.BlockBuilder()
267 with bb.function("main", [x]):
268 with bb.dataflow():
269 lv0 = bb.emit(relax.op.nn.conv2d(x, w, strides=[2, 2], padding=[1, 1, 1, 1]))
270 gv = bb.emit_output(lv0)
271 bb.emit_func_output(gv)
272 mod = bb.get()
273 x_data = tvm.runtime.tensor(np.random.rand(1, 3, 224, 224).astype("float32"), dev)
274 verify(mod, [x_data])
275
276
277@requires_coreml_runtime

Callers

nothing calls this directly

Calls 10

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…