@tscircuit/fanout-solver 0.0.51 → 0.0.52

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.
Files changed (2) hide show
  1. package/README.md +50 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -280,6 +280,54 @@ 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
+ ## All-sample benchmark
284
+
285
+ Run `./benchmark.sh` (or `bun run benchmark`) to benchmark every available sample:
286
+ Datasets 01–08, SRJ19, and SRJ29, currently **421 samples**. New samples in these
287
+ catalogs are discovered automatically; no test-file allowlist is involved.
288
+
289
+ ```sh
290
+ ./benchmark.sh
291
+ ./benchmark.sh --list
292
+ ./benchmark.sh --dataset dataset08
293
+ ./benchmark.sh --dataset srj19,srj29 --sample sample001
294
+ ./benchmark.sh --concurrency 8 --sample-timeout-seconds 300
295
+ ```
296
+
297
+ Each sample runs in an isolated process, with up to four concurrent processes
298
+ locally and a **120-second hard timeout** by default. A synchronous solver hang,
299
+ exception, or unsolved case does not prevent later samples from running.
300
+ Assignment budgets and circuit constraints remain at each sample's defaults;
301
+ `--max-layer-combinations` explicitly overrides only the search budget.
302
+
303
+ The ordered `benchmark-results/benchmark.json` and `benchmark.md` reports contain
304
+ the commit, configuration, per-dataset solve totals, every sample's status and
305
+ timing, and partial routing/validation counts. Reports are saved after every
306
+ completed sample, including the total selected count to identify incomplete runs.
307
+ Timed-out workers do not retain their in-flight routing counts.
308
+ Compare reports with the same budgets to track progress. Solved means validated
309
+ fanout, not downstream inter-chip routing; SRJ29 additionally requires its
310
+ original-endpoint and emitted-copper DRC checks. Partial, error, and timeout rows
311
+ are benchmark results (exit 0); invalid CLI arguments or report I/O failures are
312
+ command failures (nonzero exit).
313
+
314
+ ### PR comment trigger
315
+
316
+ Once `.github/workflows/benchmark.yml` is on the default branch, a repository
317
+ writer can comment **`/benchmark`** on an open PR. The workflow captures that
318
+ PR's exact head SHA, runs all samples on a **32-vCPU Blacksmith ARM** runner,
319
+ then updates a status comment with solve totals, per-sample results, and a link
320
+ to the complete JSON/Markdown artifact. The Actions UI also supports a manual
321
+ run, optionally supplying an open PR number. No custom bot token is required.
322
+
323
+ The runner defaults to 32 processes and a 120-second per-sample deadline; set
324
+ repository variables `BENCHMARK_CONCURRENCY` and
325
+ `BENCHMARK_SAMPLE_TIMEOUT_SECONDS` to change these. PR code runs with a read-only
326
+ token and no persisted checkout credentials. A separate job uses the trusted
327
+ workflow revision to validate report data and post comments; it never executes
328
+ PR code. Only exact commands from non-bot users with current write, maintain, or
329
+ admin access are accepted.
330
+
283
331
  ## SRJ29 benchmark
284
332
 
285
333
  The repository loads all 200 samples from the derivative
@@ -293,10 +341,10 @@ direction. Every adapted problem uses the same six-layer stackup (`top`,
293
341
  `inner1` through `inner4`, and `bottom`) so benchmark improvements are directly
294
342
  comparable.
295
343
 
296
- Run the full benchmark with:
344
+ The dedicated legacy SRJ29 report remains available with:
297
345
 
298
346
  ```sh
299
- ./benchmark.sh
347
+ bun run benchmark:srj29
300
348
  ```
301
349
 
302
350
  Use `--sample sample001`, `--limit 10`, or
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/fanout-solver",
3
- "version": "0.0.51",
3
+ "version": "0.0.52",
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
- "benchmark:srj29": "./benchmark.sh",
35
+ "benchmark:srj29": "bun benchmarks/run-srj29-benchmark.ts",
36
36
  "render:dataset": "bun scripts/render-dataset-pngs.ts",
37
37
  "format": "biome format --write .",
38
38
  "format:check": "biome format ."