wai-quantum: the state vector resident on the GPU, auto placed by committed measurements, Pauli propagation on CUDA, an aarch64 board measured and in CI #558
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/quantum-gpu-resident"
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 GPU members now keep the state vector on the device for a whole plan, and
autoplaces a state on one only where committed measurements show it is faster. Pauli propagation runs on CUDA with the CPU's term set, order and bits. Every placed answer is still the CPU's byte for byte. A third host, an aarch64 board with an integrated GPU, is measured, and the CUDA, OpenCL and WebGPU hardware jobs now run on it too.What it adds
The resident state vector (sv64 host layout 2, for CUDA, HIP and OpenCL)
LaunchTable. Each launch is enqueued in the CPU's order on one stream or in-order queue with no wait between them, and the state comes back once.run_from_zerois new, andmax_qubitsfollows the device's memory (at most 32) rather than the dyadic core's 26.The wide kernels certified on their own. The ground-truth random-circuit test found that one host's OpenCL CPU runtime reorders the sums of the 5-qubit kernel on about one input in six. The pinned corpus (fusion 0, 2 and 3) never reaches that kernel, so the kernels for gates on more than three qubits now carry their own certificate (
KERNEL_SV_RUN_WIDE, corpusSV_WIDE: 120 cases, pinned at093614f2…; a 36-case version let the fault through). A member is placed for a job with such gates only if this certificate is bit-exact. Otherwise that job is refused withJ013, andacceleratorskips the member. The receipt andwai-quantum fabricshow each member's wide certificate.autoby measurement (engine::fabric_measured)examples/fabric_timing.rstakes them again.autoplaces a state on a member from the smallest measured size from which every row up to the largest is faster, up to that largest, at the fusion width measured, for a plan of at least the measured launches. A process that has not discovered its members does so only where the saving also covers that discovery.fabric::host(the processor's model, architecture and threads, hashed), members by id, so another processor, device or driver matches nothing and stays on the CPU.autoplaced carries the rule, the host, the day, the load, the discovery and the measured row it rests on in its receipt (fabric.auto, withfabric_spread), and the plan's reasons say so.wai-quantum fabricprints the rule, where it places on this host, and every measured row (auto_rule).autochose that fails during the run hands the job back to the CPU.What the rows say (medians):
autokeeps every state on its CPU.autoplaces fused jobs there. Discovery takes 1.2 s, more than the saving below 28 qubits, so a process whose members are discovered (a service, a session, or a job that asked for one) places from 18 qubits, and a fresh one only at 28.autokeeps its states on the CPU.Pauli propagation on the GPU (
quantum_spd::device)HostDeviceruns that protocol on the CPU, one term after another, and is the CPU's propagation bit for bit, final table included, over 100 cases at one thread and many.CudaSpd, kernelsquantum_fabric::spd) is certified onSPD_DEFAULT: 40 cases, each case's output every value, bound, threshold reached and count, and the final table slot for slot. A mutant that appended a revived string again survived a corpus of numbers alone; with the table, all six mutants are killed.paulijob withfabricset toaccelerator, or a member's id or key, runs its sum of terms on that member, with the CPU's answers byte for byte.cpunames the CPU, and a split is refused (J013).autokeeps the method on the CPU, since no member is measured faster for it.The OpenCL member on PoCL. Found certifying PoCL 7.2 on the aarch64 board, two things PoCL's CUDA device does not do, each of which ended the process rather than returning an error:
CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES). On PoCL's GPU devices alone, each launch names the largest power of two the kernel takes there, at most 128, with the global size rounded up to a multiple of it; the kernels stride, so the items past the work do nothing. Every other runtime still chooses its own, so their measured timings stand.Surfaces. CLI help and the
fabriccommand's text, both MCP servers' descriptions, the guide, the schemas (new optionalfabric_wide,fabric_auto,fabric_spread,auto_ruleandpauli), the engine and CLI READMEs (en and zh-CN) and the changelog. The agent docs are re-blessed.CI
autoto the measurements on each host. The CUDA leg certifies the propagation and kills its mutants. The placement legs run apaulijob on each member, or seeacceleratorrefused. The container legs name the protocol's tests.cuda-hw,opencl-hwand the WebGPUmember-hwjobs become matrices over the hosts with such devices, each host's devices declared in the workflow: jetson-hub (linux-hw), as before, and the aarch64 board (linux-arm64-hw), new:gpu-cuda-sm110on CUDA 13.2; OpenCL through PoCL 7.2 for its CPU (opencl-cpu-13b5) and, through CUDA, its GPU (opencl-gpu-10de, withPOCL_CUDA_GPU_ARCH=sm_90, since PoCL's LLVM 18 has no sm_110); and Vulkan for its GPU and the software driver. jetson-hub's jobs keep their names except the WebGPU one, which is nowmember · GPU, Vulkan (jetson-hub).Checked
cuda-hw6/6 (cuda_sv4,cuda_spd3,fabric_placement7),opencl-hw3/3 (opencl_sv4),hip-absentevery step. With the PoCL change: its OpenCL members certify as before (its GPU bit-exact on both corpora, its CPU's wide kernels not bit-exact, its integrated GPU refused for want of binary64).hip-hw5/5 (hip_sv4,fabric_placement7),opencl-amd3/3,cuda-absent2/2.cuda-hw6/6: the CUDA member's 4 certificates and the tensor-core kernel's 4, bit-exact with the pinned digests the laptop's GPU gives; the state vector's pinned 48 and 120 cases; 140 random resident runs; 4 of 4 mutants; Pauli propagation's certificate and large sums.opencl-hw: PoCL's CPU and GPU members each certify bit-exact, wide certificate included, their 48 and 120 cases and 140 random runs the CPU's bit for bit. The fabric's 7 placement tests, one state split over the CUDA GPU, PoCL's GPU, PoCL's CPU and the CPU reference giving the CPU's answers byte for byte. The WebGPUmember-hwjob: the member's 14 tests (the wide sizes to 26 qubits on the GPU) and the conformance corpus through the member.examples/fabric_timing.rs: 36 rows.opencl_sv: 4 passed (the no-binary64 refusal). Under--features full: 53 lib tests and 7fabric_placement. Both pins reproduce on arm64.quantum_fabric::117 passed. Repository checks: every line ok. Breaking gate: no unacknowledged break. CLI smoke: every check held.check_schemas.pywith the pinnedjsonschema: exit 0. Servicemcp::: 14 passed, then the CLI's tests.build-views --check: the committed page is built from its 49 sources. Servicemcp::: 14 passed. CLI: 72 passed (bin) and every integration target; clippy withcuda,hip,openclclean. Service: 37 + 1. wai-web native: 29 passed. Engine--features full: 1162 lib tests passed and every test binary (engine::fabric6,engine::fabric_measured4,quantum_spd23,quantum_fabric117). The contract feature sets' fabric and schema tests: 12 and 11 passed. CLI and service smoke: every check held. Breaking gate: no unacknowledged break. Repository checks: all 10 lines ok. After the board's rows:engine::fabricandengine::fabric_measuredunder--features full, 10 passed.check_schemas.py: 47 tool answers follow their schemas.de3fce0d3with the variational and scale-out PRs under it (macOS build host)build-views --checkpassed.studio.test.mjsrun twice: every check passed.wai/wai-quantum-views/build.shincatthehacker/ubuntu:act-22.04with Rust 1.98.0: the same bytes as the committed page, so the engine changes since it was built (the board's rows, the PoCL fix) do not reach it.2820e1e57bda065b52), and the receipt ledger's billing by the work spent (#556), inwai-rs,wai-ledgerand their specifications. Every changed line is main's, and no crate this PR changes compiles #556's code (none depends onwai-rs), so nothing was run again by hand for it; this PR's CI runs every leg.wai-quantum-py/ci/check.shpassed on a tree holding this PR and the registry PR above it (78 passed, 5 of 5 notebooks ran and matched).quantum_engineand the sets beside it under-D warnings, whereexpectation_tablewas dead: only the device reference (underquantum_fabric) and a test read it.d4cdbb7dacompiles it only there. Everycargo checkline of the three workflows, andquantum_lang,quantum_toolchain,quantum_fabricandfull --lib --tests, now compiles clean under-D warnings.quantum_spdtests: 28 passed under full, 22 under the contract set.The views page was rebuilt (
ae432098e) withwai/wai-quantum-views/build.shincatthehacker/ubuntu:act-22.04with Rust 1.98.0, as the views workflow rebuilds it, since the engine inside it changed.Not done
autoforpauli: no member is measured for it, so it stays on the CPU.opencl-absentleg was not replayed (every host here has OpenCL); its only change is its pass count, from 3 to 4.Breaking
None. The breaking gate passes, and the changelog acknowledges no break.
🤖 Generated with Claude Code