()
| 68 | |
| 69 | |
| 70 | def test_ones(): |
| 71 | @R.function |
| 72 | def foo(dumb_param: R.Tensor()) -> R.Tensor((2, 3), "float32"): |
| 73 | gv: R.Tensor((2, 3), "float32") = R.ones((2, 3), "float32") |
| 74 | return gv |
| 75 | |
| 76 | bb = relax.BlockBuilder() |
| 77 | dumb_param = relax.Var("dumb_param", R.Tensor()) |
| 78 | with bb.function("foo", [dumb_param]): |
| 79 | gv = bb.emit(relax.op.ones((2, 3), "float32")) |
| 80 | bb.emit_func_output(gv) |
| 81 | |
| 82 | _check(foo, bb.get()["foo"]) |
| 83 | |
| 84 | |
| 85 | def test_ones_like(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…