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.
| 493 | |
| 494 | @register_df_node |
| 495 | class 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 |
no outgoing calls
searching dependent graphs…