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 
config was only for making sure that task extraction and `relay.build` use the 
same `link_params` value.



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