Archermmt commented on code in PR #16128:
URL: https://github.com/apache/tvm/pull/16128#discussion_r1396402575
##########
python/tvm/relax/transform/transform.py:
##########
@@ -647,19 +647,21 @@ class FusionPattern(Object):
pattern: DFPattern
annotation_patterns: Mapping[str, DFPattern]
check: Callable[[PatternCheckContext], bool]
+ attrs_getter: Callable[[PatternCheckContext], Dict[str, str]]
def __init__(
self,
name: str,
pattern: DFPattern,
annotation_patterns: Optional[Mapping[str, DFPattern]] = None,
check: Optional[Callable[[Mapping[str, Expr]], bool]] = None,
+ attrs_getter: Optional[Callable[[Mapping[str, Expr]], Dict[str, str]]]
= None,
Review Comment:
Do you mean like: attrs_getter: Optional[Callable[[Mapping[str, Expr]],
bool]] = None ? But the attrs_getter return a map of <str, str>, each element
contains a attribute for the function. The attrs_getter and check has same
argument, thus PatternCheckContext, but different return type.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]