(op, input_shape=(1, 2, 8, 5))
| 73 | ], |
| 74 | ) |
| 75 | def test_unary(op, input_shape=(1, 2, 8, 5)): |
| 76 | remote_obj, tracker = remote() |
| 77 | |
| 78 | def create_model() -> tvm.IRModule: |
| 79 | @tvm.script.ir_module |
| 80 | class Module: |
| 81 | @R.function |
| 82 | def main(i0: R.Tensor((1, 2, 8, 5), "float32")) -> R.Tensor((1, 2, 8, 5), "float32"): |
| 83 | with R.dataflow(): |
| 84 | t0 = op(i0) |
| 85 | R.output(t0) |
| 86 | return t0 |
| 87 | |
| 88 | return Module |
| 89 | |
| 90 | mod = create_model() |
| 91 | verify( |
| 92 | remote_obj, |
| 93 | tracker, |
| 94 | mod, |
| 95 | inputs=[np.random.uniform(size=(1, 2, 8, 5)).astype("float32")], |
| 96 | ) |
| 97 | |
| 98 | |
| 99 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…