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 to repair setup timing in batches using multi-threading, replacing several older experimental policies. It adds comprehensive profiling capabilities, a work meter, and several new multi-threaded move generators (such as RebufferMt, SizeDownFanoutMt, SplitLoadMt, SwapPinsMt, UnbufferMt, and VtSwapMt). The code review identified several critical and high-severity issues, including potential null pointer dereferences in UnbufferMtGenerator.cc, RebufferPlannerPool.cc, SizeDownFanoutMtGenerator.cc, and SequentialTimingEstimator.cc that could lead to crashes, as well as a memory leak in DelayEstimatorBufferTree.cc from unreleased heap allocations.
b122ec2 to
ce94857
Compare
|
@codex review |
|
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". |
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. |
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>
What: SizeDownFanoutMt, the Mt form of SizeDownFanout, joins the PARALLEL_EVAL WNS tail, and every Mt generator follows the same steps: isApplicable() and prepareInputs() on the main thread, generate() and estimate() on the workers. Why: the last serial move with an Mt form, and one rule for which code may read live STA. How: SizeDownFanoutMt measures the step-down cell per off-path load; the virtual MoveGenerator::prepareInputs(Target&) replaces the per-move prepare branches of the policy. PARALLEL_EVAL also stops at the walked -max_utilization area. LEGACY is unchanged. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
ce94857 to
c7a85c5
Compare
|
Claude == Priority 1 (correctness) ==
== Priority 4-6 (architecture / style / process) ==
|
|
Codex
|
Part 10 of 12 of the PARALLEL_EVAL setup repair stack. It builds on #11802 and also shows the commits of parts 1 to 9; its own change is the last commit.
Summary
Changes
isApplicable()filters a target on the main thread without timing, the virtualprepareInputs(Target&)reads live STA on the main thread right before generation, andgenerate()andestimate()use only the prepared target on the workers. RebufferMtgenerate()is the one exception: its planner reads timing while it plans on a copy of the net.-max_utilization.-sequenceacceptssize_down; without-sequencethe WNS tail adds SizeDownFanoutMt, and-skip_size_downkeeps it out.Stack