You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/08/29 06:54:55 UTC

[GitHub] [tvm] masahi commented on a diff in pull request #12626: [MetaSchedule] Introduce `ScheduleFnDatabase`

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


##########
tests/python/unittest/test_link_params.py:
##########
@@ -407,21 +406,21 @@ def schedule_dense(sch):
     target = "llvm"
     params = {"weight": weight_np}
 
-    def schedule_fn(task, sch):
-        if "nn_dense" in task.task_name:
+    def schedule_fn(sch):
+        if "nn_dense" in sch.mod.attrs["task_name"]:
             schedule_dense(sch)
             return True
         return False
 
     link_params = True
 
-    with tvm.transform.PassContext(config={"relay.FuseOps.link_params": link_params}):
-        database = apply_fixed_schedules(relay_mod, target, params, schedule_fn)
-
     with StringIO() as stderr_buf, redirect_stderr(stderr_buf):
-        with database, tvm.transform.PassContext(
+        with ms.database.ScheduleFnDatabase(schedule_fn), tvm.transform.PassContext(
             opt_level=3,
-            config={"relay.backend.use_meta_schedule": True},
+            config={
+                "relay.backend.use_meta_schedule": True,
+                "relay.FuseOps.link_params": link_params,

Review Comment:
   I think we can remove `"relay.FuseOps.link_params": link_params` now, since we are not running separate task extraction for fake database creation.



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