OrthoRoute: A GPU-accelerated PCB autorouter for KiCad
OrthoRoute: A GPU-accelerated PCB autorouter for KiCad
OrthoRoute - GPU Accelerated Autorouting for KiCad
OrthoRoute is a GPU-accelerated PCB autorouter designed specifically for a narrow class of extremely large, dense, highly regular multilayer backplanes and BGA escape patterns. It uses a Manhattan lattice and the PathFinder algorithm to route designs with thousands of nets. It is not a general-purpose PCB autorouter.
Orthogonal! Non-trivial! Runs on GPUs! I live in San Francisco!
Never trust the autorouter, but at least this one is fast.
[!CAUTION] OrthoRoute is not a general-purpose PCB autorouter.
OrthoRoute is designed for a narrow class of extremely large, dense, highly regular multilayer backplanes and BGA escape patterns. It is useful to about five people on the planet, and you probably aren't one of them. For a conventional PCB, use something else.
In PCBWorld: A Benchmark Environment for Engine-Grounded PCB Design Automation, Song et al. benchmarked OrthoRoute against Freerouting, KiCadRoutingTools, and several learned routing agents on synthetic and open-source PCB datasets.[^pcbworld]
- On the synthetic D2 dataset, OrthoRoute achieved a 1% clean-pass rate and 30% routability.
- On D3-A, a set of 99 open-source boards, it achieved a 2% clean-pass rate and 51% routability.
- Freerouting and KiCadRoutingTools performed dramatically better on both datasets.
The benchmark used small, ordinary boards and OrthoRoute's upstream defaults; it did not test OrthoRoute's intended thousands-net backplane workload. It nevertheless demonstrates that OrthoRoute is a terrible default choice for ordinary PCB autorouting.
[^pcbworld]: Hyungseok Song et al., “PCBWorld: A Benchmark Environment for Engine-Grounded PCB Design Automation,” arXiv preprint arXiv:2607.05915, 2026, Table 3 and Appendix K.5.
A much more comprehensive explanation of the WHY and HOW of this repository is available on the build log for this project.
OrthoRoute Overview
Algorithm Demonstration
PathFinder Net Tour
OrthoRoute is a KiCad autorouter for exceptionally large or very complex backplane designs and BGA escape patterns. The simplified idea behind this algorithm is, "put all your parts on the top layer, and on layers below that, create a grid of traces. Only horizontal traces on layer 1, only vertical traces on layer 2, and continue like that for all the other layers. Route through this 'Manhattan grid' of traces with blind and buried vias".
The algorithm used for this autorouter is PathFinder: a negotiation-based performance-driven router for FPGAs. My implementation of PathFinder treats the PCB as a graph: nodes are intersections on an x–y grid where vias can go, and edges are the segments between intersections where copper traces can run. Each edge and node is treated as a shared resource.
PathFinder is iterative. In the first iteration, all nets (airwires) are routed greedily, without accounting for overuse of nodes or edges. Subsequent iterations account for congestion, increasing the “cost” of overused edges and ripping up the worst offenders to re-route them. Over time, the algorithm converges to a PCB layout where no edge or node is over-subscribed by multiple nets.
With this architecture -- the PathFinder algorithm on a very large graph, within the same order of magnitude of the largest FPGAs -- it makes sense to run the algorithm with GPU acceleration. There are a few factors that went into this decision:
Note this is not a fully parallel autorouter; in OrthoRoute, nets are still routed in sequence on a shared congestion map. The parallelism lives inside the shortest-path search: a CUDA SSSP (“parallel Dijkstra”) kernel makes each individual net’s pathfinding fast, but it doesn’t route many nets simultaneously.
OrthoRoute-1.0.0-KiCad-PCM.zip,
or build it from source using the instructions below.Clone the repository and run the package builder:
git clone https://github.com/bbenchoff/OrthoRoute.git
cd OrthoRoute
python build.py
The builder creates:
build/OrthoRoute-1.0.0-KiCad-PCM.zip for KiCad 10's
Install from File... commandbuild/OrthoRoute-1.0.0-KiCad-IPC.zip for manual native-plugin installationDevelopers can build and deploy directly into their newest local KiCad installation:
python build.py --deploy
Use python build.py --deploy --kicad-version 10.0 to target KiCad 10
explicitly. Standalone development remains available with python main.py.
As long as you have an NVIDIA card or Apple Silicon, yeah, probably. If it doesn't run on your card/computer, open a new issue.
Important distinction:
If you get "Out of Memory" errors: Rent a GPU with more VRAM or use --cpu-only mode (slower but no memory limit).
# Built-in acceptance test (synthetic board routing)
python main.py --test-manhattan
# Run regression tests
pytest tests/ # All tests (unit + regression)
pytest tests/regression/test_backplane.py -v # Full regression suite (63 tests)
pytest tests/unit/ -v # Unit tests only (167 tests)
Note: CLI mode (python main.py cli board.kicad_pcb) is designed for development/debugging and requires KiCad to be running with the board open in PCB Editor.
Headless mode is designed for instances when you would like to route a board, but it won't fit in your GPU. This mode is actually several functions that allow for running a routing algorithm without KiCad.
The workflow is three steps. First, export the PCB from the OrthoRoute plugin
File -> Export PCB... from the top menu.ORP extension) to diskSecond, run OrthoRoute using the saved .ORP file:
python main.py headless .ORP
Optional parameters:
python main.py headless .ORP --max-iterations 200 # Set max iterations (default: 200)
python main.py headless .ORP -o custom.ORS # Specify output filename
python main.py headless .ORP --use-gpu # Force GPU mode
python main.py headless .ORP --cpu-only # Force CPU-only mode
Third, import the routing solution back into KiCad:
File -> Import Solution... (or press Ctrl+I).ORS fileTypical use case: Cloud GPU routing
Upload your .ORP file to a cloud GPU instance (Vast.ai, RunPod, etc.), run the routing there, then download the .ORS file back to your local machine for import. This allows routing large boards on powerful GPUs with more memory. Details on the file format are available in the docs
By default OrthoRoute runs in normal mode — minimal log output, no iteration screenshots:
| Behaviour | Normal mode (default) | Debug mode (ORTHO_DEBUG=1) |
|---|---|---|
| Log file level | WARNING only (~66 milestone lines/run) |
DEBUG (full detail) |
| Iteration screenshots | Disabled | Saved to debug_output/ at 8× resolution |
| Screenshot frequency | — | Every N iterations (ORTHO_SCREENSHOT_FREQ) |
| Screenshot scale | — | 8× default (ORTHO_SCREENSHOT_SCALE) |
Enable debug mode before launching KiCad (PowerShell):
$env:ORTHO_DEBUG = '1'
start kicad # or however you launch KiCad
Fine-tune screenshot output:
$env:ORTHO_DEBUG = '1' # master switch
$env:ORTHO_SCREENSHOT_FREQ = '5' # screenshot every 5 iterations
$env:ORTHO_SCREENSHOT_SCALE = '4' # 4× resolution instead of 8×
Disable again:
Remove-Item Env:ORTHO_DEBUG
Log files are always written to /logs/ regardless of mode.
Please see docs/contributing.md for guidelines.
If something's not working or you just don't like it, first please complain. Complaining about free stuff will actually force me to fix it. I would especially like to hear from you if you think it sucks.
This project is licensed under the MIT License - see the LICENSE file for details.
KiCad development team for the excellent IPC API
NVIDIA for CUDA/CuPy GPU acceleration support
The open-source PCB design community
Issues: GitHub Issues
Discussions: GitHub Discussions
Documentation: Project Wiki
No open issues yet, or sync has not completed.