()
| 95 | |
| 96 | |
| 97 | def test_median(): |
| 98 | @R.function |
| 99 | def foo(x: R.Tensor((1, 2, 3, 4), "float32")) -> R.Tuple( |
| 100 | R.Tensor((1, 3, 4), "float32"), R.Tensor((1, 3, 4), "int64") |
| 101 | ): |
| 102 | gv: R.Tuple(R.Tensor((1, 3, 4), "float32"), R.Tensor((1, 3, 4), "int64")) = R.median( |
| 103 | x, axis=[1] |
| 104 | ) |
| 105 | return gv |
| 106 | |
| 107 | x = relax.Var("x", R.Tensor((1, 2, 3, 4), "float32")) |
| 108 | bb = relax.BlockBuilder() |
| 109 | with bb.function("foo", [x]): |
| 110 | gv = bb.emit(relax.op.median(x, axis=[1])) |
| 111 | bb.emit_func_output(gv) |
| 112 | |
| 113 | _check(foo, bb.get()["foo"]) |
| 114 | |
| 115 | |
| 116 | def test_variance(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…