MCPcopy Create free account
hub / github.com/apache/tvm / test_tuple_get_item

Function test_tuple_get_item

tests/python/relax/test_ast_printer.py:638–649  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

636
637
638def 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
652def test_prim_value():

Callers

nothing calls this directly

Calls 3

dump_astFunction · 0.90
strip_whitespaceFunction · 0.85
normalizeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…