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 2023/01/03 22:07:34 UTC

[GitHub] [tvm] masahi commented on a diff in pull request #13470: [MetaSchedule] Use current pass context in compile_relay, extract_tasks

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


##########
python/tvm/meta_schedule/relay_integration.py:
##########
@@ -390,16 +353,20 @@ def compile_relay(
     from tvm import relay
 
     # pylint: enable=import-outside-toplevel
-    mod, target, params, pass_config, executor = _normalize_params(
-        mod, target, params, pass_config, executor
-    )
+    mod, target, params, executor = _normalize_params(mod, target, params, executor)
+    pass_ctx = transform.PassContext.current()
+    pass_config = dict(pass_ctx.config)

Review Comment:
   To prevent breaking user's script after this change, how about setting a default ctx with opt_level = 3 if there is no current ctx?



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