SiriusNEO commented on code in PR #14634:
URL: https://github.com/apache/tvm/pull/14634#discussion_r1167784010


##########
python/tvm/relax/pipeline.py:
##########
@@ -26,49 +26,67 @@
 from . import transform
 
 
[email protected]_pass(opt_level=0)
-def zero_pipeline(mod: tvm.ir.IRModule, ctx: tvm.transform.PassContext) -> 
tvm.ir.IRModule:
-    """Pipeline that applies pre-tuned logs.
+def zero_pipeline(*, enable_warning: bool = False):
+    """Wrapper function that returns the zero pipeline.
 
     Parameters
     ----------
-    mod : tvm.ir.IRModule
-        Input IRModule.
+    enable_warning : bool
+        A boolean value indicating if to print warnings
+        * in LegalizeOps pass, for CallNode whose op's legalization function is
+        not registered,
+        * in MetaScheduleApplyDatabase pass, for TIR functions now showing up 
in
+        the database. By default we don't print warning.
+    """
 
-    ctx : tvm.transform.PassContext
-        The pass context
+    @tvm.transform.module_pass(opt_level=0)
+    def f_zero_pipeline(mod: tvm.ir.IRModule, ctx: tvm.transform.PassContext) 
-> tvm.ir.IRModule:
+        """Pipeline that applies pre-tuned logs.
 
-    Returns
-    -------
-    mod: tvm.ir.IRModule
-        The result transformed module.
-    """
-    seq = tvm.transform.Sequential(
-        [
-            transform.LegalizeOps(),
-            transform.AnnotateTIROpPattern(),
-            transform.FoldConstant(),
-            transform.FuseOps(),
-            transform.FuseTIR(),
-        ]
-    )
-    mod = seq(mod)
-    if ms.Database.current():
-        mod = transform.MetaScheduleApplyDatabase()(mod)
-    return mod
+        Parameters
+        ----------
+        mod : tvm.ir.IRModule
+            Input IRModule.
+
+        ctx : tvm.transform.PassContext
+            The pass context
+
+        Returns
+        -------
+        mod: tvm.ir.IRModule
+            The result transformed module.
+        """
+        print(enable_warning)

Review Comment:
   Is this a debug print?



-- 
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]

Reply via email to