Skip to content

Commit acc4f56

Browse files
committed
Avoid retrying the same failing denoise configs again and again, that’s an issue on macOS
Signed-off-by: Stefan Marr <git@stefan-marr.de>
1 parent 9341313 commit acc4f56

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

rebench/executor.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ def __init__(self, runs, do_builds, ui, include_faulty=False,
327327
self._active_denoise_cfg: Optional[Denoise] = None
328328
self._active_for_profiling: Optional[bool] = None
329329

330+
# dict of the command that failed, the previous config and the config that failed
331+
self._failed_denoise_cfg: set[tuple[Optional[Denoise], Denoise]] = set()
332+
330333
self._print_execution_plan = print_execution_plan
331334

332335
self._do_builds = do_builds
@@ -536,9 +539,18 @@ def _ensure_denoise_is_active(self, run_id: "RunId"):
536539
self.ui.debug_output_info("Denoise: expected configuration already active\n")
537540
return
538541

542+
if (self._active_denoise_cfg, possible_settings) in self._failed_denoise_cfg and self._active_for_profiling == for_profiling:
543+
# we already tried this configuration, but it failed, so don't try again
544+
self.ui.debug_output_info("Denoise: expected configuration already tried and failed\n")
545+
return
546+
539547
self.ui.debug_output_info("Denoise: setting requested configuration:\n")
540-
self._active_denoise_cfg = minimize_noise(
548+
result = minimize_noise(
541549
possible_settings, for_profiling, self._show_denoise_warnings, self.ui)
550+
if result is None:
551+
self._failed_denoise_cfg.add((self._active_denoise_cfg, possible_settings))
552+
553+
self._active_denoise_cfg = result
542554
self._active_for_profiling = for_profiling
543555

544556
def _ensure_denoise_is_inactive(self):

0 commit comments

Comments
 (0)