()
| 261 | |
| 262 | @requires_coreml_runtime |
| 263 | def 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 |
nothing calls this directly
no test coverage detected
searching dependent graphs…