Skip to content

Commit 840ed47

Browse files
committed
cache_ -> cache, suppres "Cannot find workdload" warning
1 parent 4e60bae commit 840ed47

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/meta_schedule/integration.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ IRModule ApplyHistoryBestNode::Query(runtime::String task_name, IRModule mod, Ta
140140
return IRModule({{gv, func}});
141141
}
142142
}
143-
LOG(WARNING) << "Cannot find workload: " << task_name << "\n" << tir::AsTVMScript(prim_mod);
143+
LOG(WARNING) << "Cannot find workload: " << task_name;
144+
DLOG(INFO) << tir::AsTVMScript(prim_mod);
144145
return IRModule{nullptr};
145146
}
146147

src/relay/backend/task_extraction.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ Array<ExtractedTask> ExtractTask(IRModule mod, Target target, Map<String, Consta
4646
auto opt_mod = seq(std::move(mod));
4747

4848
Array<ExtractedTask> tasks;
49-
std::unordered_set<tec::CCacheKey> cache_;
49+
std::unordered_set<tec::CCacheKey> cache;
5050
std::unordered_map<std::string, int> name_map;
5151

52-
PostOrderVisit(opt_mod->Lookup("main"), [target, &tasks, &cache_, &name_map](const Expr& exp) {
52+
PostOrderVisit(opt_mod->Lookup("main"), [target, &tasks, &cache, &name_map](const Expr& exp) {
5353
if (exp->IsInstance<FunctionNode>()) {
5454
Function relay_func = Downcast<Function>(exp);
5555
tec::CCacheKey cache_key(relay_func, target);
56-
if (relay_func->HasNonzeroAttr(attr::kPrimitive) && cache_.find(cache_key) == cache_.end()) {
56+
if (relay_func->HasNonzeroAttr(attr::kPrimitive) && cache.find(cache_key) == cache.end()) {
5757
Array<te::Tensor> outputs;
5858
std::string fused_name;
5959
std::tie(outputs, fused_name) =
@@ -64,7 +64,7 @@ Array<ExtractedTask> ExtractTask(IRModule mod, Target target, Map<String, Consta
6464
auto tir_mod = IRModule({{prim_fn_var, prim_func}});
6565
auto task_name = tec::GetUniqueName(fused_name, &name_map);
6666
tasks.push_back(ExtractedTask(task_name, relay_mod, target, {tir_mod}));
67-
cache_.insert(cache_key);
67+
cache.insert(cache_key);
6868
}
6969
}
7070
});

0 commit comments

Comments
 (0)