(input: R.Tensor((10, 10), dtype="float32"))
| 1359 | class expected_triu: |
| 1360 | @R.function |
| 1361 | def main(input: R.Tensor((10, 10), dtype="float32")) -> R.Tuple( |
| 1362 | R.Tensor((10, 10), dtype="float32") |
| 1363 | ): |
| 1364 | # block 0 |
| 1365 | with R.dataflow(): |
| 1366 | lv: R.Tensor((10,), dtype="int64") = R.arange( |
| 1367 | R.prim_value(0), R.prim_value(10), R.prim_value(1), dtype="int64" |
| 1368 | ) |
| 1369 | lv1: R.Tensor((1, 10), dtype="int64") = R.expand_dims(lv, axis=[-2]) |
| 1370 | lv2: R.Tensor((10,), dtype="int64") = R.arange( |
| 1371 | R.prim_value(0), R.prim_value(10), R.prim_value(1), dtype="int64" |
| 1372 | ) |
| 1373 | lv3: R.Tensor((10, 1), dtype="int64") = R.expand_dims(lv2, axis=[-1]) |
| 1374 | lv4: R.Tensor((10, 10), dtype="int64") = R.subtract(lv1, lv3) |
| 1375 | lv5: R.Tensor((10, 10), dtype="bool") = R.greater_equal(lv4, R.const(1, "int64")) |
| 1376 | lv6: R.Tensor((), dtype="float32") = R.const(0.0, "float32") |
| 1377 | lv7: R.Tensor((10, 10), dtype="float32") = R.where(lv5, input, lv6) |
| 1378 | gv: R.Tuple(R.Tensor((10, 10), dtype="float32")) = (lv7,) |
| 1379 | R.output(gv) |
| 1380 | return gv |
| 1381 | |
| 1382 | verify_model(Triu(), example_args, {}, expected_triu) |
| 1383 |
nothing calls this directly
no test coverage detected