Skip to content

Tune getTunedTotalCapacity1 using via-size ratio and add regression tests (total 9.5% improvement)#642

Merged
0hmX merged 5 commits intomainfrom
codex/improve-tests-for-gettunedtotalcapacity1
Mar 10, 2026
Merged

Tune getTunedTotalCapacity1 using via-size ratio and add regression tests (total 9.5% improvement)#642
0hmX merged 5 commits intomainfrom
codex/improve-tests-for-gettunedtotalcapacity1

Conversation

@0hmX
Copy link
Copy Markdown
Contributor

@0hmX 0hmX commented Mar 10, 2026

Motivation

Description

  • Extend getTunedTotalCapacity1 signature to accept an optional height and compute minSide so capacity reflects rectangular shapes.
  • Introduce a narrowSideViaRatio and clamped viaRatioFactor to scale the effective node span by how many vias fit across the limiting dimension before computing viaLengthAcross.
  • Add two regression tests in tests/auto-capacity-depth.test.ts to assert that thin rectangles yield lower capacity and that viaDiameter reduces capacity.

Testing

  • Ran unit tests with bun test tests/auto-capacity-depth.test.ts, which passed all 4 added/affected tests.
  • Ran sampled high-density benchmark experiments via the existing runBenchmarkWithWorkers path on the first 1200 cases to compare the PR-637 height-aware baseline against this tuned variant, yielding: baseline MSE 0.047537988117760326 (pass 1147/1200) and tuned MSE 0.04502167598365793 (pass 1147/1200).
  • All automated checks and the benchmark runs completed successfully.

Codex Task

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 10, 2026

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

Project Deployment Actions Updated (UTC)
capacity-node-autorouter Ready Ready Preview, Comment Mar 10, 2026 6:08pm

Request Review

@tscircuitbot
Copy link
Copy Markdown

🏃 Benchmark This PR

Run benchmarks by commenting on this PR:

/benchmark [solver-name|all] [scenario-limit] --concurrency <n> --effort <n>

Examples:

  • /benchmark -> AutoroutingPipelineSolver, all scenarios (default concurrency uses the benchmark runner CPU count)
  • /benchmark AutoroutingPipelineSolver -> one solver, all scenarios
  • /benchmark all 20 -> all solvers, first 20 scenarios
  • /benchmark AutoroutingPipelineSolver 20 --concurrency 8 -> one solver, 20 scenarios, 8 workers
  • /benchmark AutoroutingPipelineSolver 20 --effort 2 -> one solver, 20 scenarios, 2x effort

Any PR whose title contains [BENCHMARK TEST] will automatically run the benchmark workflow on PR updates.

@0hmX 0hmX changed the title Tune getTunedTotalCapacity1 using via-size ratio and add regression tests Tune getTunedTotalCapacity1 using via-size ratio and add regression tests (total 9.5% improvement) Mar 10, 2026
@0hmX
Copy link
Copy Markdown
Contributor Author

0hmX commented Mar 10, 2026

/benchmark

@tscircuitbot
Copy link
Copy Markdown

tscircuitbot commented Mar 10, 2026

🏃 Autorouting Benchmark Results

📊 PR Results
Benchmark Results (1x effort)

+---------------------------+----------------+--------------------+-----------+----------+----------+
| Solver                    | Completed %    | Relaxed DRC Pass % | Timed Out | P50 Time | P95 Time |
+---------------------------+----------------+--------------------+-----------+----------+----------+
| AutoroutingPipelineSolver | 82.9% (🕒4.8%) | 1.9% (🕒4.8%)      | 5/105     | 6.6s     | 62.2s    |
+---------------------------+----------------+--------------------+-----------+----------+----------+

Scenarios: 105
📊 Main Branch Results
Benchmark Results (1x effort)

+---------------------------+-----------------+--------------------+-----------+----------+----------+
| Solver                    | Completed %     | Relaxed DRC Pass % | Timed Out | P50 Time | P95 Time |
+---------------------------+-----------------+--------------------+-----------+----------+----------+
| AutoroutingPipelineSolver | 77.1% (🕒10.5%) | 1.9% (🕒10.5%)     | 11/105    | 5.0s     | 73.0s    |
+---------------------------+-----------------+--------------------+-----------+----------+----------+

Scenarios: 105

📦 Artifact: https://github.com/tscircuit/tscircuit-autorouter/actions/runs/22907289006

@0hmX 0hmX merged commit ead573a into main Mar 10, 2026
13 checks passed
@0hmX 0hmX deleted the codex/improve-tests-for-gettunedtotalcapacity1 branch March 10, 2026 18:10
@0hmX
Copy link
Copy Markdown
Contributor Author

0hmX commented Mar 10, 2026

/benchmark

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@tscircuitbot
Copy link
Copy Markdown


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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants