Skip to content

Delta debug prune#9749

Merged
maliberty merged 4 commits intoThe-OpenROAD-Project:masterfrom
Pinata-Consulting:delta-debug-prune
Mar 17, 2026
Merged

Delta debug prune#9749
maliberty merged 4 commits intoThe-OpenROAD-Project:masterfrom
Pinata-Consulting:delta-debug-prune

Conversation

@oharboe
Copy link
Copy Markdown
Collaborator

@oharboe oharboe commented Mar 13, 2026

Can be merged now, but The-OpenROAD-Project/OpenROAD-flow-scripts#3991 must then be merged before ORFS upgrades to latest OpenROAD.

oharboe and others added 4 commits March 13, 2026 08:54
Remove deltaDebug.py, test_deltaDebug.py, and their Bazel targets.
Rename remaining deltaDebug_ prefixes in whittle.py to whittle_.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Show periodic [whittle] status with phase, element counts, .odb size,
elapsed time. Display tail of step log after 5 minutes of waiting.
Print final summary with before/after .odb sizes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe oharboe requested a review from maliberty March 13, 2026 08:07
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the deltaDebug.py script with an improved whittle.py script for minimizing test cases. The changes include removing the old script and its tests, enhancing whittle.py with better progress reporting (including elapsed time, file size reduction, and log tails for long-running steps), and adding comprehensive documentation. A new Claude skill is also introduced to automate the issue triage process using whittle.py. My review focuses on improving the user-friendliness of the progress reporting and suggesting a minor refinement to a shell command in the documentation.

Comment on lines +47 to +48
sed -i 's/openroad -no_init/openroad -exit -no_init/g' run-me-*.sh
sed -i 's/openroad -no_splash/openroad -exit -no_splash/g' run-me-*.sh
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For conciseness and robustness, you can combine the two sed commands into a single one using a regular expression to match either -no_init or -no_splash.

Suggested change
sed -i 's/openroad -no_init/openroad -exit -no_init/g' run-me-*.sh
sed -i 's/openroad -no_splash/openroad -exit -no_splash/g' run-me-*.sh
sed -i 's/openroad \(-no_init\|-no_splash\)/openroad -exit \1/g' run-me-*.sh

Comment on lines +172 to +180
@staticmethod
def format_duration(seconds):
"""Format seconds into a human-readable duration string."""
seconds = int(seconds)
if seconds < 60:
return f"{seconds}s"
if seconds < 3600:
return f"{seconds // 60}m"
return f"{seconds // 3600}h {seconds % 3600 // 60:02d}m"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current implementation of format_duration for values between 60 and 3600 seconds is very coarse, as it only shows minutes (e.g., 119 seconds is displayed as '1m'). This can be misleading. A more precise format including seconds for durations less than an hour would be more user-friendly. Note that this change will require updating the corresponding tests in test_whittle.py.

Suggested change
@staticmethod
def format_duration(seconds):
"""Format seconds into a human-readable duration string."""
seconds = int(seconds)
if seconds < 60:
return f"{seconds}s"
if seconds < 3600:
return f"{seconds // 60}m"
return f"{seconds // 3600}h {seconds % 3600 // 60:02d}m"
@staticmethod
def format_duration(seconds):
"""Format seconds into a human-readable duration string."""
seconds = int(seconds)
if seconds < 60:
return f"{seconds}s"
m, s = divmod(seconds, 60)
h, m = divmod(m, 60)
if h > 0:
return f"{h}h {m:02d}m"
return f"{m}m {s:02d}s"

Comment on lines +222 to +227
def test_format_duration(self):
self.assertEqual(whittle.Whittler.format_duration(30), "30s")
self.assertEqual(whittle.Whittler.format_duration(90), "1m")
self.assertEqual(whittle.Whittler.format_duration(120), "2m")
self.assertEqual(whittle.Whittler.format_duration(3661), "1h 01m")
self.assertEqual(whittle.Whittler.format_duration(7200), "2h 00m")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

With the suggested improvement to format_duration in whittle.py, these tests need to be updated to reflect the more precise output format.

Suggested change
def test_format_duration(self):
self.assertEqual(whittle.Whittler.format_duration(30), "30s")
self.assertEqual(whittle.Whittler.format_duration(90), "1m")
self.assertEqual(whittle.Whittler.format_duration(120), "2m")
self.assertEqual(whittle.Whittler.format_duration(3661), "1h 01m")
self.assertEqual(whittle.Whittler.format_duration(7200), "2h 00m")
def test_format_duration(self):
self.assertEqual(whittle.Whittler.format_duration(30), "30s")
self.assertEqual(whittle.Whittler.format_duration(90), "1m 30s")
self.assertEqual(whittle.Whittler.format_duration(120), "2m 00s")
self.assertEqual(whittle.Whittler.format_duration(3661), "1h 01m")
self.assertEqual(whittle.Whittler.format_duration(7200), "2h 00m")

@oharboe

This comment was marked as resolved.

@maliberty maliberty enabled auto-merge March 17, 2026 18:53
@maliberty maliberty merged commit 7628418 into The-OpenROAD-Project:master Mar 17, 2026
15 checks passed
@oharboe oharboe deleted the delta-debug-prune branch March 19, 2026 13:59
gudeh pushed a commit to gudeh/OpenROAD that referenced this pull request Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants