Repository navigation
Conversation
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
There was a problem hiding this comment.
Code Review
This pull request introduces the experimental PARALLEL_EVAL policy for batch setup timing repair, replacing several older experimental policies. It adds multi-threaded implementations for key optimization moves (such as RebufferMt, SizeUpMt, SplitLoadMt, SwapPinsMt, and UnbufferMt), integrates a setup repair profiler, and refactors the delay estimator and target collector to support parallel execution. The review feedback highlights critical null pointer dereference risks in DelayEstimator.cc, UnbufferMtGenerator.cc, and SwapPinsMtGenerator.cc when resolving driver pins or top-level ports, and recommends using safer helper methods or adding defensive null checks.
3b24d9e to
c9a3413
Compare
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What: the Mt delay estimator models the fanin side loads, the opposite output transition, the latch D-side driver and the flip-flop setup and hold change of a cell swap, and SizeUpMt and VtSwapMt charge them. Why: scoring a swap on the selected path alone let a scored gain turn into a loss after the timing update. How: side models in DelayEstimator and SequentialTimingEstimator, input cap budgets that workers can check without STA, and ArcDelayState renamed to EstimatorContext. The side models are off by default. Setup repair profiler review follow-ups: the profiler constructor takes a RepairSetupProfiler::Mode instead of an int, CRIT_VT_SWAP samples WNS and TNS before its sweep, and the Bazel TestResizerMt target drops the --gtest_filter that skipped the profiler and fixture tests. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
What: RebufferMt, an Mt buffering move that plans a beam of Rebuffer trees per driver and scores each with the buffer-tree estimator. Why: buffering needs the same scored, comparable candidates as the cell swaps before a batch policy can choose among them. How: makeRebufferTreePlans() and applyRebufferTreePlan() in Rebuffer, estimateBufferTreeWithSidePaths() in DelayEstimator, and current required times after the endpoint scan. No policy runs RebufferMt yet; PARALLEL_EVAL will. LEGACY is unchanged. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
What: PARALLEL_EVAL, an experimental setup repair policy that commits a batch of VtSwapMt, SizeUpMt and RebufferMt moves per timing update. Why: one timing update per batch instead of per move cuts the repair time. How: worker threads scan endpoints and generate and score candidates from prepared data; BatchSelector, BottleneckAnalysis and ParallelEvalState pick, rank and stop; each batch is kept, salvaged or rolled back by its WNS and TNS (the group's under -path_group). OptimizationPolicy::finish() ends each phase, and the Optimizer prints the final report after the last phase. LEGACY results do not change. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
What: SplitLoadMt, the Mt form of SplitLoad, joins the PARALLEL_EVAL default sequence. Why: splitting off the less critical loads is a strong setup move that PARALLEL_EVAL lacked. How: estimateLoadChange() scores the lighter target load and the moved loads are charged as side loads; the split itself is chosen as in the serial move. LEGACY is unchanged. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
What: SwapPinsMt, the Mt form of the pin swap, joins the PARALLEL_EVAL WNS tail. Why: a pin swap is a cheap gain on the worst endpoints once the batches stall. How: Resizer::swapPinDelays() is shared with the serial move; the Mt generator measures the arc delays on the main thread and picks the fastest input on a worker. LEGACY is unchanged. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
What: UnbufferMt, the Mt form of buffer removal, joins the PARALLEL_EVAL WNS tail. Why: removing a buffer on the worst path is a gain the other Mt moves cannot make. How: the main thread checks the buffer and estimates the saved delay; the tail removes buffers only in single-move batches, since a removal cannot be reverted in place. LEGACY is unchanged. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
c9a3413 to
62b365d
Compare
Why not? |
|
Claude == Priority 1 (correctness) ==
== Priority 4-6 (architecture / style / process) ==
|
|
Codex
|
|
|
||
| using utl::RSZ; | ||
|
|
||
| constexpr int kBufferRemovalMaxFanout = 10; |
Part 9 of 12 of the PARALLEL_EVAL setup repair stack. It builds on #11801 and also shows the commits of parts 1 to 8; its own change is the last commit.
Summary
Changes
-sequenceacceptsunbuffer; without-sequencethe WNS tail adds UnbufferMt, and-skip_buffer_removalkeeps it out.Stack