Skip to content

Commit 27f3fae

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 042a1bb commit 27f3fae

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

rebench/executor.py

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

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

331334
self._do_builds = do_builds
@@ -535,9 +538,19 @@ def _ensure_denoise_is_active(self, run_id: "RunId"):
535538
self.ui.debug_output_info("Denoise: expected configuration already active\n")
536539
return
537540

541+
if ((self._active_denoise_cfg, possible_settings) in self._failed_denoise_cfg
542+
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+
538547
self.ui.debug_output_info("Denoise: setting requested configuration:\n")
539-
self._active_denoise_cfg = minimize_noise(
548+
result = minimize_noise(
540549
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
541554
self._active_for_profiling = for_profiling
542555

543556
def _ensure_denoise_is_inactive(self):

0 commit comments

Comments
 (0)