(
self, start_op_types: Set[str],
end_types: Set[str],
)
| 619 | return ret_collection |
| 620 | |
| 621 | def activation_matching( |
| 622 | self, start_op_types: Set[str], |
| 623 | end_types: Set[str], |
| 624 | ) -> Dict[str, List[str]]: |
| 625 | |
| 626 | matchings = self.path_matching( |
| 627 | sp_expr = lambda op: op.type in start_op_types, |
| 628 | rp_expr = lambda x, y: False, # must have no relay operation. |
| 629 | ep_expr = lambda op: op.type in end_types, |
| 630 | direction = 'down' |
| 631 | ) |
| 632 | |
| 633 | activation_matchings = defaultdict(list) |
| 634 | for path in matchings: |
| 635 | op, act = path[0], path[-1] |
| 636 | activation_matchings[op.name].append(act.name) |
| 637 | return dict(activation_matchings) |
| 638 | |
| 639 | def concat_matching( |
| 640 | self, relay_pattern: Callable, |
no test coverage detected