Skip to content

Add Pipeline3 HG failure analyzer and relax via-limit to reduce circuit100 failures#654

Closed
0hmX wants to merge 1 commit intomainfrom
codex/analyze-failing-node-in-dataset-01
Closed

Add Pipeline3 HG failure analyzer and relax via-limit to reduce circuit100 failures#654
0hmX wants to merge 1 commit intomainfrom
codex/analyze-failing-node-in-dataset-01

Conversation

@0hmX
Copy link
Copy Markdown
Contributor

@0hmX 0hmX commented Mar 12, 2026

Motivation

  • Provide a quick way to inspect failing nodes for dataset circuit100 (dataset01) and compute per-node failure probability to guide fixes.
  • circuit100 was failing in the Pipeline3 HG high-density phase due to node-level solver exhaustion and a hard ViaPossibilitiesSolver2 via cap.
  • Allow targeted tuning (search budget and via allowances) to reduce these failures without broad algorithmic changes.

Description

  • Add scripts/analyze-pipeline3hg-failure.ts which runs a scenario (default circuit100), reports failed HighDensity nodes, crossing counts, an estimated per-node probability-of-failure via calculateNodeProbabilityOfFailure, and a suggested remediation plan.
  • Expose the script via the npm script analyze:pipeline3hg in package.json so it can be run with bun run analyze:pipeline3hg circuit100.
  • Forward pipeline effort into HighDensitySolver by adding effort: cms.effort to the Pipeline3 highDensityRouteSolver constructor params so pipeline-level effort tuning affects high-density budgets.
  • Make ViaPossibilitiesSolver2 accept an optional hyperparameter MAX_VIA_COUNT (default remains 5) so callers can relax the via cap when needed.
  • Update MultiHeadPolyLineIntraNodeSolver3 to seed ViaPossibilitiesSolver2 with an adaptive MAX_VIA_COUNT based on node complexity (Math.max(5, this.minViaCount * 3, Math.ceil(this.uniqueConnections * 2))) to reduce via-limit failures for complex nodes.

Testing

  • Ran bun run analyze:pipeline3hg circuit100 to profile the scenario: before changes the run reported 2 failing nodes (cmn_30, cmn_4) and after the adaptive via-limit change the script reported 1 failing node (cmn_4), indicating reduced via-limit related failures. (script executed successfully).
  • Ran bun test tests/pipeline-immutability/autorouting-pipeline3-hg-port-point-pathing.test.ts which passed.
  • Ran code formatting via biome format --write on the modified files (format succeeded).

Codex Task

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 12, 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 12, 2026 1:46pm

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
Copy link
Copy Markdown
Contributor Author

0hmX commented Mar 12, 2026

/benchmark

@tscircuitbot
Copy link
Copy Markdown

tscircuitbot commented Mar 12, 2026

🏃 Autorouting Benchmark Results

📊 PR Results
Benchmark Results (1x effort)

+---------------------------+----------------+--------------------+-----------+----------+----------+
| Solver                    | Completed %    | Relaxed DRC Pass % | Timed Out | P50 Time | P95 Time |
+---------------------------+----------------+--------------------+-----------+----------+----------+
| AutoroutingPipelineSolver | 83.8% (🕒6.7%) | 1.9% (🕒6.7%)      | 7/105     | 6.4s     | 61.4s    |
+---------------------------+----------------+--------------------+-----------+----------+----------+

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

+---------------------------+----------------+--------------------+-----------+----------+----------+
| Solver                    | Completed %    | Relaxed DRC Pass % | Timed Out | P50 Time | P95 Time |
+---------------------------+----------------+--------------------+-----------+----------+----------+
| AutoroutingPipelineSolver | 82.9% (🕒3.8%) | 1.9% (🕒3.8%)      | 4/105     | 6.1s     | 62.9s    |
+---------------------------+----------------+--------------------+-----------+----------+----------+

Scenarios: 105

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

@0hmX
Copy link
Copy Markdown
Contributor Author

0hmX commented Mar 13, 2026

/benchmark

@tscircuitbot
Copy link
Copy Markdown

tscircuitbot commented Mar 13, 2026

🏃 Autorouting Benchmark Results

📊 PR Results
Benchmark Results (1x effort)

+---------------------------+----------------+--------------------+-----------+----------+----------+
| Solver                    | Completed %    | Relaxed DRC Pass % | Timed Out | P50 Time | P95 Time |
+---------------------------+----------------+--------------------+-----------+----------+----------+
| AutoroutingPipelineSolver | 83.8% (🕒6.7%) | 1.9% (🕒6.7%)      | 7/105     | 6.4s     | 60.6s    |
+---------------------------+----------------+--------------------+-----------+----------+----------+

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

+---------------------------+----------------+--------------------+-----------+----------+----------+
| Solver                    | Completed %    | Relaxed DRC Pass % | Timed Out | P50 Time | P95 Time |
+---------------------------+----------------+--------------------+-----------+----------+----------+
| AutoroutingPipelineSolver | 83.8% (🕒2.9%) | 1.9% (🕒2.9%)      | 3/105     | 6.9s     | 61.5s    |
+---------------------------+----------------+--------------------+-----------+----------+----------+

Scenarios: 105

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

@github-actions
Copy link
Copy Markdown

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

@github-actions
Copy link
Copy Markdown

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants