()
| 98 | |
| 99 | |
| 100 | def test_zeros(): |
| 101 | @R.function |
| 102 | def foo(dumb_param: R.Tensor()) -> R.Tensor((2, 3), "float32"): |
| 103 | gv: R.Tensor((2, 3), "float32") = R.zeros((2, 3), "float32") |
| 104 | return gv |
| 105 | |
| 106 | bb = relax.BlockBuilder() |
| 107 | dumb_param = relax.Var("dumb_param", R.Tensor()) |
| 108 | with bb.function("foo", [dumb_param]): |
| 109 | gv = bb.emit(relax.op.zeros((2, 3), "float32")) |
| 110 | bb.emit_func_output(gv) |
| 111 | |
| 112 | _check(foo, bb.get()["foo"]) |
| 113 | |
| 114 | |
| 115 | def test_zeros_like(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…