junrushao commented on code in PR #12626:
URL: https://github.com/apache/tvm/pull/12626#discussion_r956969024
##########
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:
Got it. Will do in the next PR!
--
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]