You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "jinhongyii (via GitHub)" <gi...@apache.org> on 2023/03/07 04:31:32 UTC
[GitHub] [tvm] jinhongyii commented on a diff in pull request #14219: [MetaSchedule] preseve global_symbol attached to function after applying MS
jinhongyii commented on code in PR #14219:
URL: https://github.com/apache/tvm/pull/14219#discussion_r1127329476
##########
python/tvm/meta_schedule/tune_context.py:
##########
@@ -44,7 +44,8 @@
def _normalize_mod(mod: Union[PrimFunc, IRModule]) -> IRModule:
"""Normalize the input to an IRModule"""
if isinstance(mod, PrimFunc):
- mod = mod.with_attr("global_symbol", "main")
+ if not (mod.attrs and "global_symbol" in mod.attrs):
+ mod = mod.with_attr("global_symbol", "main")
mod = mod.with_attr("tir.noalias", True)
mod = IRModule({"main": mod})
Review Comment:
Good thought! The inconsistency of global_symbol in the case I'm handling comes from the applying MS phase, so it seems I should change the code there and revert this change. I will send a fix PR later
--
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