Skip to content

fix(gpu-router): dispatch-limit 2D grid + keep-best ripup rounds#669

Merged
ecto merged 2 commits into
mainfrom
fix/gpu-dispatch-fixes
Jul 24, 2026
Merged

fix(gpu-router): dispatch-limit 2D grid + keep-best ripup rounds#669
ecto merged 2 commits into
mainfrom
fix/gpu-dispatch-fixes

Conversation

@ecto

@ecto ecto commented Jul 24, 2026

Copy link
Copy Markdown
Owner

From the M6 reproducibility investigation:

GPU dispatch limit (the big one): relax_batch dispatched all workgroups in one dimension — full-board batches need ~129k against the 65535/dim cap, so the first dispatch poisoned the command encoder and every subsequent GPU batch silently fell back to CPU. Every published M6 run (including the 67-min one) ran with the GPU effectively dead after the opening dispatch. Fix: 2D dispatch grid, shader flattens via num_workgroups. 40-net subset flips from 'proposed 7/83' to 'proposed 83/83', zero validation errors, 1.000 routability. Hardware parity tests pass.

Keep-best rip-up rounds: the greedy pass's rip-up loop kept regressing rounds (504→489 placed over a 46-minute round on CM5). Now snapshots and restores on regression, same semantics as the negotiation loop.

Also adds a board_export example (gerbers/excellon/KiCad/BOM/pick-place from a routed .pcb.json).

Full-board CM5 measurement with both fixes is running; numbers to follow in a comment.

🤖 Generated with Claude Code

Two fixes from the M6 reproducibility investigation:

1. wavefront_batch dispatched (n*total)/256 workgroups in one dimension;
   full-board batches need ~129k against the 65535/dim wgpu cap, so the
   first dispatch poisoned the encoder and every subsequent GPU batch
   silently fell back to CPU (observed: 'proposed 7/83' on the 40-net
   subset, 72 dead batches per full CM5 run — every published M6 run was
   effectively CPU-bound). Split over a 2D grid; the shader flattens via
   num_workgroups. After: 'proposed 83/83', zero validation errors.

2. The greedy pass's rip-up loop kept regressing rounds (CM5: 504 -> 489
   placed over a 46-minute round, damage kept). Snapshot before each round
   and restore on regression, matching the negotiation loop's keep-best.

Plus a board_export example (gerbers/excellon/kicad/bom/pick-place from a
routed .pcb.json).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
vcad-mcp Building Building Preview, Comment Jul 24, 2026 10:39pm
3 Skipped Deployments
Project Deployment Actions Updated (UTC)
mecheval Ignored Ignored Jul 24, 2026 10:39pm
vcad Ignored Ignored Jul 24, 2026 10:39pm
vcad-docs Ignored Ignored Jul 24, 2026 10:39pm

Request Review

@chojiai

chojiai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Choji has used up today's reviews

Your team has reached the free plan's limit of 5 reviews per day, so Choji stepped aside on this pull request. That's a plan limit, not a reflection of the change itself.

Your free reviews reset tomorrow. To have Choji review every push without waiting, upgrade to Pro for unlimited reviews.

You're on the free plan · 5 reviews/day.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant