Skip to content

Reuse port-point output for Pipeline9 node Pf calculations - #2473

Closed
AnasSarkiz wants to merge 2 commits into
mainfrom
perf/pipeline9-batch-node-pf
Closed

Reuse port-point output for Pipeline9 node Pf calculations#2473
AnasSarkiz wants to merge 2 commits into
mainfrom
perf/pipeline9-batch-node-pf

Conversation

@AnasSarkiz

@AnasSarkiz AnasSarkiz commented Sep 8, 2026

Copy link
Copy Markdown
Member

Summary

Pipeline9 already constructs the port-point output before preparing high-density routing. Reuse that output for each node's Pf calculation instead of rebuilding the complete output for every node.

  • Two production files changed: 10 additions and 3 deletions.
  • Keep the existing one-argument API, first-match lookup, missing-node/region behavior, and calculation order.
  • No dataset-specific conditions, new flags, attempt thresholds, persistent cache, fallback behavior, or dependency changes.
  • Only the two production files are included; no test files or benchmark tooling.

Validation

  • Repository formatter passed on both changed source files.
  • Tests and benchmarks were not rerun for the test-removal update.
  • Diff whitespace check passed.
  • Branch updated to main at 207c4191.
  • The earlier current-main local typecheck was blocked by the missing fixture dependency @tscircuit/fanout-for-pipeline9-fixtures. CI must verify the current head.

A prior same-machine SRJ18 sample 6 pair on f55494c7 measured 217.342s to 200.469s end-to-end (7.8% less time), with identical output, ordered DRC findings, 97 existing DRC issues, and 300 vias. This is one sample pair, not a full-suite or current-main performance claim. Benchmark tooling and artifacts are not included.

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
capacity-node-autorouter Ready Ready Preview Sep 8, 2026 9:03pm UTC

Request Review

@tscircuitbot

Copy link
Copy Markdown
Contributor

Benchmark This PR

Run benchmarks by commenting on this PR:

/benchmark [benchmark.sh args...]
/benchmark-long [benchmark.sh args...]
/benchmark-all [benchmark.sh args except --dataset]
/benchmark --same-machine
/benchmark-all --same-machine
/profile --dataset 18

Comment /benchmark to run the default dataset, or append any arguments accepted by ./benchmark.sh.
Comment /benchmark-long for an 8-vCPU run that defaults to 8 workers and has an eight-hour timeout.
Comment /benchmark-all to start separate workflow runs and result comments for dataset01 and dataset18. You may append benchmark arguments such as --pipeline 9; --dataset is not accepted because the command selects both datasets.
Append --same-machine to /benchmark or /benchmark-all to compare current main and the PR head sequentially on the same 8-vCPU Blacksmith runner.
Comment /profile --dataset 18 to compare direct Pipeline 7 stage-time percentages between current main and the PR head sequentially on one Blacksmith runner.

Everything after /benchmark, /benchmark-long, or /benchmark-all is safely forwarded to ./benchmark.sh, except --profile-solvers, which enables profile comparison tables, and --same-machine, which enables the paired runner.
Examples: /benchmark --dataset 18 --sample-timeout 2000s, /benchmark --pipeline 10 --dataset 29, /benchmark --pipeline 10 --dataset 29 --sample 1, /benchmark --pipeline 7 --limit 20, /benchmark all 20 --concurrency 8, /benchmark --same-machine, /benchmark-all --pipeline 9 --same-machine, and /benchmark-long --dataset 18.

Use /update-snapshots (or /us) to run BUN_UPDATE_SNAPSHOTS=1 bun test --timeout 120_000 on the PR branch and auto-commit snapshot updates.
Use /usf to read recent failed test files, update and verify their exact CI test shards, and auto-commit only their snapshots. It uses the configured fast benchmark runner by default; use /usf --ubuntu-latest for GitHub-hosted x64 CI parity.

Any PR whose title contains [BENCHMARK TEST] will automatically run one default-dataset benchmark on PR updates; it does not post a PR result comment.

@AnasSarkiz

Copy link
Copy Markdown
Member Author

/benchmark --pipeline 9 --dataset srj18 --same-machine

@tscircuitbot

tscircuitbot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

Both revisions ran sequentially in one Blacksmith job on blacksmith-01m21ckff5a2hpj9rhvycvawrx-8vcpu.

Dataset: srj18 · Scenarios: 16
Main: 207c419 · PR: 2929e2e

Solver Metric Main PR Delta
Pipeline9 Completion 81.3% (🕒6.3%) 81.3% (🕒6.3%) 0.0 pp
Pipeline9 Relaxed DRC pass 62.5% (🕒6.3%) 62.5% (🕒6.3%) 0.0 pp
Pipeline9 DRC issues 51 51 0
Pipeline9 Timeouts 1 1 0
Pipeline9 P50 time 101.6s 95.2s -6.3%
Pipeline9 P60 time 127.3s 125.1s -1.7%
Pipeline9 P70 time 215.7s 202.3s -6.2%
Pipeline9 P80 time 269.7s 245.7s -8.9%
Pipeline9 P90 time 312.8s 303.0s -3.1%
Pipeline9 P95 time 339.8s 335.3s -1.3%
Pipeline9 Average vias 210.92 210.92 0.0%

Outcome changes: 0 improved, 0 regressed. DRC issues are totaled across solved samples. Timing percentiles include solved and timed-out samples; negative timing deltas are faster.

Workflow: View run
Artifact: Download raw reports

@seveibar

seveibar commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

/benchmark --pipeline 9 --dataset srj18 --same-machine

@seveibar

seveibar commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

/benchmark --pipeline 9 --dataset srj18 --profile-solvers

@tscircuitbot

tscircuitbot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

Both revisions ran sequentially in one Blacksmith job on blacksmith-01m21g2b915fg1sjh3f707jf5x-8vcpu.

Dataset: srj18 · Scenarios: 16
Main: 207c419 · PR: af9bf28

Solver Metric Main PR Delta
Pipeline9 Completion 81.3% (🕒6.3%) 81.3% (🕒6.3%) 0.0 pp
Pipeline9 Relaxed DRC pass 62.5% (🕒6.3%) 62.5% (🕒6.3%) 0.0 pp
Pipeline9 DRC issues 51 51 0
Pipeline9 Timeouts 1 1 0
Pipeline9 P50 time 102.7s 95.4s -7.1%
Pipeline9 P60 time 131.3s 128.7s -1.9%
Pipeline9 P70 time 222.0s 204.7s -7.8%
Pipeline9 P80 time 279.0s 252.3s -9.6%
Pipeline9 P90 time 319.3s 306.5s -4.0%
Pipeline9 P95 time 336.3s 335.6s -0.2%
Pipeline9 Average vias 210.92 210.92 0.0%

Outcome changes: 0 improved, 0 regressed. DRC issues are totaled across solved samples. Timing percentiles include solved and timed-out samples; negative timing deltas are faster.

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

srj18 Results

Profile Solvers: completed. Comparison tables are included below.

Main vs PR

Dataset: srj18 · Scenarios: 16 · Effort: 1x effort

Solver Metric Main PR Change
Pipeline9 Completion n/a 81.3% (🕒6.3%) n/a
Pipeline9 Relaxed DRC pass n/a 62.5% (🕒6.3%) n/a
Pipeline9 DRC issues n/a 51 n/a
Pipeline9 Timeouts 0 1 +1
Pipeline9 P50 time n/a 83.9s n/a
Pipeline9 P60 time n/a 109.9s n/a
Pipeline9 P70 time n/a 181.1s n/a
Pipeline9 P80 time n/a 221.0s n/a
Pipeline9 P90 time n/a 268.3s n/a
Pipeline9 P95 time n/a 311.0s n/a
Pipeline9 Average vias n/a 210.92 n/a

DRC issues are totaled across solved samples. Timing percentiles include solved and timed-out samples; negative timing changes are faster.

Previous main run details
Solver Sample Status Via Time Relaxed DRC Error
Pipeline7 1 Solved 184 40.1s Passed
Pipeline7 2 Timeout 360.0s Failed
HighDensityForceImproveSolverPhase: highDensityForceImproveSolver
Timed out after 360.0s
Last progress: phase=highDensityForceImproveSolver, solver=HighDensityForceImproveSolver, pipelineIterations=1748019, phaseIterations=121, pipelineProgress=59%, phaseProgress=0%
Pipeline7 3 Solved 89 34.3s Passed
Pipeline7 4 Solved 135 107.2s Failed
Pipeline7 5 Solved 146 30.9s Passed
Pipeline7 6 Timeout 360.0s Failed
HighDensitySolverPhase: highDensityRouteSolver
Timed out after 360.0s
Last progress: phase=highDensityRouteSolver, solver=HighDensitySolver, pipelineIterations=2516387, phaseIterations=485341, pipelineProgress=55%, phaseProgress=0%
Pipeline7 7 Solved 231 44.2s Passed
Pipeline7 8 Solved 301 261.3s Failed
Pipeline7 9 Solved 125 61.1s Passed
Pipeline7 10 Solved 171 130.2s Passed
Pipeline7 11 Solved 183 114.6s Passed
Pipeline7 12 Solved 293 256.6s Passed
Pipeline7 13 Solved 225 274.4s Failed
Pipeline7 14 Failed 106.1s Failed
TinyHypergraphPortPointPathingSolverPhase: portPointPathingSolver
SelectiveReripTinyHyperGraphSolverWithStableInitialAssignments ran out of iterations
Pipeline7 15 Failed 104.0s Failed
TinyHypergraphPortPointPathingSolverPhase: portPointPathingSolver
SelectiveReripTinyHyperGraphSolverWithStableInitialAssignments ran out of iterations
Pipeline7 16 Solved 103 71.1s Failed
Previous main profile details

12/16 scenarios solved (4 failed) in 361.4s

Solver Scenarios Success Iterations Total Time
SingleHighDensityRouteSolver 12 100% 19,188,490 4756.9s
CachedIntraNodeRouteSolver 12 100% 17,639,586 4397.4s
HighDensitySolver 12 100% 2,226,125 408.3s
GrowShrinkHighDensityIntraNodeSolver 12 100% 2,216,319 407.7s
PortfolioSingleIntraNodeSolver 12 100% 2,216,319 407.4s
TinyHypergraphPortPointPathingSolver 14 86% 12,745,913 317.3s
TraceSimplificationSolver 12 100% 104,678 92.7s
MultiSimplifiedPathSolver 12 100% 86,542 71.4s
MultiHeadPolyLineIntraNodeSolver3 10 40% 18,883 29.5s
TraceWidthSolver 12 100% 243,299 13.6s
UselessViaRemovalSolver 12 100% 18,059 11.7s
SingleRouteUselessViaRemovalSolver 12 100% 11,781 7.4s
SingleSimplifiedPathSolver 12 100% 80,263 5.7s
CrossingViaReductionSolver 12 100% 29 2.5s
PreprocessSimpleRouteJsonSolver 14 100% 14 2.3s
CapacityMeshEdgeSolver2_NodeTreeOptimization 14 100% 46,363 2.2s
ViaPossibilitiesSolver2 10 60% 1,173,010 1.5s
MultipleHighDensityRouteStitchSolver3 12 100% 21,861 1.3s
AvailableSegmentPointSolver 14 100% 14 657ms
SingleHighDensityRouteStitchSolver3 12 100% 34,645 568ms
EscapeViaLocationSolver 14 100% 14 363ms
NetToPointPairsSolver2_OffBoardConnection 14 100% 1,477 330ms
SameNetViaMergerSolver 12 100% 36 218ms
NodeDimensionSubdivisionSolver 14 100% 14 169ms
SingleLayerNoDifferentRootIntersectionsIntraNodeSolver 7 100% 16 47ms
Pipeline4HighDensityRepairSolver 12 100% 12 3ms
PR run details
Solver Sample Status Via Time Relaxed DRC Error Delta
Pipeline9 1 Solved 184 (=best) 34.4s Passed
Pipeline9 2 Solved 496 284.5s Failed
Pipeline9 3 Solved 93 (+4, worse) 29.6s Passed
Pipeline9 4 Solved 130 111.6s Passed
Pipeline9 5 Solved 148 (+45, worse) 24.9s Passed
Pipeline9 6 Timeout 360.0s Failed
GlobalDrcForceImproveSolverPhase: globalDrcForceImproveSolver
Timed out after 360.0s
Last progress: phase=globalDrcForceImproveSolver, solver=GlobalDrcForceImproveSolver, pipelineIterations=3084676, phaseIterations=6, pipelineProgress=83%, phaseProgress=0%
Pipeline9 7 Solved 239 (+8, worse) 52.5s Passed
Pipeline9 8 Solved 314 177.4s Passed
Pipeline9 9 Solved 128 (+3, worse) 44.9s Passed
Pipeline9 10 Solved 174 (+3, worse) 47.8s Passed
Pipeline9 11 Solved 192 (+13, worse) 102.8s Passed
Pipeline9 12 Solved 300 (+8, worse) 230.5s Passed
Pipeline9 13 Solved 231 214.6s Failed
Pipeline9 14 Failed 115.3s Failed
TinyHypergraphPortPointPathingSolverPhase: portPointPathingSolver
SelectiveReripTinyHyperGraphSolverWithStableInitialAssignments ran out of iterations
Pipeline9 15 Failed 100.8s Failed
TinyHypergraphPortPointPathingSolverPhase: portPointPathingSolver
SelectiveReripTinyHyperGraphSolverWithStableInitialAssignments ran out of iterations
Pipeline9 16 Solved 113 64.9s Failed
PR profile comparison

12/16 scenarios solved (4 failed) in 361.5s

Solver Main Scenarios PR Scenarios Main Success PR Success Main Iterations PR Iterations Main Total Time PR Total Time Success Delta
SingleHighDensityRouteSolver 12 12 100% 100% 19,188,490 19,188,490 4756.9s 4891.8s 0%
CachedIntraNodeRouteSolver 12 12 100% 100% 17,639,586 17,639,586 4397.4s 4497.2s 0%
HighDensitySolver 12 12 100% 100% 2,226,125 2,226,125 408.3s 413.4s 0%
GrowShrinkHighDensityIntraNodeSolver 12 12 100% 100% 2,216,319 2,216,319 407.7s 412.8s 0%
PortfolioSingleIntraNodeSolver 12 12 100% 100% 2,216,319 2,216,319 407.4s 412.5s 0%
TinyHypergraphPortPointPathingSolver 14 14 86% 86% 12,745,913 12,745,913 317.3s 327.5s 0%
TraceSimplificationSolver 12 12 100% 100% 104,678 104,678 92.7s 94.1s 0%
MultiSimplifiedPathSolver 12 12 100% 100% 86,542 86,542 71.4s 72.7s 0%
MultiHeadPolyLineIntraNodeSolver3 10 10 40% 40% 18,883 18,883 29.5s 29.7s 0%
TraceWidthSolver 12 12 100% 100% 243,299 243,299 13.6s 13.7s 0%
UselessViaRemovalSolver 12 12 100% 100% 18,059 18,059 11.7s 11.7s 0%
SingleRouteUselessViaRemovalSolver 12 12 100% 100% 11,781 11,781 7.4s 7.7s 0%
SingleSimplifiedPathSolver 12 12 100% 100% 80,263 80,263 5.7s 5.8s 0%
CrossingViaReductionSolver 12 12 100% 100% 29 29 2.5s 2.5s 0%
PreprocessSimpleRouteJsonSolver 14 14 100% 100% 14 14 2.3s 2.2s 0%
CapacityMeshEdgeSolver2_NodeTreeOptimization 14 14 100% 100% 46,363 46,363 2.2s 2.1s 0%
ViaPossibilitiesSolver2 10 10 60% 60% 1,173,010 1,173,010 1.5s 1.6s 0%
MultipleHighDensityRouteStitchSolver3 12 12 100% 100% 21,861 21,861 1.3s 1.3s 0%
AvailableSegmentPointSolver 14 14 100% 100% 14 14 657ms 601ms 0%
SingleHighDensityRouteStitchSolver3 12 12 100% 100% 34,645 34,645 568ms 567ms 0%
EscapeViaLocationSolver 14 14 100% 100% 14 14 363ms 368ms 0%
NetToPointPairsSolver2_OffBoardConnection 14 14 100% 100% 1,477 1,477 330ms 336ms 0%
SameNetViaMergerSolver 12 12 100% 100% 36 36 218ms 218ms 0%
NodeDimensionSubdivisionSolver 14 14 100% 100% 14 14 169ms 188ms 0%
SingleLayerNoDifferentRootIntersectionsIntraNodeSolver 7 7 100% 100% 16 16 47ms 47ms 0%
Pipeline4HighDensityRepairSolver 12 12 100% 100% 12 12 3ms 4ms 0%

Workflow: View run
Artifact: https://github.com/tscircuit/tscircuit-autorouter/actions/runs/34282888482

@AnasSarkiz
AnasSarkiz requested a review from seveibar September 8, 2026 22:05
@seveibar

seveibar commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

/benchmark --dataset 18 --same-machine

@tscircuitbot

tscircuitbot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

Both revisions ran sequentially in one Blacksmith job on blacksmith-01m226r1dkdejfp1y9qsd0ty10-8vcpu.

Dataset: srj18 · Scenarios: 16
Main: 207c419 · PR: af9bf28

Solver Metric Main PR Delta
Pipeline9 Completion 81.3% (🕒6.3%) 81.3% (🕒6.3%) 0.0 pp
Pipeline9 Relaxed DRC pass 62.5% (🕒6.3%) 62.5% (🕒6.3%) 0.0 pp
Pipeline9 DRC issues 51 51 0
Pipeline9 Timeouts 1 1 0
Pipeline9 P50 time 97.3s 90.8s -6.7%
Pipeline9 P60 time 121.1s 119.4s -1.4%
Pipeline9 P70 time 209.7s 191.6s -8.7%
Pipeline9 P80 time 257.1s 231.3s -10.1%
Pipeline9 P90 time 294.2s 278.1s -5.5%
Pipeline9 P95 time 323.9s 318.0s -1.8%
Pipeline9 Average vias 210.92 210.92 0.0%

Outcome changes: 0 improved, 0 regressed. DRC issues are totaled across solved samples. Timing percentiles include solved and timed-out samples; negative timing deltas are faster.

Workflow: View run
Artifact: Download raw reports

@seveibar

seveibar commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

@AnasSarkiz you definitely get credit for this fix (100%) but my AI rewrote it and I think it's a bit more understandable #2475

rather than iterate on naming i'm going to merge that PR but this fix credit should go to you

@seveibar seveibar closed this Sep 9, 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.

3 participants