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)