Skip to content

Return complete Pipeline9 hypergraph approximations at the iteration limit - #2406

Closed
AnasSarkiz wants to merge 4 commits into
mainfrom
fix/pipeline9-complete-hypergraph-approximation
Closed

Return complete Pipeline9 hypergraph approximations at the iteration limit#2406
AnasSarkiz wants to merge 4 commits into
mainfrom
fix/pipeline9-complete-hypergraph-approximation

Conversation

@AnasSarkiz

@AnasSarkiz AnasSarkiz commented Sep 5, 2026

Copy link
Copy Markdown
Member

Superseded by #2494, which uses the existing routing and timeout-acceptance flow with a smaller change.

The pedometer reproduction from #2385 exhausts tiny-hypergraph's iteration budget without retaining a complete routing graph. Its 230 connections also exceed the existing 180-connection limit for the crossing-point allocation prepass.

Keep the normal graph search and its existing best-solution acceptance. When selective routing without preloaded copper exhausts its iteration budget without a complete candidate, use the complete-seed option from tscircuit/tiny-hypergraph#175 to construct short independent paths with distinct crossing points. Return that complete graph through the normal timeout-acceptance mechanism. Record this final approximation and the preceding refinement iteration count in solver stats.

Generated assignments remain ordinary rerippable routes; caller-owned preloaded copper retains the stable-assignment solver. Pipeline9 explicitly opts into final approximation; legacy Pipeline7 behavior is preserved. Structural errors continue to surface. The debugger and sample runner default to Pipeline9.

Regression and snapshot

Add a Pipeline9 regression using the existing pedometer fixture with caching disabled. It forces a one-iteration graph budget and checks all 230 returned routes, every assigned port's net ownership, reserved-region ownership, and the ability to reopen the generated seed for refinement. Commit an SVG snapshot of the actual returned graph, rendered on white and visually inspected.

Dependency and scope

Pin tiny-hypergraph to ad607292ad6cb90a48947a7badd68bbedcde152e. Merge tscircuit/tiny-hypergraph#175 (stacked on tscircuit/tiny-hypergraph#167) before this consumer PR.

This change covers the hypergraph stage. The independent-path pass has its own per-route budget; this does not assert that downstream high-density routing or DRC is solved.

Validation

  • 20 focused tests pass: the pedometer snapshot, Pipeline9 sample-runner default, existing Pipeline7 snapshots/DRC, Pipeline9 legal-layer routing, preloaded-trace integration, terminal ownership, error propagation with approximation enabled, candidate selection, and exact-DRC regressions.
  • TypeScript checking and the production build pass.
  • The committed pedometer snapshot matches on a normal test run.
  • The real effort-0.01 reproduction completes the graph stage after 20,000 refinement iterations, returning all 230 routes and 1,636 segments.
  • Existing routing assertions and unrelated snapshots are unchanged.

Hypergraph snapshot

Pedometer graph returned at the iteration limit

@vercel

vercel Bot commented Sep 5, 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 5, 2026 2:29pm 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 AnasSarkiz changed the title Retain complete Pipeline9 hypergraph approximations at the iteration limit Return complete Pipeline9 hypergraph approximations at the iteration limit Sep 5, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

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

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

This PR was closed because it has been inactive for 1 day since being marked as stale.

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.

2 participants