()
| 363 | |
| 364 | |
| 365 | def test_relax_tensor_op(): |
| 366 | @R.function |
| 367 | def foo(x: R.Tensor((4, 4), "float32")) -> R.Tensor((4, 4), "float32"): |
| 368 | y = R.add(x, x) |
| 369 | z = R.multiply(x, y) |
| 370 | return z |
| 371 | |
| 372 | x = relax.Var("x", R.Tensor((4, 4), "float32")) |
| 373 | bb = relax.BlockBuilder() |
| 374 | with bb.function("foo", (x,)): |
| 375 | y = bb.emit(relax.op.add(x, x)) |
| 376 | z = bb.emit(relax.op.multiply(x, y)) |
| 377 | bb.emit_func_output(z) |
| 378 | |
| 379 | _check(foo, bb.get()["foo"]) |
| 380 | |
| 381 | |
| 382 | def test_relax_base_op(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…