Skip to content
Snippets Groups Projects
Commit b63182ea authored by Yao Wang's avatar Yao Wang Committed by Lianmin Zheng
Browse files

Add fallback for ApplyGraphBest (#2485)

parent b6ae3e15
No related branches found
No related tags found
No related merge requests found
......@@ -460,7 +460,16 @@ class ApplyGraphBest(DispatchContext):
self.update(target, workload, cfg)
return cfg
key = (str(target), workload)
return self._global_cfg_dict[key]
if key not in self._global_cfg_dict:
msg = "Config for target=%s, workload=%s is missing in ApplyGraphBest context. " \
"A fallback configuration is used, which may bring great performance " \
"regression." % (target, workload)
logger.warning(msg)
cfg = FallbackConfigEntity()
self._global_cfg_dict[key] = cfg
else:
cfg = self._global_cfg_dict[key]
return cfg
def update(self, target, workload, cfg):
key = (str(target), workload)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment