Skip to content

Avoid duplicate ports for routes on the same net - #142

Draft
ShiboSoftwareDev wants to merge 2 commits into
agent/repro-same-net-duplicate-port-overcountfrom
agent/fix-same-net-duplicate-port-overcount
Draft

Avoid duplicate ports for routes on the same net#142
ShiboSoftwareDev wants to merge 2 commits into
agent/repro-same-net-duplicate-port-overcountfrom
agent/fix-same-net-duplicate-port-overcount

Conversation

@ShiboSoftwareDev

@ShiboSoftwareDev ShiboSoftwareDev commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Problem

The duplicate-port prepass counts routes, but port ownership in the pathing solver is defined by electrical net. Several branches of one net can share a port, so counting each branch creates unnecessary ports and expands the search graph.

Fix

For each port, collect the distinct routeNet IDs seen by the independently solved routes. The number of physical lanes is then based on the number of distinct nets:

  • Two different nets still receive two lanes.
  • Two routes on the same net use one shared lane.
  • No new topology type, threshold, or dataset-specific rule is added.

Visualization

These are the same test and the same snapshot path on the reproduction and fix commits.

Before: route count creates 2 ports After: net count keeps 1 port
Before After

In each image, the upper frame is the one-port input and the lower frame is the real prepass output. Gray circles are topology ports; colored dashed lines are route endpoint hints. The fix removes only the unnecessary second gray center port.

Validation

All tests and snapshots run on GitHub Actions. The exact srj24 sample 4 benchmark is run on the stacked autorouter integration PR.

Stack

Stacked on #141.

@vercel

vercel Bot commented Aug 2, 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 2, 2026 12:00pm

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.
The result comment shows the matching dataset from the latest stored main-branch benchmark artifact beside the PR run; main is not rerun for each PR benchmark request.

Examples:

  • /benchmark -> hg07, all samples, core solver
  • /benchmark --dataset srj18 --limit 20 -> first 20 srj18 samples
  • /benchmark --dataset srj18 --concurrency auto -> srj18 samples with runner CPU-count concurrency
  • /benchmark --sample sample002 -> one hg07 sample
  • /benchmark --limit 20 --solver poly -> first 20 hg07 samples with the poly solver
  • /benchmark --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.

@ShiboSoftwareDev
ShiboSoftwareDev force-pushed the agent/repro-same-net-duplicate-port-overcount branch 2 times, most recently from 4dc738e to 2441693 Compare August 2, 2026 11:52
@ShiboSoftwareDev
ShiboSoftwareDev force-pushed the agent/fix-same-net-duplicate-port-overcount branch from 1483408 to 430272e Compare August 2, 2026 11:52
@ShiboSoftwareDev
ShiboSoftwareDev force-pushed the agent/fix-same-net-duplicate-port-overcount branch from 430272e to 11fbe23 Compare August 2, 2026 11:54
@ShiboSoftwareDev
ShiboSoftwareDev force-pushed the agent/repro-same-net-duplicate-port-overcount branch from 2441693 to 76cb184 Compare August 2, 2026 11:55
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