()
| 174 | |
| 175 | |
| 176 | def test_matmul(): |
| 177 | remote_obj, tracker = remote() |
| 178 | |
| 179 | def create_model() -> tvm.IRModule: |
| 180 | @tvm.script.ir_module |
| 181 | class Module: |
| 182 | @R.function |
| 183 | def main( |
| 184 | i0: R.Tensor((5, 3, 4), "float32"), |
| 185 | i1: R.Tensor((5, 4, 8), "float32"), |
| 186 | ) -> R.Tensor((5, 3, 8), "float32"): |
| 187 | with R.dataflow(): |
| 188 | t0 = R.matmul(i0, i1) |
| 189 | R.output(t0) |
| 190 | return t0 |
| 191 | |
| 192 | return Module |
| 193 | |
| 194 | mod = create_model() |
| 195 | verify( |
| 196 | remote_obj, |
| 197 | tracker, |
| 198 | mod, |
| 199 | inputs=[ |
| 200 | np.random.random(size=(5, 3, 4)).astype("float32"), |
| 201 | np.random.random(size=(5, 4, 8)).astype("float32"), |
| 202 | ], |
| 203 | ) |
| 204 | |
| 205 | |
| 206 | def test_permute_dims(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…