()
| 113 | |
| 114 | |
| 115 | def test_zeros_like(): |
| 116 | @R.function |
| 117 | def foo(x: R.Tensor((2, 3), "float32")) -> R.Tensor((2, 3), "float32"): |
| 118 | gv: R.Tensor((2, 3), "float32") = R.zeros_like(x) |
| 119 | return gv |
| 120 | |
| 121 | x = relax.Var("x", R.Tensor((2, 3), "float32")) |
| 122 | bb = relax.BlockBuilder() |
| 123 | with bb.function("foo", [x]): |
| 124 | gv = bb.emit(relax.op.zeros_like(x)) |
| 125 | bb.emit_func_output(gv) |
| 126 | |
| 127 | _check(foo, bb.get()["foo"]) |
| 128 | |
| 129 | |
| 130 | def test_arange(): |