()
| 636 | |
| 637 | |
| 638 | def test_tuple_get_item(): |
| 639 | @R.function |
| 640 | def f(x: R.Tuple(R.Tensor((), dtype="int32"))) -> R.Tensor((), dtype="int32"): |
| 641 | return x[0] |
| 642 | |
| 643 | body = normalize(f).body |
| 644 | assert isinstance(body, rx.SeqExpr) |
| 645 | body_str = strip_whitespace(dump_ast(body)) |
| 646 | |
| 647 | assert "TupleGetItem" in body_str |
| 648 | assert 'tuple_value=Var(name_hint="x"' in body_str |
| 649 | assert "index=0" in body_str |
| 650 | |
| 651 | |
| 652 | def test_prim_value(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…