Delta debug prune#9749
Conversation
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>
|
clang-tidy review says "All clean, LGTM! 👍" |
There was a problem hiding this comment.
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.
| 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 |
There was a problem hiding this comment.
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.
| 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 |
| @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" |
There was a problem hiding this comment.
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.
| @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" |
| 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") |
There was a problem hiding this comment.
With the suggested improvement to format_duration in whittle.py, these tests need to be updated to reflect the more precise output format.
| 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") |
This comment was marked as resolved.
This comment was marked as resolved.
…elta-debug-prune Delta debug prune
Can be merged now, but The-OpenROAD-Project/OpenROAD-flow-scripts#3991 must then be merged before ORFS upgrades to latest OpenROAD.