()
| 260 | |
| 261 | |
| 262 | def test_mean(): |
| 263 | remote_obj, tracker = remote() |
| 264 | |
| 265 | def create_model() -> tvm.IRModule: |
| 266 | @tvm.script.ir_module |
| 267 | class Module: |
| 268 | @R.function |
| 269 | def main( |
| 270 | i0: R.Tensor((1, 10, 15), "float32"), |
| 271 | ) -> R.Tensor((1, 10, 1), "float32"): |
| 272 | n = T.int64() |
| 273 | with R.dataflow(): |
| 274 | t0: R.Tensor((1, 10, 1), "float32") = R.mean(i0, axis=[-1], keepdims=True) |
| 275 | R.output(t0) |
| 276 | return t0 |
| 277 | |
| 278 | return Module |
| 279 | |
| 280 | mod = create_model() |
| 281 | verify( |
| 282 | remote_obj, |
| 283 | tracker, |
| 284 | mod, |
| 285 | inputs=[ |
| 286 | tvm.runtime.tensor(np.random.uniform(size=(1, 10, 15)).astype("float32")), |
| 287 | ], |
| 288 | ) |
| 289 | |
| 290 | |
| 291 | def test_conv2d(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…