Raise an error on ambiguous inputs For convenience, the function being replaced can be specified either as a string, or as a GlobalVar. However, all replacements must be unambiguous.
()
| 68 | |
| 69 | |
| 70 | def test_ambiguous_function_name(): |
| 71 | """Raise an error on ambiguous inputs |
| 72 | |
| 73 | For convenience, the function being replaced can be specified |
| 74 | either as a string, or as a GlobalVar. However, all replacements |
| 75 | must be unambiguous. |
| 76 | """ |
| 77 | |
| 78 | @R.function |
| 79 | def func(): |
| 80 | return R.tuple() |
| 81 | |
| 82 | gvar = tvm.ir.GlobalVar("name") |
| 83 | |
| 84 | with pytest.raises(ValueError): |
| 85 | func.inline_functions({gvar: func, "name": func}) |
| 86 | |
| 87 | |
| 88 | def test_inline_dataflow_block(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…