wai-quantum: energy-landscape jobs on a GPU, through WebGPU, CUDA and Metal, each member certified by the host #672
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/quantum-landscape-gpu"
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?
The energy-landscape job's kernels on GPUs, as members the host certifies and checks like any other, on top of #664, which has landed. The second commit answers the review of #672 (35 findings), with tests for each fix. Main is merged in.
What is here
wai_quantum::quantum_landscape, each behind a feature:webgpu(quantum_landscape_webgpu): Metal, Vulkan or DX12 through WebGPU, in 32-bit lanes. It declines a workload whose field bound is above 2³¹ − 1, and holds a cost above every field at its lanes' top. Its coloured kernel moves a colour class of cells at once.cuda(quantum_landscape_cuda) andmetal(quantum_landscape_metal): 64-bit fields, so they take every workload.extensions/quantum-landscape.md§5). A workload's field bound is the largest field any state can give a cell,max_i (|b_i| + deg_i)(§4.1). A member may decline a workload only where that is above 2³¹ − 1; the host never runs it on one it declines, however it is reached; the reference declines nothing.job::call_placed): the first member that is certified for every kernel the job runs, takes the workload and gives an answer the host's checks keep. Each member passed over, for any of those, is named underrefusalswith why, and the next is asked. Every answer says who ran it at what parity: arunits kernel's, areplayits member and kernel, asweepand acompareeach kernel they used.reach.rs), at most4P + nentries however wide the fields, and a job counts it in its operations and its bytes (§2.0). The review's job that asked for 4.19 million entries a sweep now has 6.wai::sink_meter::RunCounter, inwai-rs, which sees both crates, sowai-quantumtakes no dependency onwai-rs. It reads the counter through each call on a thread of its own and gives a figure only from a window in which the counter was live (energy-measurement §3.1: the sameLivenesstestCounterMeterapplies) and which lasted the profile's minimum. The figure is labelledOnChipCounter: the operator's declared uncertainty, asCounterMetertakes it, combined with the register's step and the counter's measured refresh at each edge. NVML is metered only throughRunCounter::nvml, which holds the counter to §9.3's plausibility itself and every window to 1.5 times the power limit. What it covers is said in the answer:joules.metered.scope(the whole rail or board, its idle draw and any other work on the device in the window, no share attributed to the run), with the window summed over a run's calls; thelabelclaims a reading only in an answer that has one.drawspart pins the generator. The battery adds a ring of six, eight triangles side by side, a walked law that a schedule's end alone does not give, and fields past 16 and 32 bits.wai-quantum-landscape-devices.ymldeclares each host's members (WAI_LANDSCAPE_EXPECT): one missing, or whose kernels no longer compile, fails its leg with why. It reads the certificates from a report file rather than test output, runs the members' unit tests, holds the timings' bits, and keeps the Mac's target in the job's workspace on its external volume. Its path filters take the fabric code the members use.Parity, found by
member::certifyon each deviceThe Mac Studio rows are from this head, main merged in. The framework-128gb rows are from
0675813dewith the Radeon's expected name fixed, before the merge: that host's disk was underrb's floor afterwards. Main changed none of the landscape sources.cpu)Each device also passed the other device tests: every worked example at three temperatures over 50 seeds gives the reference's bits; jobs past every window and workgroup (a settle of 4096 cells, 600 sweeps of 1024 cells, wide fields with every window hot, more chains than a batch) give the reference's state, energy, verdict, work and replay digest from the device; a workload past 32 bits goes from WebGPU to the reference with the refusal named and is taken by Metal; a WebGPU wait covers one window (40 windows in 8.49 s with one wait at most 2.13 s on the M3 Ultra, in 5.66 s with at most 1.62 s on the Radeon, in 1.45 s with at most 0.31 s on llvmpipe), and a job the member cannot finish in its wait goes to the reference with the refusal named.
CUDA is not run at this head. jetson-hub is the only host with a CUDA device here, and its laptop GPU (NVIDIA GeForce RTX 4050 Laptop GPU) is off its bus (
nvidia-smi: "Unable to determine the device handle … Unknown Error"). I did not run its leg. In CI that leg declares the CUDA member and the GPU through Vulkan, so it fails, naming them, until the card is back: it cannot read as a pass. The CUDA rows of the first version came from a run before the last tidy commit of the first version. The CUDA kernels' text gets the same edits as Metal's, and their compile test (cuda::tests) runs wherever the runtime compiler is, card or not. Thor'slinux-arm64-hwrunner, whichwai-quantum-cuda.ymlalready uses, would give CUDA a second leg; that is the owner's call, so it is not added here.Faults put into the kernels on a device, and the grade each left
The test
every_fault_in_a_device_s_kernels_loses_its_gradeputs each fault into the real kernel text (discover_with), certifies the faulted member on the device, and asserts the faulted kernel is notbit-exact. On the Mac Studio's M3 Ultra:On framework-128gb, through WebGPU on Vulkan, every WGSL fault left the same grades on the Radeon 8060S and on llvmpipe as on the M3 Ultra: the 16-bit settle and sampled-field faults and the workgroup settle fault
uncertifiedin their kernel; the dropped carry, the high-word compare, the per-window counter and cells last to firststatistical.Every fault costs its kernel
bit-exact. Where one keepsstatistical, this is why:statisticalgrants; the vectors catch both bit for bit;statisticalonly because no battery workload is long enough to cross a device's window, so the battery holds a sampler to its law inside one window and no further. The vectors catch it bit for bit. Closing it in the battery needs a workload whose exact law is known and whose schedule crosses every member's windows, which depends on each member's window; it is not done here.The CPU stand-ins in
tests/landscape_conformance.rshold the same faults, and more (a check of the fields that forgets the couplings, a run that stops after one window, chains past the first 64 left alone, a settle that reports its end a sweep late, a member that declines below the line), against the vectors on every platform.Timings, wall-clock, each the middle of three runs, the bits asserted
The hosts are shared; the load is the host's one-minute load average over its cores during the run.
A settle of 1,024 cells (43 sweeps) took 0.001 s on the CPU and on Metal and 0.005 s through WebGPU on the Mac, and 0.002 s on the CPU against 0.019 s on the Radeon: too little work for a dispatch a sweep.
The meter
On the Mac Studio, the Metal member metered by IOReport's GPU channel through
RunCounterran 1,024 chains of 4,096 cells for 400 sweeps in 4.92 s and read 53,584,622 µJ over a live window of 4,900,878 µs, labelledOnChipCounter, filteringUnknown, 100,035 ppm: the hand run's declared 100,000 ppm, a coarse choice and not an evaluation of the counter's own error, with the meter's own terms. Its scope, as the answer gives it: "the graphics processor's whole rail as IOReport's GPU Energy channel reports it, over the windows of this run's calls: this run's work, the rail's idle draw and any other work on the graphics processor in those windows, with no share attributed to this run". The host's load was about 94 on 32 cores, so the figure holds other work too. NVML was not run: jetson-hub's card is off its bus.Checked
full;landscape_conformance12; the float read 1; thewai-rsmeter tests 3;wai-quantumwithfulland every landscape feature, andwai-rswithsink_energyand the landscape features, each checked with its tests.wai-quantumunder-D warningswith every landscape feature.landscape_devices7 and the timings 1, withWAI_LANDSCAPE_EXPECT=gpu:metal.apple-m3-ultra,gpu:wgpu-metal.apple-m3-ultra. The hand-run meter test 1, before the merge.landscape_devices7 and the timings 1, withWAI_LANDSCAPE_EXPECT=gpu:wgpu-vulkan.radeon,cpu:wgpu-vulkan.llvmpipe. The first run of it found that the workflow declared this host's GPU asgpu:wgpu-vulkan.amd, while its adapter names itself "Radeon 8060S Graphics (RADV STRIX_HALO)"; the leg failed, naming the member it did not find, which is what the declaration is for. It now declaresgpu:wgpu-vulkan.radeon. The same run found the coloured kernel's id cut off its device's hex on a long adapter name; it now keeps it (a_coloured_id_keeps_its_device_s_hex).the_classes_are_the_fabric_s, which needsquantum_fabric.wai.quantumnames, operation doors and corpus licences, and the lockfiles (62, all current, on Thor).Beside the landscape
Merging main showed that
engine::job's testa_host_never_seals_what_its_verifier_refusescallsqecwith no feature gate, so the library's tests did not compile forquantum_engine,quantum_receipt, the feature set of this workflow's wasip2 job. It is gated onquantum_qechere, one line.fullholds that feature, so nothing that ran it stops running it.The two kernel labels are on main already, from #664's landing.
🤖 Generated with Claude Code