tqchen commented on a change in pull request #7084: URL: https://github.com/apache/tvm/pull/7084#discussion_r540609823
########## File path: python/tvm/driver/build_module.py ########## @@ -159,17 +159,27 @@ def lower(sch, args, name="main", binds=None, simple_mode=False): lower_phase2 = [x[1] for x in add_lower_pass if x[0] == 2] lower_phase3 = [x[1] for x in add_lower_pass if x[0] > 2] + is_tir_schedule = False + # Phase 0 if isinstance(sch, schedule.Schedule): mod = form_irmodule(sch, args, name, binds) + elif isinstance(sch, tvm.tir.PrimFunc): Review comment: Let us only support build from IRModule not PrimFunc ########## File path: python/tvm/driver/build_module.py ########## @@ -159,17 +159,27 @@ def lower(sch, args, name="main", binds=None, simple_mode=False): lower_phase2 = [x[1] for x in add_lower_pass if x[0] == 2] lower_phase3 = [x[1] for x in add_lower_pass if x[0] > 2] + is_tir_schedule = False + # Phase 0 if isinstance(sch, schedule.Schedule): mod = form_irmodule(sch, args, name, binds) + elif isinstance(sch, tvm.tir.PrimFunc): + func = sch.with_attr("global_symbol", name) + if pass_ctx.config.get("tir.restricted_func"): + func = func.with_attr("tir.noalias", True) Review comment: no alias and global symbol should be part of the IRModule before passing into build ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org