Skip to content

Add isolated post-solve unravel region optimizer - #169

Draft
seveibar wants to merge 1 commit into
mainfrom
agent/post-solve-unravel-isolated
Draft

Add isolated post-solve unravel region optimizer#169
seveibar wants to merge 1 commit into
mainfrom
agent/post-solve-unravel-isolated

Conversation

@seveibar

Copy link
Copy Markdown
Contributor

Summary

  • add UnravelTinyHyperGraphSolver, a post-solve optimizer that untwists boundary assignments and reroutes/ejects routes while monotonically improving the solved graph's existing region-cost objective
  • run the optimizer as the final stage of the core TinyHyperGraphSectionPipelineSolver
  • add exact whole-graph validation, layer/via and terminal-clearance safety checks, route-path reuse, and focused unit coverage
  • report P50/P95 before/after costs from the immediate pre-unravel stage so the benchmark attributes only the new step

This supersedes #166 for review. Unlike that reference PR, this branch is based directly on main and contains no region-cost-model, trace-density, Poly/Pipeline9, geometric-connectivity, or simpleRouteJson changes.

Isolated benchmark

./benchmark.sh on all eight committed SRJ18 Pipeline7 cases, comparing optimizeSection directly to optimizeRegionCosts:

Metric Before After Reduction
P50 max region cost 1.440 0.541 62.4%
P95 max region cost 3.464 1.496 56.8%
  • solved-route completion: 100%
  • cases improved: 8/8
  • average optimizer time: 3.281s

Validation

  • bun test — 135 pass, 0 fail
  • bun run typecheck
  • bun run format:check — pass (existing oversized-fixture warning only)
  • git diff --check

@vercel

vercel Bot commented Aug 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
tiny-hypergraph Ready Ready Preview Aug 15, 2026 7:03pm

Request Review

@tscircuitbot

Copy link
Copy Markdown

Benchmark This PR

Run benchmarks by commenting on this PR:

/benchmark [benchmark.sh args...]
/benchmark --dataset <hg07|srj18> --limit <n> --solver <core|poly> --families <default|default+deep|all> --concurrency <n|auto>

Everything after /benchmark is forwarded directly to ./benchmark.sh.
Every command runs current main and the PR head sequentially on the same Blacksmith machine, then reports their results side by side.

Examples:

  • /benchmark -> all committed completed SRJ18 Pipeline7 cases, core solver
  • /benchmark --limit 4 -> first four committed Pipeline7 cases
  • /benchmark --dataset srj18 --concurrency auto -> srj18 samples with runner CPU-count concurrency
  • /benchmark --sample sample003 -> one committed SRJ18 Pipeline7 case
  • /benchmark --dataset hg07 --limit 20 --solver poly -> first 20 hg07 samples with the poly solver
  • /benchmark --dataset hg07 --limit 40 --families default+deep -> first 40 hg07 samples with deeper candidate families

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

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