junrushao1994 commented on a change in pull request #10578:
URL: https://github.com/apache/tvm/pull/10578#discussion_r826465051
##########
File path: src/relay/backend/te_compiler_cache.cc
##########
@@ -335,15 +336,14 @@ class ScheduleBuilder : public ExprVisitor {
}
}
if (backend::IsMetaScheduleEnabled()) {
- prim_func = tir::CreatePrimFunc(Concat(fn_inputs, tensor_outs));
- Optional<ObjectRef> opt_mod_or_base_func =
- meta_schedule::MetaScheduleContext::QueryInsideWithScope(
- prim_fn_var->name_hint, IRModule({{prim_fn_var, relay_func}}),
target_,
- Array<IRModule>{IRModule({{prim_fn_var, prim_func}})});
- if (const auto* result = opt_mod_or_base_func.as<tir::PrimFuncNode>())
{
- prim_func = GetRef<tir::PrimFunc>(result);
- } else {
- prim_func = tir::PrimFunc(nullptr);
+ auto relay_mod = IRModule({{prim_fn_var, relay_func}});
+ auto tir_mod =
+ IRModule({{prim_fn_var, tir::CreatePrimFunc(Concat(fn_inputs,
tensor_outs))}});
Review comment:
nit: let's be explicit if possible
```suggestion
IRModule relay_mod({{prim_fn_var, relay_func}});
IRModule tir_mod({{prim_fn_var,
tir::CreatePrimFunc(Concat(fn_inputs, tensor_outs))}});
```
--
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]