You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "masahi (via GitHub)" <gi...@apache.org> on 2023/03/15 22:29:14 UTC

[GitHub] [tvm] masahi commented on a diff in pull request #14312: [Unity] Support pattern-based rewriting

masahi commented on code in PR #14312:
URL: https://github.com/apache/tvm/pull/14312#discussion_r1137837543


##########
python/tvm/relax/dpl/pattern.py:
##########
@@ -1115,3 +1115,30 @@ def make_fused_bias_activation_pattern(op_name, with_bias=False, activation=None
         return is_op(activation)(out)
 
     return out
+
+
+def rewrite(
+    pattern: DFPattern, callback: Callable[[Expr, Dict[DFPattern, Expr]], Expr], func: Function

Review Comment:
   Replaced `callback` to `rewriter`. 
   
   Also added an example of a simple rewriter in the doc. 



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org