wai-quantum 0.4.3: metered runs, placement by a run's energy, and a fabric that falls back #226
Loading…
Reference in a new issue
No description provided.
Delete branch "wai-quantum-fabric-energy"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The fabric now has several members that give the same bits: the CPU reference, and the WebGPU member's per-gate and tile implementations. What it lacked was a way to choose between them by what a run costs, and a way to run a circuit that survives one member refusing it. This adds both without estimating anything. An energy figure is a labelled measurement or it is absent.
What
Run meters (
quantum_fabric::RunMeter, member-neutral, no new dependency)startjust before a run's first submission,stopafter its last readback.The WebGPU member, metered
simulate_meteredandmember_metered, withblockingwrappers.detailstates what it holds.Placement figures only from metered calibrations
EnergyCalibrationturns metered runs into aKernelEntry::energyfigure: nanojoules per pair-update, rounded up, with the runs' class and the uncertainty the rounding adds.detect_local_meteredgives the CPU reference its figures.Placement for a run
place_forpicks the least predicted energy when every candidate has a prediction, so a small circuit stays on the CPU and a wide one goes to the GPU.placeis unchanged.place_forandFabricread figures on only some candidates as figures on none. A calibration that earns a figure on one member alone cannot place that member first whatever it costs.The
FabricwrapperTooWide,OutOfRange,Memory,TimeoutorDevice. It stops at once on an invalid circuit or a defect.Runnerstates the member it is. A member paired with a runner of another id is refused before anything runs, so a receipt cannot name a member that did not do the work.ready(future)drivesFabric::runnatively without an executor.Review
An independent review found no wrong figure, pairing or fallback in the arithmetic. It found four things the code did not hold, all fixed here:
detailphrase overstated the window.Each fix has a mutant: with the fix undone, a named test fails.
Checked
On a second machine (a different Metal GPU from the one the earlier stages ran on):
wasm32-wasip2run pass;wai-quantum 0.4.3 is additive: default features,
full, both implementations and every existing pin and digest are unchanged.🤖 Generated with Claude Code