@tscircuit/fanout-solver 0.0.51 → 0.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -44
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ and treats each bus-layer decision atomically.
|
|
|
16
16
|
- Detects rectangular pad footprints through obstacle `componentId` metadata,
|
|
17
17
|
including perimeter packages and two-pad passives.
|
|
18
18
|
- Handles multiple mixed footprints inside one shared breakout boundary.
|
|
19
|
-
- Routes perimeter and inner-matrix pads
|
|
19
|
+
- Routes perimeter and inner-matrix pads.
|
|
20
20
|
- Uses `sharedBoundary` as the common exit rectangle. Without one, it infers a
|
|
21
21
|
shared rectangle around the source footprints selected for the buses, without
|
|
22
22
|
expanding that boundary to include destination footprints.
|
|
@@ -280,53 +280,66 @@ parameters. Each sample has one shared boundary around all of its footprints,
|
|
|
280
280
|
and component bounds come from the exact footprinter-generated copper pad
|
|
281
281
|
extents.
|
|
282
282
|
|
|
283
|
-
##
|
|
283
|
+
## Dataset 31 benchmark
|
|
284
284
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
alone cannot count as a solved BGA pin. Remaining edge signals are grouped by
|
|
292
|
-
direction. Every adapted problem uses the same six-layer stackup (`top`,
|
|
293
|
-
`inner1` through `inner4`, and `bottom`) so benchmark improvements are directly
|
|
294
|
-
comparable.
|
|
295
|
-
|
|
296
|
-
Run the full benchmark with:
|
|
285
|
+
Run `./benchmark.sh` (or `bun run benchmark`) to benchmark **only the 12 AM62L
|
|
286
|
+
directional cases** from
|
|
287
|
+
[`tscircuit/dataset-fanout31-am62l`](https://github.com/tscircuit/dataset-fanout31-am62l).
|
|
288
|
+
The upstream revision is pinned in `scripts/generate-repro/package.json` and
|
|
289
|
+
recorded in every report. Other datasets remain available for regression tests
|
|
290
|
+
and the debugger, but have no benchmark commands or workflows.
|
|
297
291
|
|
|
298
292
|
```sh
|
|
299
293
|
./benchmark.sh
|
|
294
|
+
./benchmark.sh --list
|
|
295
|
+
./benchmark.sh --sample 11-left-center
|
|
296
|
+
./benchmark.sh --concurrency 8 --sample-timeout-seconds 300
|
|
300
297
|
```
|
|
301
298
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
299
|
+
Before timing the solver, the benchmark renders the selected upstream TSX/core
|
|
300
|
+
circuits and captures their exact fanout-solver constructor inputs into
|
|
301
|
+
`benchmark-results/inputs/<sample-id>.json`. Each case retains all 135 AM62L
|
|
302
|
+
connections, 573 pad obstacles, nine DDR buses, 102 plane drops, and the original
|
|
303
|
+
clearance, differential-pair, and length-skew constraints. The timed workers run
|
|
304
|
+
**this checkout's solver**, not the upstream package's released solver.
|
|
305
|
+
To capture the inputs without solving, use `bun run generate:dataset31`.
|
|
306
|
+
The optional `--dataset dataset31` flag is accepted for explicit CI invocation;
|
|
307
|
+
other dataset selections are rejected.
|
|
308
|
+
|
|
309
|
+
Each sample runs in an isolated process, with up to four concurrent processes
|
|
310
|
+
locally and a **120-second hard timeout** by default. A synchronous solver hang,
|
|
311
|
+
exception, or unsolved case does not prevent later samples from running.
|
|
312
|
+
Assignment budgets and circuit constraints remain at each sample's defaults;
|
|
313
|
+
`--max-layer-combinations` explicitly overrides only the search budget.
|
|
314
|
+
|
|
315
|
+
The ordered `benchmark-results/benchmark.json` and `benchmark.md` reports contain
|
|
316
|
+
the solver commit, dataset revision, configuration, solve totals, every sample's
|
|
317
|
+
status and timing, and partial routing/validation counts. Reports are saved after
|
|
318
|
+
every completed sample, including the total selected count to identify incomplete runs.
|
|
319
|
+
Timed-out workers do not retain their in-flight routing counts.
|
|
320
|
+
Compare reports with the same budgets to track progress. Solved means validated
|
|
321
|
+
AM62L fanout, not RAM fanout or downstream inter-chip routing. Partial, error,
|
|
322
|
+
and timeout rows are benchmark results (exit 0); invalid CLI arguments or report
|
|
323
|
+
I/O failures are command failures (nonzero exit).
|
|
324
|
+
|
|
325
|
+
### PR comment trigger
|
|
326
|
+
|
|
327
|
+
Once `.github/workflows/benchmark.yml` is on the default branch, a repository
|
|
328
|
+
writer can comment **`/benchmark`** on an open PR. The workflow captures that
|
|
329
|
+
PR's exact head SHA, runs all 12 dataset 31 samples on a **32-vCPU Blacksmith ARM**
|
|
330
|
+
runner, then updates a status comment with solve totals, per-sample results,
|
|
331
|
+
and a link to the complete JSON/Markdown reports and captured inputs. The Actions
|
|
332
|
+
UI also supports a manual run, optionally supplying an open PR number. No custom
|
|
333
|
+
bot token is required.
|
|
334
|
+
|
|
335
|
+
The runner defaults to 32 processes and a 120-second per-sample deadline; set
|
|
336
|
+
repository variables `BENCHMARK_CONCURRENCY` and
|
|
337
|
+
`BENCHMARK_SAMPLE_TIMEOUT_SECONDS` to change these. PR code runs with a read-only
|
|
338
|
+
token and no persisted checkout credentials. A separate job uses the trusted
|
|
339
|
+
workflow revision to validate report data and post comments; it never executes
|
|
340
|
+
PR code. The trusted renderer rejects legacy or mixed-dataset reports, so PR
|
|
341
|
+
comments contain only dataset 31 results. Only exact commands from non-bot users
|
|
342
|
+
with current write, maintain, or admin access are accepted.
|
|
330
343
|
|
|
331
344
|
## Dataset 02
|
|
332
345
|
|
|
@@ -479,8 +492,8 @@ bun run render:dataset
|
|
|
479
492
|
bun run start
|
|
480
493
|
```
|
|
481
494
|
|
|
482
|
-
The benchmark runs
|
|
483
|
-
|
|
495
|
+
The benchmark runs only the 12 dataset 31 AM62L cases and reports solve counts,
|
|
496
|
+
validation, and timing. `bun run start` opens all regression
|
|
484
497
|
datasets in the standard tscircuit solver debugger. `bun run
|
|
485
498
|
render:dataset` writes `graphics-debug` PNGs under one subdirectory per dataset,
|
|
486
499
|
with a red shared boundary, gray component courtyards, and green fanout-exit
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/fanout-solver",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.53",
|
|
4
4
|
"description": "BGA fanout solver with coordinated bus-layer escapes for SimpleRouteJson",
|
|
5
5
|
"module": "lib/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"test": "bun test",
|
|
33
33
|
"benchmark": "bun benchmarks/run-benchmark.ts",
|
|
34
34
|
"generate:repro04": "bun scripts/generate-repro/generate-repro04.tsx",
|
|
35
|
-
"
|
|
35
|
+
"generate:dataset31": "bun scripts/generate-repro/generate-dataset31.tsx",
|
|
36
36
|
"render:dataset": "bun scripts/render-dataset-pngs.ts",
|
|
37
37
|
"format": "biome format --write .",
|
|
38
38
|
"format:check": "biome format ."
|