Skip to content

Balance global routing and accelerate detailed routing - #2090

Merged
seveibar merged 8 commits into
mainfrom
agent/balanced-tiny-hypergraph-routing
Aug 13, 2026
Merged

Balance global routing and accelerate detailed routing#2090
seveibar merged 8 commits into
mainfrom
agent/balanced-tiny-hypergraph-routing

Conversation

@seveibar

@seveibar seveibar commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Add a guarded dual-candidate tiny-hypergraph portfolio for 30–99 route graphs.
  • Evaluate the trace-density-aware candidate only when the legacy result predicts meaningful downstream failure pressure and concentrated port usage.
  • Select the alternative when it materially disperses port concentration without PF regression, or when PF sum, squared PF, max PF, concentration, and segment count all improve together.
  • Release the losing solver before detailed routing to avoid retaining both graph states.
  • Record candidate and per-phase benchmark telemetry.
  • Pin tiny-hypergraph commit 5e428bd5e88a5a74afed195c179783896aef4ca0 from Add trace-density region cost option tiny-hypergraph#165.
  • Remove behavior-independent high-density A* overhead with numeric grid ids, explicit node construction, cached immutable via ancestry, an equivalent hole-sifting heap, optional visualization-history capture, and one shared future-penalty scan for each neighbor's g/h scores.
  • Share planar point/edge obstacle queries through blocker-only per-layer indexes, flatten immutable future-connection points, cache future trace segments, and skip a redundant argument-less progress calculation.
  • Spatially index route-stitch clearance geometry by copper layer and cache same-net lookups, while retaining the original exact clearance and endpoint-escape checks.
  • Use tiny-hypergraph's compact typed candidate state instead of explicitly forcing sparse Map storage.
  • Pin high-density-repair01 commit 8eaa775e7c7a2c32c12a82da4edef22477549027 from Prune remote projection segment pairs high-density-repair01#16, conservatively pruning remote segment pairs before force-projection exact geometry.

Why

Minimizing legacy global-region cost in isolation was not a universal win: several configurations shortened high-density routing but shifted more work into exact-geometry DRC repair. The portfolio spends extra global-routing time only when completed-topology diagnostics predict lower total downstream work.

The first six-dataset same-machine run of the global-routing changes improved aggregate runtime by 1.55%, completion from 490/587 to 495/587, DRC passes from 266 to 268, and timeouts from 96 to 91. Every selected candidate won and the selected subset was 30.8% faster, showing that selector recall—not candidate quality—was the limiting factor. That was still too small as a universal performance win, so the final patch also removes detailed-routing hot-loop overhead without changing the search policy.

Follow-up selector tuning

Both candidates were profiled for every evaluated SRJ19/SRJ20 case and every current timeout. End-to-end matched trials used fresh one-worker processes and equal 150 second caps.

The tuned selector adds five candidates across the observed benchmark population. The full audit preserves primary routing for all other rejected candidates, including known regressions.

Dataset/sample Primary Alternative Outcome
SRJ19 48 150 s timeout 77.2 s complete timeout converted
SRJ19 91 150 s timeout 148.7 s complete timeout converted in isolated run
SRJ19 117 150 s timeout 95.4 s complete timeout converted
SRJ20 132 65.9 s, 4 DRC errors 58.1 s, DRC pass 11.9% faster; 166 → 146 vias
SRJ20 189 43.2 s, 9 DRC errors 35.0 s, DRC pass 19.0% faster; 130 → 114 vias

Negative controls rejected broader policies: SRJ20 sample 6 changed an 81.1 second completion into a timeout, sample 143 slowed 13.7%, SRJ19 sample 173 remained a high-density timeout, SRJ20 sample 119 remained an exact-repair timeout, and SRJ19 sample 121 was neutral.

Detailed-routing speedup

A more aggressive trace-density factor was rejected after it lowered every tiny-stage pressure metric on promising SRJ19 cases but merely moved their timeout into high-density or exact-geometry repair. CPU profiling then identified behavior-independent overhead in the downstream A* loop.

Matched one-worker trials on eight high-density-heavy dataset01 cases retained identical high-density iteration counts, via counts, DRC messages, completion, and DRC status in every case:

Metric PR baseline Optimized Change
High-density route time 20.84 s 13.29 s -36.2% (1.57x faster)
End-to-end time 43.24 s 35.86 s -17.1% (1.21x faster)
Completed / relaxed DRC 8 / 8 8 / 8 identical

The larger SRJ18 sample 11 control retained 206,760 high-density iterations, 179 vias, and zero DRC errors. Its high-density phase fell from 27.48 to 18.23 seconds (-33.7%, 1.51x faster), and total time fell from 54.22 to 44.71 seconds (-17.5%). A same-process memory comparison on dataset01 sample 32 reduced maximum RSS from 858 MB to 842 MB and peak footprint from 662 MB to 625 MB.

The latest follow-up was measured against commit 4b97a6c on the same eight cases. It retained byte-identical final output in every case while adding another 13.9% detailed-routing and 5.5% end-to-end reduction. A separate matched panel measured another 1.5% detailed-routing reduction from the progress guard. Applying those ratios to the preceding exact comparison puts the accepted stack at approximately 1.85x faster in detailed A* and 22% faster end-to-end than the original PR baseline.

Follow-up metric 4b97a6c Spatial query sharing Change
High-density route time 17.18 s 14.79 s -13.9%
End-to-end time 40.59 s 38.34 s -5.5%

On SRJ18 sample 11, the follow-up alone reduced detailed routing from 21.65 s to 19.35 s (-10.6%) with the same 206,760 iterations, 179 vias, zero DRC errors, and byte-identical output. The cleaned final sample-32 memory run used 841 MB maximum RSS and a 623 MB peak footprint, slightly below 4b97a6c at 842 MB / 625 MB.

The full experiment ledger is checked in at experiments/tiny-hypergraph-balanced-routing.md.

Route-stitching speedup

The next profile found 710 tentative stitches scanning as many as 14,968
segments and 370 vias on dataset01 sample 32, producing 3.56 million same-net
checks. Dynamic R-tree indexes reduce that to 6,086 checks (-99.8%), while all
nearby candidates still run the original exact geometry tests.

Across the same eight dense dataset01 cases, this follow-up preserved iteration
counts, vias, DRC results, and byte-for-byte final output in every case:

Metric 125edc34 Indexed stitching Change
End-to-end time 41.22 s 36.60 s -11.2%
Stitch phase 3.26 s 0.147 s -95.5%

SRJ18 sample 11 was also byte-identical and improved end-to-end from 48.38 s
to 43.24 s (-10.6%), with stitch time falling from 3.35 s to 44 ms (-98.7%).
SRJ23 sample 39 was byte-identical and improved from 31.87 s to 31.56 s, with
stitch time falling from 300 ms to 9 ms. A matched memory pair increased peak
RSS from 833 MB to 864 MB and footprint from 639 MB to 667 MB (about 3-4%, still
below the 1 GB safety ceiling).

Force-projection and compact-state speedups

The final profile found force projection evaluating exact segment-distance
geometry for every same-layer route pair. A live AABB lower bound now rejects
pairs separated by at least their required clearance; remaining pairs retain
the exact original order, distance calculation, and projection behavior.

Across the same eight dense dataset01 cases, force-improvement time fell from
3.536 s to 2.063 s (-41.7%, 1.71x faster) and end-to-end time fell 3.75%. Every
high-density iteration count, via count, DRC result, and output hash remained
identical. SRJ18 sample 11 was also byte-identical and reduced force time from
1.328 s to 0.703 s (-47.1%).

Enabling tiny-hypergraph's merged compact typed candidate storage reduced its
phase by 11.6% on a separate matched dense panel with identical final region
costs and output. It is bounded by legal incident hops, avoiding the memory
hazard of the former dense port-by-region allocation.

Final official same-machine benchmark

The exact final head (54191bc) completed all six datasets and 587 scenarios.
Compared with current main on the same machine, aggregate scenario time fell
15.3%; P50/P60/P70/P80 fell 26.4%/25.8%/27.5%/30.3%; completion increased from
492 to 510; relaxed DRC passes increased from 266 to 271; and timeouts fell
from 94 to 76. There were 22 improved outcomes and zero regressions.

The result is broad: every dataset improved every non-timeout-capped reported
percentile. Dataset01 P95 improved 36.7% (1.58x), SRJ18 completion improved
12.5 percentage points, SRJ19 completion improved 5.5 points, and SRJ20 P50
improved 37.4% while DRC improved 2.0 points.

A paired-only region audit excludes main timeouts that never emitted tiny
metrics. Across 492-493 directly comparable cases, summed best max region cost
changed +0.24%, summed best total region cost +2.37%, final max occupancy
-0.13%, and squared occupancy -0.54%. This stays comfortably inside the ~20%
region-cost guardrail.

Validation

  • bun test tests/solvers/tinyhypergraph-candidate-portfolio.test.ts
  • bun test tests/single-high-density-route-solver.test.ts tests/data-structures/single-route-candidate-priority-queue.test.ts tests/features/never-fail-growth-high-density/pipeline7-integration.test.ts tests/features/high-density-future-cost-cmn3.test.ts
  • bun test tests/features/pipeline7-full-pipeline-svg-frames.test.ts tests/pipeline-stage-debug-runner.test.ts tests/high-density-solver-failed-node-visualization.test.ts
  • bun test tests/stitch-solver/collision-aware-stitch-selection-visual.test.ts tests/stitch-solver/multilayer-connection-stitch.test.ts tests/stitch-solver/single-high-density-route-stitch-gap-bridge.test.ts tests/bugs/bugreport44-0ec411-source-net-0-stitch.test.ts tests/bugs/bugreport46-ac4337-source-net-23-stitch-repro.test.ts tests/features/pipeline7-dataset01-circuit107-open-stitch-route.test.ts
  • bunx tsc --noEmit
  • bun run build
  • bun run format:check
  • git diff --check
  • high-density-repair01: bun test (14 pass), bunx tsc --noEmit, bun run format:check
  • End-to-end matched Pipeline 7 trials for accepted candidates and negative controls
  • Complete tiny-stage candidate audit across evaluated SRJ19/SRJ20 cases and current timeouts
  • 1,000 randomized priority-queue operation streams matched the legacy implementation's identity order

bugreport88 was intentionally excluded from local testing due its prior RAM behavior. All routing trials used one worker; no timeout was increased.

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
capacity-node-autorouter Ready Ready Preview Aug 13, 2026 5:06am

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 --same-machine
/benchmark-all --same-machine

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 exactly /benchmark-all to start separate workflow runs and result comments for the default dataset plus srj18, srj19, srj20, srj21, and srj23.
Append --same-machine to /benchmark or /benchmark-all to compare current main and the PR head sequentially on the same 8-vCPU Blacksmith runner.

Everything after /benchmark or /benchmark-long 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 7 --scenario-limit 20, /benchmark all 20 --concurrency 8, /benchmark --same-machine, /benchmark-all --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.

Copy link
Copy Markdown
Contributor Author

/benchmark-all --same-machine

@tscircuitbot

tscircuitbot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

The paired benchmark ended with failure before both reports were produced.

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

The paired benchmark ended with failure before both reports were produced.

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

The paired benchmark ended with failure before both reports were produced.

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

The paired benchmark ended with failure before both reports were produced.

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj21 · Scenarios: 10
Main: 100a1b2 · PR: f71080f

Solver Metric Main PR Delta
Pipeline7 Completion 100.0% 100.0% 0.0 pp
Pipeline7 Relaxed DRC pass 90.0% 90.0% 0.0 pp
Pipeline7 Timeouts 0 0 0
Pipeline7 P50 time 3.6s 3.6s -1.4%
Pipeline7 P60 time 4.3s 4.0s -7.8%
Pipeline7 P70 time 4.3s 4.1s -5.7%
Pipeline7 P80 time 4.6s 4.5s -0.6%
Pipeline7 P90 time 6.2s 6.3s +0.7%
Pipeline7 P95 time 10.6s 11.2s +5.5%
Pipeline7 Average vias 12.10 12.10 0.0%

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

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj23 · Scenarios: 76
Main: 100a1b2 · PR: f71080f

Solver Metric Main PR Delta
Pipeline7 Completion 98.7% 98.7% 0.0 pp
Pipeline7 Relaxed DRC pass 14.5% 14.5% 0.0 pp
Pipeline7 Timeouts 0 0 0
Pipeline7 P50 time 5.5s 5.0s -10.7%
Pipeline7 P60 time 9.7s 10.2s +5.2%
Pipeline7 P70 time 15.2s 14.7s -3.4%
Pipeline7 P80 time 36.8s 39.6s +7.6%
Pipeline7 P90 time 97.1s 104.9s +8.0%
Pipeline7 P95 time 153.8s 161.8s +5.2%
Pipeline7 Average vias 12.75 12.75 0.0%

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

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: dataset01 · Scenarios: 85
Main: 100a1b2 · PR: f71080f

Solver Metric Main PR Delta
Pipeline7 Completion 100.0% 100.0% 0.0 pp
Pipeline7 Relaxed DRC pass 98.8% 98.8% 0.0 pp
Pipeline7 Timeouts 0 0 0
Pipeline7 P50 time 3.8s 3.8s -0.5%
Pipeline7 P60 time 5.7s 5.8s +2.2%
Pipeline7 P70 time 7.5s 7.2s -3.4%
Pipeline7 P80 time 11.0s 10.8s -2.2%
Pipeline7 P90 time 16.6s 16.4s -1.0%
Pipeline7 P95 time 20.4s 19.4s -4.7%
Pipeline7 Average vias 37.55 37.55 0.0%

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

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj20 · Scenarios: 200
Main: 100a1b2 · PR: f71080f

Solver Metric Main PR Delta
Pipeline7 Completion 72.0% (🕒28.0%) 72.5% (🕒27.5%) +0.5 pp
Pipeline7 Relaxed DRC pass 38.5% (🕒28.0%) 39.5% (🕒27.5%) +1.0 pp
Pipeline7 Timeouts 56 55 -1
Pipeline7 P50 time 94.9s 92.3s -2.8%
Pipeline7 P60 time 174.9s 158.6s -9.3%
Pipeline7 P70 time 304.9s 299.3s -1.8%
Pipeline7 P80 time 360.0s 360.0s 0.0%
Pipeline7 P90 time 360.0s 360.0s 0.0%
Pipeline7 P95 time 360.0s 360.0s 0.0%
Pipeline7 Average vias 86.53 86.94 +0.5%

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

Changed outcomes (3)
Solver Sample Main PR Main time PR time Delta
Pipeline7 22 Solved (DRC failed) DRC passed 39.0s 26.6s Improved
Pipeline7 86 Solved (DRC failed) DRC passed 94.7s 54.5s Improved
Pipeline7 149 Timeout Solved (DRC failed) 360.0s 326.9s Improved

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj18 · Scenarios: 16
Main: 100a1b2 · PR: f71080f

Solver Metric Main PR Delta
Pipeline7 Completion 56.3% (🕒43.8%) 56.3% (🕒43.8%) 0.0 pp
Pipeline7 Relaxed DRC pass 31.3% (🕒43.8%) 31.3% (🕒43.8%) 0.0 pp
Pipeline7 Timeouts 7 7 0
Pipeline7 P50 time 252.7s 241.7s -4.3%
Pipeline7 P60 time 360.0s 360.0s 0.0%
Pipeline7 P70 time 360.0s 360.0s 0.0%
Pipeline7 P80 time 360.0s 360.0s 0.0%
Pipeline7 P90 time 360.0s 360.0s 0.0%
Pipeline7 P95 time 360.0s 360.0s 0.0%
Pipeline7 Average vias 166.22 166.22 0.0%

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

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj19 · Scenarios: 200
Main: 100a1b2 · PR: f71080f

Solver Metric Main PR Delta
Pipeline7 Completion 83.5% (🕒16.5%) 85.5% (🕒14.5%) +2.0 pp
Pipeline7 Relaxed DRC pass 40.0% (🕒16.5%) 40.0% (🕒14.5%) 0.0 pp
Pipeline7 Timeouts 33 29 -4
Pipeline7 P50 time 59.3s 60.8s +2.4%
Pipeline7 P60 time 96.6s 91.9s -4.9%
Pipeline7 P70 time 166.9s 161.8s -3.0%
Pipeline7 P80 time 294.6s 298.4s +1.3%
Pipeline7 P90 time 360.0s 360.0s 0.0%
Pipeline7 P95 time 360.0s 360.0s 0.0%
Pipeline7 Average vias 80.93 82.92 +2.5%

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

Changed outcomes (4)
Solver Sample Main PR Main time PR time Delta
Pipeline7 6 Timeout Solved (DRC failed) 360.0s 347.9s Improved
Pipeline7 153 Timeout Solved (DRC failed) 360.0s 142.7s Improved
Pipeline7 159 Timeout Solved (DRC failed) 360.0s 353.0s Improved
Pipeline7 175 Timeout Solved (DRC failed) 360.0s 141.0s Improved

Workflow: View run
Artifact: Download raw reports

Copy link
Copy Markdown
Contributor Author

Same Machine Benchmark Results — Aggregate

All six /benchmark-all --same-machine datasets completed against main 100a1b2 and PR f71080f.

Dataset Scenarios Runtime delta Completion (main → PR) DRC passes (main → PR) Timeouts (main → PR) Candidate eval / selected
dataset01 85 -1.99% 85 → 85 84 → 84 0 → 0 0 / 0
SRJ18 16 -0.19% 9 → 9 5 → 5 7 → 7 0 / 0
SRJ19 200 -2.00% 167 → 171 80 → 80 33 → 29 22 / 3
SRJ20 200 -1.54% 144 → 145 77 → 79 56 → 55 43 / 8
SRJ21 10 +0.56% 10 → 10 9 → 9 0 → 0 0 / 0
SRJ23 76 +1.31% 75 → 75 11 → 11 0 → 0 0 / 0
Total 587 -1.55% 490 → 495 266 → 268 96 → 91 65 / 11

Aggregate measured scenario runtime: 62,829.4s → 61,857.0s, saving 972.4s (16m12s).

Outcome changes: 7 improved, 0 regressed. Completion improved 83.5% → 84.3% (+0.9 pp) and relaxed DRC improved 45.3% → 45.7% (+0.3 pp).

Selector attribution

  • The alternative was evaluated for 65/587 scenarios (11.1%) and selected for 11/587 (1.9%).
  • The 11 selected cases were 30.75% faster in aggregate: 2,522.6s → 1,746.9s, saving 775.7s.
  • Every selected case was faster; selected outcomes changed from 7 → 11 completed, 1 → 3 DRC passes, and 4 → 0 timeouts.
  • The remaining 576 cases were effectively neutral (-0.33%), consistent with ordinary same-machine variance.
  • In the seven selected cases where main produced comparable tiny-hypergraph metrics, squared region-segment concentration fell 15.9% (12,904 → 10,848). The legacy total-region-cost scalar increased 24.4%, so the observed gain is specifically from better capacity distribution, not a lower legacy scalar score.

Assessment

This is a meaningful quality win and a modest net speed win, not a dramatic throughput improvement. The guarded strategy behaves as intended: it is inert on datasets that do not meet the congestion gates, and its sparse accepted candidates account for most of the aggregate savings without any observed outcome regression. A repeat paired run would still be prudent before merge because this is one same-machine sample per dataset.

@seveibar

Copy link
Copy Markdown
Contributor Author

/benchmark-all --same-machine

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj18 · Scenarios: 16
Main: e58a2bb · PR: b0e8a53

Solver Metric Main PR Delta
Pipeline7 Completion 56.3% (🕒43.8%) 56.3% (🕒43.8%) 0.0 pp
Pipeline7 Relaxed DRC pass 31.3% (🕒43.8%) 31.3% (🕒43.8%) 0.0 pp
Pipeline7 Timeouts 7 7 0
Pipeline7 P50 time 245.8s 266.5s +8.5%
Pipeline7 P60 time 360.0s 360.0s 0.0%
Pipeline7 P70 time 360.0s 360.0s 0.0%
Pipeline7 P80 time 360.0s 360.0s 0.0%
Pipeline7 P90 time 360.0s 360.0s 0.0%
Pipeline7 P95 time 360.0s 360.0s 0.0%
Pipeline7 Average vias 166.22 166.22 0.0%

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

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: dataset01 · Scenarios: 85
Main: e58a2bb · PR: b0e8a53

Solver Metric Main PR Delta
Pipeline7 Completion 100.0% 100.0% 0.0 pp
Pipeline7 Relaxed DRC pass 98.8% 98.8% 0.0 pp
Pipeline7 Timeouts 0 0 0
Pipeline7 P50 time 3.6s 4.0s +9.7%
Pipeline7 P60 time 6.4s 6.2s -3.4%
Pipeline7 P70 time 7.5s 7.5s +0.0%
Pipeline7 P80 time 11.5s 11.8s +2.3%
Pipeline7 P90 time 17.1s 17.6s +2.8%
Pipeline7 P95 time 19.9s 19.6s -1.6%
Pipeline7 Average vias 37.55 37.55 0.0%

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

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

The paired benchmark ended with cancelled before both reports were produced.

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

The paired benchmark ended with cancelled before both reports were produced.

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj21 · Scenarios: 10
Main: e58a2bb · PR: b0e8a53

Solver Metric Main PR Delta
Pipeline7 Completion 100.0% 100.0% 0.0 pp
Pipeline7 Relaxed DRC pass 90.0% 90.0% 0.0 pp
Pipeline7 Timeouts 0 0 0
Pipeline7 P50 time 3.8s 3.3s -14.6%
Pipeline7 P60 time 4.2s 3.7s -12.3%
Pipeline7 P70 time 4.5s 4.0s -11.4%
Pipeline7 P80 time 4.7s 4.3s -9.3%
Pipeline7 P90 time 6.5s 6.1s -6.7%
Pipeline7 P95 time 11.6s 10.9s -6.2%
Pipeline7 Average vias 12.10 12.10 0.0%

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

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj23 · Scenarios: 76
Main: e58a2bb · PR: b0e8a53

Solver Metric Main PR Delta
Pipeline7 Completion 98.7% 98.7% 0.0 pp
Pipeline7 Relaxed DRC pass 14.5% 14.5% 0.0 pp
Pipeline7 Timeouts 0 0 0
Pipeline7 P50 time 4.5s 4.1s -8.0%
Pipeline7 P60 time 8.9s 9.4s +6.5%
Pipeline7 P70 time 13.4s 14.4s +7.4%
Pipeline7 P80 time 36.3s 33.2s -8.3%
Pipeline7 P90 time 94.2s 92.2s -2.1%
Pipeline7 P95 time 151.2s 146.9s -2.9%
Pipeline7 Average vias 12.75 12.75 0.0%

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

Workflow: View run
Artifact: Download raw reports

@seveibar seveibar changed the title Balance tiny-hypergraph routing for downstream phases Balance global routing and accelerate detailed A-star routing Aug 13, 2026
@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj21 · Scenarios: 10
Main: e58a2bb · PR: 125edc3

Solver Metric Main PR Delta
Pipeline7 Completion 100.0% 100.0% 0.0 pp
Pipeline7 Relaxed DRC pass 90.0% 90.0% 0.0 pp
Pipeline7 Timeouts 0 0 0
Pipeline7 P50 time 4.0s 3.4s -15.6%
Pipeline7 P60 time 4.4s 3.7s -14.3%
Pipeline7 P70 time 4.5s 4.0s -10.9%
Pipeline7 P80 time 4.8s 4.3s -9.3%
Pipeline7 P90 time 6.5s 5.7s -12.5%
Pipeline7 P95 time 11.2s 10.6s -6.0%
Pipeline7 Average vias 12.10 12.10 0.0%

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

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj23 · Scenarios: 76
Main: e58a2bb · PR: 125edc3

Solver Metric Main PR Delta
Pipeline7 Completion 94.7% (🕒3.9%) 93.4% (🕒5.3%) -1.3 pp
Pipeline7 Relaxed DRC pass 14.5% (🕒3.9%) 14.5% (🕒5.3%) 0.0 pp
Pipeline7 Timeouts 3 4 +1
Pipeline7 P50 time 7.1s 7.4s +4.7%
Pipeline7 P60 time 15.3s 16.0s +4.4%
Pipeline7 P70 time 25.8s 28.8s +11.7%
Pipeline7 P80 time 58.4s 56.7s -2.9%
Pipeline7 P90 time 168.3s 176.8s +5.0%
Pipeline7 P95 time 269.8s 297.7s +10.3%
Pipeline7 Average vias 11.72 11.39 -2.8%

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

Changed outcomes (1)
Solver Sample Main PR Main time PR time Delta
Pipeline7 39 Solved (DRC failed) Timeout 338.2s 360.0s Regressed

Workflow: View run
Artifact: Download raw reports

@seveibar seveibar changed the title Balance global routing and accelerate detailed A-star routing Balance global routing and accelerate detailed routing Aug 13, 2026
@seveibar

seveibar commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

New local optimization results (head 895a7aa8)

The previous /benchmark-all --same-machine comments target superseded head 125edc34.

A new route-stitch spatial index reduced validator same-net checks from 3.56 million to 6,086 (-99.8%) on dense dataset01 sample 32. Matched one-worker results:

  • 8 dense dataset01 cases: 41.22s → 36.60s total (-11.2%); stitch phase 3.26s → 0.147s (-95.5%).
  • SRJ18 sample 11: 48.38s → 43.24s (-10.6%); stitch 3.35s → 44ms (-98.7%).
  • SRJ23 sample 39: 31.87s → 31.56s; stitch 300ms → 9ms.
  • All routing iterations, vias, DRC results, and output hashes were identical.
  • Matched peak memory: 833MB → 864MB RSS, 639MB → 667MB footprint; still below the 1GB guardrail.

Starting a fresh same-machine suite for this head next.

@seveibar

Copy link
Copy Markdown
Contributor Author

/benchmark-all --same-machine

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: dataset01 · Scenarios: 85
Main: e58a2bb · PR: 895a7aa

Solver Metric Main PR Delta
Pipeline7 Completion 100.0% 100.0% 0.0 pp
Pipeline7 Relaxed DRC pass 98.8% 98.8% 0.0 pp
Pipeline7 Timeouts 0 0 0
Pipeline7 P50 time 3.5s 2.8s -22.3%
Pipeline7 P60 time 5.5s 4.6s -16.7%
Pipeline7 P70 time 6.8s 5.2s -23.2%
Pipeline7 P80 time 11.2s 8.4s -24.9%
Pipeline7 P90 time 15.8s 11.2s -28.9%
Pipeline7 P95 time 18.4s 13.7s -25.6%
Pipeline7 Average vias 37.55 37.55 0.0%

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

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj18 · Scenarios: 16
Main: e58a2bb · PR: 895a7aa

Solver Metric Main PR Delta
Pipeline7 Completion 56.3% (🕒43.8%) 68.8% (🕒31.3%) +12.5 pp
Pipeline7 Relaxed DRC pass 31.3% (🕒43.8%) 37.5% (🕒31.3%) +6.2 pp
Pipeline7 Timeouts 7 5 -2
Pipeline7 P50 time 239.1s 177.7s -25.7%
Pipeline7 P60 time 360.0s 257.9s -28.4%
Pipeline7 P70 time 360.0s 334.4s -7.1%
Pipeline7 P80 time 360.0s 360.0s 0.0%
Pipeline7 P90 time 360.0s 360.0s 0.0%
Pipeline7 P95 time 360.0s 360.0s 0.0%
Pipeline7 Average vias 166.22 184.00 +10.7%

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

Changed outcomes (2)
Solver Sample Main PR Main time PR time Delta
Pipeline7 12 Timeout DRC passed 360.0s 308.9s Improved
Pipeline7 13 Timeout Solved (DRC failed) 360.0s 257.9s Improved

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

The paired benchmark ended with cancelled before both reports were produced.

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

The paired benchmark ended with cancelled before both reports were produced.

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj21 · Scenarios: 10
Main: e58a2bb · PR: 895a7aa

Solver Metric Main PR Delta
Pipeline7 Completion 100.0% 100.0% 0.0 pp
Pipeline7 Relaxed DRC pass 90.0% 90.0% 0.0 pp
Pipeline7 Timeouts 0 0 0
Pipeline7 P50 time 3.5s 2.9s -16.5%
Pipeline7 P60 time 3.9s 3.3s -14.4%
Pipeline7 P70 time 4.0s 3.7s -7.8%
Pipeline7 P80 time 4.2s 3.8s -8.1%
Pipeline7 P90 time 6.0s 5.4s -9.6%
Pipeline7 P95 time 10.5s 9.6s -8.3%
Pipeline7 Average vias 12.10 12.10 0.0%

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

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj23 · Scenarios: 76
Main: e58a2bb · PR: 895a7aa

Solver Metric Main PR Delta
Pipeline7 Completion 98.7% 98.7% 0.0 pp
Pipeline7 Relaxed DRC pass 14.5% 14.5% 0.0 pp
Pipeline7 Timeouts 0 0 0
Pipeline7 P50 time 4.1s 3.4s -16.0%
Pipeline7 P60 time 8.6s 8.2s -4.9%
Pipeline7 P70 time 13.9s 12.3s -11.1%
Pipeline7 P80 time 30.9s 31.8s +3.0%
Pipeline7 P90 time 86.0s 84.5s -1.8%
Pipeline7 P95 time 127.7s 130.4s +2.1%
Pipeline7 Average vias 12.75 12.75 0.0%

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

Workflow: View run
Artifact: Download raw reports

@seveibar

Copy link
Copy Markdown
Contributor Author

Additional downstream optimization

The latest head 54191bc adds two behavior-preserving improvements on top of the previous same-machine run:

  • uses tiny-hypergraph's merged compact typed candidate state instead of explicitly forcing sparse Map storage; matched dense-panel tiny-hypergraph time improved 11.6% with identical region costs and output;
  • pins high-density-repair01#16, which conservatively rejects remote force-projection segment pairs before exact geometry; matched force-improvement time improved 41.7% (1.71x).

Across dataset01 samples 32, 37, 39, 49, 58, 67, 73, and 77, every high-density iteration count, via count, DRC result, and byte-for-byte output hash remained identical. The force optimization alone reduced end-to-end time 3.75%; the dense-state switch is another small additive gain.

SRJ18 sample 11 remained byte-identical and its force phase improved from 1.328 s to 0.703 s (-47.1%). SRJ23 sample 39 remained byte-identical and served as a control because force projection is only ~0.1 s of its ~32 s runtime.

@seveibar

Copy link
Copy Markdown
Contributor Author

/benchmark-all --same-machine

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: dataset01 · Scenarios: 85
Main: e58a2bb · PR: 54191bc

Solver Metric Main PR Delta
Pipeline7 Completion 100.0% 100.0% 0.0 pp
Pipeline7 Relaxed DRC pass 98.8% 98.8% 0.0 pp
Pipeline7 Timeouts 0 0 0
Pipeline7 P50 time 3.6s 3.0s -17.8%
Pipeline7 P60 time 5.6s 4.1s -27.2%
Pipeline7 P70 time 6.7s 5.5s -17.6%
Pipeline7 P80 time 10.7s 7.9s -25.6%
Pipeline7 P90 time 15.6s 10.9s -30.1%
Pipeline7 P95 time 18.4s 11.6s -36.7%
Pipeline7 Average vias 37.55 37.55 0.0%

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

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj18 · Scenarios: 16
Main: e58a2bb · PR: 54191bc

Solver Metric Main PR Delta
Pipeline7 Completion 56.3% (🕒43.8%) 68.8% (🕒31.3%) +12.5 pp
Pipeline7 Relaxed DRC pass 31.3% (🕒43.8%) 37.5% (🕒31.3%) +6.2 pp
Pipeline7 Timeouts 7 5 -2
Pipeline7 P50 time 239.2s 167.9s -29.8%
Pipeline7 P60 time 360.0s 261.4s -27.4%
Pipeline7 P70 time 360.0s 324.2s -9.9%
Pipeline7 P80 time 360.0s 360.0s 0.0%
Pipeline7 P90 time 360.0s 360.0s 0.0%
Pipeline7 P95 time 360.0s 360.0s 0.0%
Pipeline7 Average vias 166.22 184.00 +10.7%

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

Changed outcomes (2)
Solver Sample Main PR Main time PR time Delta
Pipeline7 12 Timeout DRC passed 360.0s 288.5s Improved
Pipeline7 13 Timeout Solved (DRC failed) 360.0s 261.4s Improved

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj19 · Scenarios: 200
Main: e58a2bb · PR: 54191bc

Solver Metric Main PR Delta
Pipeline7 Completion 84.5% (🕒15.5%) 90.0% (🕒10.0%) +5.5 pp
Pipeline7 Relaxed DRC pass 40.0% (🕒15.5%) 40.0% (🕒10.0%) 0.0 pp
Pipeline7 Timeouts 31 20 -11
Pipeline7 P50 time 56.3s 43.2s -23.2%
Pipeline7 P60 time 86.6s 68.1s -21.4%
Pipeline7 P70 time 159.3s 108.3s -32.0%
Pipeline7 P80 time 286.2s 181.8s -36.5%
Pipeline7 P90 time 360.0s 357.2s -0.8%
Pipeline7 P95 time 360.0s 360.0s 0.0%
Pipeline7 Average vias 82.12 89.83 +9.4%

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

Changed outcomes (11)
Solver Sample Main PR Main time PR time Delta
Pipeline7 6 Timeout Solved (DRC failed) 360.0s 221.7s Improved
Pipeline7 21 Timeout Solved (DRC failed) 360.0s 339.9s Improved
Pipeline7 54 Timeout Solved (DRC failed) 360.0s 299.4s Improved
Pipeline7 91 Timeout Solved (DRC failed) 360.0s 292.2s Improved
Pipeline7 117 Timeout Solved (DRC failed) 360.0s 167.5s Improved
Pipeline7 142 Timeout Solved (DRC failed) 360.0s 356.9s Improved
Pipeline7 153 Timeout Solved (DRC failed) 360.0s 115.5s Improved
Pipeline7 154 Timeout Solved (DRC failed) 360.0s 307.8s Improved
Pipeline7 160 Timeout Solved (DRC failed) 360.0s 292.0s Improved
Pipeline7 175 Timeout Solved (DRC failed) 360.0s 106.0s Improved
Pipeline7 184 Timeout Solved (DRC failed) 360.0s 342.5s Improved

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj20 · Scenarios: 200
Main: e58a2bb · PR: 54191bc

Solver Metric Main PR Delta
Pipeline7 Completion 72.0% (🕒28.0%) 74.5% (🕒25.5%) +2.5 pp
Pipeline7 Relaxed DRC pass 38.5% (🕒28.0%) 40.5% (🕒25.5%) +2.0 pp
Pipeline7 Timeouts 56 51 -5
Pipeline7 P50 time 91.5s 57.3s -37.4%
Pipeline7 P60 time 170.8s 117.8s -31.0%
Pipeline7 P70 time 287.3s 198.7s -30.8%
Pipeline7 P80 time 360.0s 360.0s 0.0%
Pipeline7 P90 time 360.0s 360.0s 0.0%
Pipeline7 P95 time 360.0s 360.0s 0.0%
Pipeline7 Average vias 86.53 90.07 +4.1%

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

Changed outcomes (9)
Solver Sample Main PR Main time PR time Delta
Pipeline7 22 Solved (DRC failed) DRC passed 38.3s 17.6s Improved
Pipeline7 30 Timeout Solved (DRC failed) 360.0s 249.5s Improved
Pipeline7 86 Solved (DRC failed) DRC passed 90.6s 21.9s Improved
Pipeline7 100 Timeout Solved (DRC failed) 360.0s 269.9s Improved
Pipeline7 132 Solved (DRC failed) DRC passed 186.9s 131.8s Improved
Pipeline7 136 Timeout Solved (DRC failed) 360.0s 301.2s Improved
Pipeline7 149 Timeout Solved (DRC failed) 360.0s 209.9s Improved
Pipeline7 151 Timeout Solved (DRC failed) 360.0s 283.3s Improved
Pipeline7 189 Solved (DRC failed) DRC passed 120.4s 60.2s Improved

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj21 · Scenarios: 10
Main: e58a2bb · PR: 54191bc

Solver Metric Main PR Delta
Pipeline7 Completion 100.0% 100.0% 0.0 pp
Pipeline7 Relaxed DRC pass 90.0% 90.0% 0.0 pp
Pipeline7 Timeouts 0 0 0
Pipeline7 P50 time 3.6s 3.2s -10.3%
Pipeline7 P60 time 3.9s 3.5s -11.1%
Pipeline7 P70 time 4.1s 3.6s -12.3%
Pipeline7 P80 time 4.3s 3.7s -13.2%
Pipeline7 P90 time 5.9s 5.2s -11.0%
Pipeline7 P95 time 10.3s 9.4s -9.3%
Pipeline7 Average vias 12.10 12.10 0.0%

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

Workflow: View run
Artifact: Download raw reports

@tscircuitbot

tscircuitbot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Same Machine Benchmark Results

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

Dataset: srj23 · Scenarios: 76
Main: e58a2bb · PR: 54191bc

Solver Metric Main PR Delta
Pipeline7 Completion 98.7% 98.7% 0.0 pp
Pipeline7 Relaxed DRC pass 14.5% 14.5% 0.0 pp
Pipeline7 Timeouts 0 0 0
Pipeline7 P50 time 4.6s 3.2s -30.1%
Pipeline7 P60 time 8.9s 8.2s -8.0%
Pipeline7 P70 time 13.2s 12.6s -4.8%
Pipeline7 P80 time 33.2s 32.2s -2.9%
Pipeline7 P90 time 88.4s 82.6s -6.6%
Pipeline7 P95 time 134.9s 128.8s -4.5%
Pipeline7 Average vias 12.75 12.75 0.0%

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

Workflow: View run
Artifact: Download raw reports

@seveibar

Copy link
Copy Markdown
Contributor Author

Final same-machine aggregate (54191bc)

All six /benchmark-all --same-machine jobs completed successfully. Main and PR ran sequentially on the same Blacksmith runner for each dataset.

Aggregate (587 scenarios) Main PR Change
Completion 492 (83.8%) 510 (86.9%) +18 / +3.1 pp
Relaxed DRC pass 266 (45.3%) 271 (46.2%) +5 / +0.9 pp
Timeouts 94 76 -18
Total scenario time 17.02 h 14.41 h -15.3%
P50 28.5 s 21.0 s -26.4%
P60 58.0 s 43.1 s -25.8%
P70 116.0 s 84.2 s -27.5%
P80 253.2 s 176.4 s -30.3%

Outcome changes: 22 improved, 0 regressed.

Dataset Completion DRC pass Representative timing
dataset01 unchanged unchanged P50 -17.8%; P95 -36.7% (1.58x)
SRJ18 +12.5 pp +6.2 pp P50 -29.8%; P60 -27.4%
SRJ19 +5.5 pp unchanged P50 -23.2%; P80 -36.5%
SRJ20 +2.5 pp +2.0 pp P50 -37.4%; P70 -30.8%
SRJ21 unchanged unchanged P50 -10.3%; P95 -9.3%
SRJ23 unchanged unchanged P50 -30.1%; P95 -4.5%

Region-cost guardrail

The paired-only audit avoids bias from main timeouts that never emitted tiny metrics. Across 492-493 directly comparable cases:

Tiny-hypergraph metric Change
Summed best max region cost +0.24%
Summed best total region cost +2.37%
Summed final max region occupancy -0.13%
Summed squared region occupancy -0.54%

This is comfortably inside the requested ~20% region-cost guardrail. Most paired cases are exact; selected portfolio cases account for the topology changes.

All 8 autorouter test shards, build, type-check, format-check, Vercel build, and the high-density-repair01 dependency's 14 tests/type-check/format-check are green. bugreport88 remained excluded from local trials because of its prior RAM behavior; no timeout was increased.

Comment on lines 47 to +313
@@ -144,3 +185,129 @@ test("Future-cost solver rejects vias that violate future via-to-trace clearance
const neighbors = solver.getNeighbors(currentNode as any)
expect(neighbors.some((neighbor) => neighbor.z !== currentNode.z)).toBe(false)
})

test("Future-cost solver computes combined node costs identically", () => {
const solver = new SingleHighDensityRouteSolver6_VertHorzLayer_FutureCost({
...baseOpts,
obstacleRoutes: [],
futureConnections: [
{
connectionName: "future-conn",
points: [
{ x: 2, y: 8, z: 0 },
{ x: 8, y: 2, z: 1 },
],
},
],
})
const parent = { x: 3, y: 4, z: 0, g: 2.5, h: 0, f: 0, parent: null }
for (const node of [
{ x: 3.5, y: 4.5, z: 0, g: 0, h: 0, f: 0, parent },
{ x: 3.5, y: 4.5, z: 1, g: 0, h: 0, f: 0, parent },
]) {
const expectedG = solver.computeG(node as any)
const expectedH = solver.computeH(node as any)

solver.setNodeCosts(node as any)

expect(node.g).toBe(expectedG)
expect(node.h).toBe(expectedH)
expect(node.f).toBe(solver.computeF(expectedG, expectedH))
}
})

test("Future-cost solver flattens points and caches immutable segments", () => {
const solver = new SingleHighDensityRouteSolver6_VertHorzLayer_FutureCost({
...baseOpts,
obstacleRoutes: [],
futureConnections: [
{
connectionName: "future-conn",
points: [
{ x: 2, y: 8, z: 0 },
{ x: 8, y: 2, z: 1 },
],
},
],
})
const node = { x: 7.9, y: 2.1, z: 1 } as any

expect(solver.futureConnectionPoints).toHaveLength(2)
expect(solver.getClosestFutureConnectionPoint(node)).toBe(
solver.futureConnectionPoints[1],
)
const segments = solver.getFutureConnectionSegments()
expect(solver.getFutureConnectionSegments()).toBe(segments)
})

test("SingleHighDensityRouteSolver numeric node keys are collision-free across its grid", () => {
const solver = new SingleHighDensityRouteSolver({
...baseOpts,
bounds: { minX: -1, maxX: 1, minY: -1, maxY: 1 },
A: { x: -1, y: -0.8, z: 0 },
B: { x: -1, y: 0.8, z: 0 },
obstacleRoutes: [],
availableZ: [0, 2, 5],
captureSearchDebug: false,
})
const minXIndex = Math.round(solver.bounds.minX / solver.cellStep)
const maxXIndex = Math.round(solver.bounds.maxX / solver.cellStep)
const minYIndex = Math.round(solver.bounds.minY / solver.cellStep)
const maxYIndex = Math.round(solver.bounds.maxY / solver.cellStep)
const keys = new Set<number>()

for (const z of solver.availableZ) {
for (let xIndex = minXIndex; xIndex <= maxXIndex; xIndex++) {
for (let yIndex = minYIndex; yIndex <= maxYIndex; yIndex++) {
const key = solver.getNodeKey({
x: xIndex * solver.cellStep,
y: yIndex * solver.cellStep,
z,
} as any)
expect(keys.has(key)).toBe(false)
keys.add(key)
}
}
}
})

test("SingleHighDensityRouteSolver can skip search visualization history", () => {
const createSolver = (captureSearchDebug?: boolean) =>
new SingleHighDensityRouteSolver({
...baseOpts,
A: { x: 0, y: 1, z: 0 },
B: { x: 0, y: 9, z: 0 },
obstacleRoutes: [],
captureSearchDebug,
})

const headlessSolver = createSolver(false)
headlessSolver.step()
expect(headlessSolver.debug_exploredNodesOrdered).toHaveLength(0)

const debugSolver = createSolver()
debugSolver.step()
expect(debugSolver.debug_exploredNodesOrdered.length).toBeGreaterThan(0)
expect(Number.isNaN(debugSolver.progress)).toBe(true)
})

test("SingleHighDensityRouteSolver caches immutable via ancestry", () => {
const solver = new SingleHighDensityRouteSolver({
...baseOpts,
A: { x: 0, y: 1, z: 0 },
B: { x: 0, y: 9, z: 0 },
obstacleRoutes: [],
captureSearchDebug: false,
})
const root = { x: 0, y: 1, z: 0, parent: null }
const firstVia = { x: 0, y: 1, z: 1, parent: root }
const sameLayer = { x: 0.2, y: 1, z: 1, parent: firstVia }
const secondVia = { x: 0.2, y: 1, z: 0, parent: sameLayer }

const firstResult = solver.getViasInNodePath(secondVia as any)
expect(firstResult).toEqual([
{ x: 0.2, y: 1 },
{ x: 0, y: 1 },
])
expect(solver.getViasInNodePath(secondVia as any)).toBe(firstResult)
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test file now contains more than one test(...) call. The rule states that a *.test.ts file may have AT MOST one test(...), and after that the tests should be split into multiple numbered files (e.g., single-high-density-route-solver1.test.ts, single-high-density-route-solver2.test.ts, etc.). The file already had tests before this PR, and this diff adds several more (lines 47, 189, 219, 243, 274, 294), making the total well above one. These new tests should be extracted into separate numbered test files.

Spotted by Graphite (based on custom rule: Custom rule)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Comment on lines +17 to +43
test("SingleRouteCandidatePriorityQueue preserves ascending priority", () => {
const priorities = [8, 3, 5, 1, 9, 2, 7, 4, 6, 0]
const queue = new SingleRouteCandidatePriorityQueue(
priorities.map(createNode),
)
const dequeued: number[] = []

while (queue.peek()) {
dequeued.push(queue.dequeue()!.f)
}

expect(dequeued).toEqual([...priorities].sort((a, b) => a - b))
expect(queue.dequeue()).toBeNull()
})

test("SingleRouteCandidatePriorityQueue handles equal and single priorities", () => {
const queue = new SingleRouteCandidatePriorityQueue([
createNode(2),
createNode(2),
createNode(2),
])

expect(queue.dequeue()?.f).toBe(2)
expect(queue.dequeue()?.f).toBe(2)
expect(queue.dequeue()?.f).toBe(2)
expect(queue.dequeue()).toBeNull()
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new test file contains two test(...) calls (lines 17 and 32). The rule states that a *.test.ts file may have AT MOST one test(...). The second test should be moved to a separate numbered file, e.g., single-route-candidate-priority-queue1.test.ts and single-route-candidate-priority-queue2.test.ts.

Suggested change
test("SingleRouteCandidatePriorityQueue preserves ascending priority", () => {
const priorities = [8, 3, 5, 1, 9, 2, 7, 4, 6, 0]
const queue = new SingleRouteCandidatePriorityQueue(
priorities.map(createNode),
)
const dequeued: number[] = []
while (queue.peek()) {
dequeued.push(queue.dequeue()!.f)
}
expect(dequeued).toEqual([...priorities].sort((a, b) => a - b))
expect(queue.dequeue()).toBeNull()
})
test("SingleRouteCandidatePriorityQueue handles equal and single priorities", () => {
const queue = new SingleRouteCandidatePriorityQueue([
createNode(2),
createNode(2),
createNode(2),
])
expect(queue.dequeue()?.f).toBe(2)
expect(queue.dequeue()?.f).toBe(2)
expect(queue.dequeue()?.f).toBe(2)
expect(queue.dequeue()).toBeNull()
})
test("SingleRouteCandidatePriorityQueue preserves ascending priority", () => {
const priorities = [8, 3, 5, 1, 9, 2, 7, 4, 6, 0]
const queue = new SingleRouteCandidatePriorityQueue(
priorities.map(createNode),
)
const dequeued: number[] = []
while (queue.peek()) {
dequeued.push(queue.dequeue()!.f)
}
expect(dequeued).toEqual([...priorities].sort((a, b) => a - b))
expect(queue.dequeue()).toBeNull()
})

Spotted by Graphite (based on custom rule: Custom rule)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@seveibar
seveibar merged commit c2d9d13 into main Aug 13, 2026
25 checks passed
@seveibar
seveibar deleted the agent/balanced-tiny-hypergraph-routing branch August 13, 2026 20:53
@tscircuitbot

Copy link
Copy Markdown
Contributor

Thank you for your contribution! 🎉

PR Rating: ⭐⭐⭐
Impact: Major

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


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.

2 participants