cts: fix infinite loop in HTree bisection when sink count reaches 1 - #11146
Open
oharboe wants to merge 1 commit into
Open
cts: fix infinite loop in HTree bisection when sink count reaches 1#11146oharboe wants to merge 1 commit into
oharboe wants to merge 1 commit into
Conversation
With max_wl set, once sinks per sub-region reaches 1 the only remaining stop criteria were hpwl < max_wl (CTS-0038) or hpwl not improving (CTS-0054). If hpwl keeps improving asymptotically above max_wl, the loop bisects up to clock_tree_max_depth (100) with per-level cost doubling, i.e. a practical hang. Break once sinks <= 1: further bisection cannot reduce fanout. Reviewer notes: - All .ok diffs change only the stop-criterion message line; buffer counts and tree structure are unchanged, so no QoR change in the existing suite. - Trade-off: under max_wl this stops even if hpwl is still improving toward max_wl; a long final wire is left to repair_clock_nets. - Check is placed after computeLevelTopology, matching where the old criteria fired. CTS-0136 is a new message ID. Reported in ascenium/issues/50; demonstrated by max_wl_two_sinks. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces an early stop criterion in HTreeBuilder::run() when the number of sinks per sub-region is less than or equal to 1, logging the event with a new message ID CTS-0136 and breaking the loop. Multiple test expectation files (.ok files) have been updated to reflect this change. There are no review comments, so I have no feedback to provide.
Collaborator
Author
|
@luis201420 @maliberty Shooting from the hip here... I got this from letting agy loose on a confidential test case with an infinite loop. Is this plausible? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With max_wl set, once sinks per sub-region reaches 1 the only remaining stop criteria were hpwl < max_wl (CTS-0038) or hpwl not improving (CTS-0054). If hpwl keeps improving asymptotically above max_wl, the loop bisects up to clock_tree_max_depth (100) with per-level cost doubling, i.e. a practical hang. Break once sinks <= 1: further bisection cannot reduce fanout.
Reviewer notes:
Reported in ascenium/issues/50; demonstrated by max_wl_two_sinks.
Summary
[Describe your changes here]
Type of Change
Impact
[How does this change the tool's behavior?]
Verification
./etc/Build.sh).Related Issues
[Link issues here]