()
| 66 | |
| 67 | |
| 68 | def test_emit_with_name(): |
| 69 | m = tirx.Var("m", "int64") |
| 70 | n = tirx.Var("n", "int64") |
| 71 | x = rx.Var("x", rx.TensorStructInfo([m, n], "float16")) |
| 72 | y = rx.Var("y", rx.TensorStructInfo([n], "float16")) |
| 73 | bb = rx.BlockBuilder() |
| 74 | |
| 75 | bb._begin_dataflow_block() |
| 76 | lv0 = bb.emit(rx.op.add(x, y), "add") |
| 77 | gv0 = bb.emit_output(rx.op.multiply(lv0, y), "multi") |
| 78 | b0 = bb._end_block() |
| 79 | |
| 80 | assert b0.bindings[0].var.name_hint == "add" |
| 81 | assert b0.bindings[1].var.name_hint == "multi" |
| 82 | |
| 83 | |
| 84 | def test_function_single_block(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…