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

Class TupleGetItemPattern

python/tvm/relax/dpl/pattern.py:495–513  ·  view source on GitHub ↗

Get index-th item from a TuplePattern. Parameters ---------- tuple_value: tvm.relax.dpl.DFPattern The input tuple expression. index: Optional[int] The index to match; Default (None) to match a TupleGetItem with any index.

Source from the content-addressed store, hash-verified

493
494@register_df_node
495class TupleGetItemPattern(DFPattern):
496 """Get index-th item from a TuplePattern.
497
498 Parameters
499 ----------
500 tuple_value: tvm.relax.dpl.DFPattern
501 The input tuple expression.
502
503 index: Optional[int]
504 The index to match; Default (None) to match a TupleGetItem with any index.
505 """
506
507 def __init__(self, tuple_value: "DFPattern", index: int | None = None):
508 match_index = index if index is not None else -1
509 self.__init_handle_by_constructor__(
510 ffi.TupleGetItemPattern,
511 tuple_value,
512 match_index, # type: ignore
513 )
514
515
516@register_df_node

Callers 4

__init__Method · 0.90
__getitem__Method · 0.85
is_tuple_get_itemFunction · 0.85
test_concat_mm_splitFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_concat_mm_splitFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…