()
| 397 | |
| 398 | |
| 399 | def test_relax_shape_to_tensor(): |
| 400 | @R.function |
| 401 | def foo(x: R.Shape((4, 4))): |
| 402 | tensor = R.shape_to_tensor(x) |
| 403 | return tensor |
| 404 | |
| 405 | x = relax.Var("x", R.Shape((4, 4))) |
| 406 | bb = relax.BlockBuilder() |
| 407 | with bb.function("foo", (x,)): |
| 408 | tensor = bb.emit(relax.op.shape_to_tensor(x)) |
| 409 | bb.emit_func_output(tensor) |
| 410 | |
| 411 | _check(foo, bb.get()["foo"]) |
| 412 | |
| 413 | |
| 414 | def test_symbolic_shape(): |