Some checks failed
wai-quantum WebGPU member / member · DX12 and Vulkan (cbio-windows) (pull_request) Successful in 12m58s
energy meters on real hardware / sink decode table · per-task energy and the GPU rail on macOS (pull_request) Successful in 2m44s
joule-moq-remote host agent / joule-moq-remote · does this change touch it (pull_request) Successful in 14s
joule-moq-room room service / joule-moq-room · does this change touch it (pull_request) Successful in 2m43s
joule-moq-web browser client / joule-moq-web · does this change touch it (pull_request) Successful in 17s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 28s
wai-audit collector and player integration / does this change touch it (pull_request) Successful in 23s
wai-app and Create / wai-app · does this change touch it (pull_request) Successful in 52s
WAI conformance / does this change touch it (pull_request) Successful in 12s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (pull_request) Successful in 28s
WAI operation catalogue / does this change touch it (pull_request) Successful in 30s
WAI energy receipts / does this change touch it (pull_request) Successful in 11s
WAI examples / WAI examples · does this change touch them (pull_request) Successful in 13s
wai-fleet service / does this change touch it (pull_request) Successful in 10s
wai-key-proxy / does this change touch it (pull_request) Successful in 27s
WAI JPEG-AI whole decode (pinned inputs, required) / does this change touch it (pull_request) Successful in 39s
wai-ledger service / does this change touch it (pull_request) Successful in 15s
wai-ops-gpu integer operators on GPUs / does this change touch it (pull_request) Successful in 24s
WAI neural sink gates / does this change touch it (pull_request) Successful in 22s
wai-quantum contract / does this change touch it (pull_request) Successful in 17s
wai-pack / wai-pack · does this change touch it (pull_request) Successful in 26s
wai-quantum command line / does this change touch it (pull_request) Successful in 21s
wai-quantum signal processor / does this change touch it (pull_request) Successful in 16s
wai-quantum dataflow member / does this change touch it (pull_request) Successful in 18s
wai-quantum CUDA member / does this change touch it (pull_request) Successful in 35s
wai-quantum docs, course and locales / does this change touch it (pull_request) Successful in 21s
wai-quantum editors / does this change touch it (pull_request) Successful in 24s
wai-quantum FPGA member / does this change touch it (pull_request) Successful in 16s
wai-quantum resource estimation / does this change touch it (pull_request) Successful in 28s
wai-quantum other formats / does this change touch it (pull_request) Successful in 28s
wai-quantum for JavaScript / does this change touch it (pull_request) Successful in 23s
wai-quantum energy-landscape jobs / does this change touch it (pull_request) Successful in 25s
wai-quantum HIP member / does this change touch it (pull_request) Successful in 28s
wai-quantum OpenQASM reader / does this change touch it (pull_request) Successful in 18s
wai-quantum energy-landscape GPU members / does this change touch it (pull_request) Successful in 24s
wai-quantum npu-cores member / does this change touch it (pull_request) Successful in 25s
wai-quantum Metal member / does this change touch it (pull_request) Successful in 18s
wai-quantum neural-processor member / does this change touch it (pull_request) Successful in 32s
wai-quantum OpenCL member / does this change touch it (pull_request) Successful in 27s
wai-quantum pulse and dynamics / does this change touch it (pull_request) Successful in 28s
wai-quantum for Python / does this change touch it (pull_request) Successful in 24s
wai-quantum error correction and mitigation / does this change touch it (pull_request) Successful in 15s
wai-quantum-qpu / does this change touch it (pull_request) Successful in 15s
wai-quantum extension points / does this change touch it (pull_request) Successful in 14s
wai-quantum service / does this change touch it (pull_request) Successful in 10s
wai-quantum matrix-extension member / does this change touch it (pull_request) Successful in 13s
wai-quantum tensor-engine member / does this change touch it (pull_request) Successful in 13s
wai-quantum portable tensor program / does this change touch it (pull_request) Successful in 11s
wai-quantum studio and desktop / does this change touch it (pull_request) Successful in 19s
wai-quantum variational and algorithm library / does this change touch it (pull_request) Successful in 9s
wai-quantum verdicts and repairs / does this change touch it (pull_request) Successful in 10s
wai-quantum on every processor / emulated · loongarch64-unknown-linux-gnu (pull_request) Successful in 3m24s
wai-quantum WebGPU member / does this change touch it (pull_request) Successful in 13s
wai-quantum views in agent hosts / does this change touch it (pull_request) Successful in 28s
wai-quantum CPU vector units / does this change touch it (pull_request) Successful in 30s
wai-sink-android native sink library / does this change touch it (pull_request) Successful in 16s
wai-sink-swift native sink package / does this change touch it (pull_request) Successful in 17s
WAI mbt2018_mean integer decode (regenerated vectors) / does this change touch it (pull_request) Successful in 29s
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Successful in 22s
WAI Studio / does this change touch it (pull_request) Successful in 41s
wai-web wasm32 / does this change touch it (pull_request) Successful in 20s
wai-quantum on every processor / emulated · aarch64-unknown-linux-gnu (pull_request) Successful in 4m59s
wai-quantum on every processor / emulated · armv7-unknown-linux-gnueabihf (pull_request) Successful in 4m57s
wai-quantum on every processor / emulated · riscv64gc-unknown-linux-gnu (pull_request) Successful in 4m42s
wai-quantum on every processor / emulated · sparc64-unknown-linux-gnu (pull_request) Successful in 5m7s
wai-quantum on every processor / emulated · powerpc64le-unknown-linux-gnu (pull_request) Successful in 7m11s
wai-quantum on every processor / emulated · s390x-unknown-linux-gnu (pull_request) Successful in 11m49s
wai-quantum on every processor / emulated · i686-unknown-linux-gnu (pull_request) Successful in 14m25s
wai-quantum on every processor / emulated · powerpc64-unknown-linux-gnu (pull_request) Successful in 15m47s
WAI conformance / fast integer kernels, every x86_64 kernel set (AVX-512 silicon) (pull_request) Successful in 3m17s
wai-quantum HIP member / member · HIP (framework-128gb) (pull_request) Successful in 1m22s
wai-quantum energy-landscape GPU members / members · framework-128gb (pull_request) Successful in 1m8s
wai-quantum npu-cores member / member · npu-cores, neural processor (framework-128gb silicon) (pull_request) Successful in 1m27s
wai-quantum OpenCL member / member · OpenCL GPU (framework-128gb) (pull_request) Successful in 25s
wai-quantum portable tensor program / tensor program · integrated GPU (framework-128gb) (pull_request) Successful in 17s
wai-quantum CPU vector units / member · vector units, avx2 and avx512 (framework-128gb silicon) (pull_request) Successful in 18s
wai-quantum WebGPU member / member · integrated GPU, Vulkan (framework-128gb) (pull_request) Successful in 9m7s
energy meters on real hardware / RAPL and NVML on jetson-hub (pull_request) Successful in 41s
energy meters on real hardware / sink decode table · RAPL on jetson-hub (NVML surveyed) (pull_request) Successful in 2m40s
wai-quantum studio and desktop / desktop app · windows (pull_request) Successful in 9m50s
joule-moq-remote host agent / joule-moq-remote, every target (macos) (pull_request) Successful in 44s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (pull_request) Successful in 2m6s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 25s
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Successful in 1m6s
wai-fleet service / service · macos (pull_request) Successful in 1m16s
wai-ledger service / service · macos (pull_request) Successful in 1m35s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 10m30s
wai-app and Create / wai-app · Create, browser end-to-end (macos) (pull_request) Successful in 8m20s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Successful in 12m27s
wai-quantum dataflow member / member · dataflow device absent (macos) (pull_request) Successful in 14s
wai-pack / wai-pack · macos (pull_request) Successful in 3m6s
wai-quantum FPGA member / member · FPGA datapath, simulated (macos) (pull_request) Successful in 1m9s
wai-quantum command line / command line · macos (pull_request) Successful in 3m15s
wai-quantum editors / editors · macos (pull_request) Successful in 1m17s
wai-quantum Metal member / member · Metal (macos) (pull_request) Successful in 32s
wai-quantum energy-landscape GPU members / members · mac-studio (pull_request) Successful in 1m20s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 10m26s
wai-quantum OpenCL member / member · OpenCL GPU (macos) (pull_request) Successful in 29s
wai-quantum energy-landscape jobs / the same bits · macos (pull_request) Successful in 3m36s
wai-quantum-qpu / credentials in the keychain (macos) (pull_request) Successful in 19s
wai-quantum pulse and dynamics / the same bits · macos (pull_request) Successful in 1m12s
wai-quantum matrix-extension member / member · matrix extension absent (macos) (pull_request) Successful in 12s
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Successful in 19s
WAI conformance / cargo-class corpora · macos (pull_request) Failing after 16m14s
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Successful in 16s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Successful in 12m50s
wai-quantum for Python / python · macos (pull_request) Successful in 2m24s
wai-quantum neural-processor member / member · neural processor (macos) (pull_request) Successful in 5m59s
wai-ops-gpu integer operators on GPUs / Metal GPU and browser WebGPU (macos) (pull_request) Successful in 10m2s
wai-quantum service / service · macos (pull_request) Successful in 3m43s
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Successful in 1m55s
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 1m54s
wai-quantum studio and desktop / desktop app · macos (pull_request) Successful in 4m23s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (pull_request) Successful in 7m17s
WAI Studio / Studio in Chromium and Firefox · macos (pull_request) Successful in 9m37s
wai-app and Create / wai-app · tests, clippy, the line language's verifier (linux) (pull_request) Successful in 33s
wai-audit collector and player integration / collector · linux (pull_request) Successful in 1m59s
WAI conformance / faces from keypoints under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m42s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (pull_request) Failing after 1m41s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 2m32s
wai-key-proxy / proxy · linux (pull_request) Successful in 1m18s
wai-quantum contract / the policy is linked, and the deprecations page reads (pull_request) Successful in 8s
wai-ledger service / service · linux (pull_request) Successful in 1m53s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 2m3s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Successful in 17m11s
wai-pack / wai-pack · linux (pull_request) Successful in 2m19s
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (pull_request) Successful in 4m58s
wai-fleet service / service · linux (pull_request) Successful in 3m56s
wai-quantum docs, course and locales / the Studio's words in every locale · linux (pull_request) Successful in 12s
wai-ops-gpu integer operators on GPUs / builds · no adapter is not a pass (linux) (pull_request) Successful in 3m51s
WAI neural sink gates / the exact JPEG-AI decoder reports its path (pinned inputs, required) (pull_request) Successful in 3m48s
wai-quantum FPGA member / member · FPGA simulation absent (linux) (pull_request) Successful in 30s
wai-quantum other formats / the set under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m42s
wai-quantum resource estimation / estimation and calibration · linux, release (pull_request) Successful in 2m11s
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:b140) (pull_request) Successful in 4m2s
wai-quantum CUDA member / member · CUDA absent (linux) (pull_request) Successful in 2m43s
wai-quantum Metal member / member · Metal absent (linux) (pull_request) Successful in 48s
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:401e) (pull_request) Successful in 4m57s
wai-quantum energy-landscape jobs / the module under wasm32-wasip2 (wasmtime) (pull_request) Successful in 2m10s
wai-quantum neural-processor member / member · neural processor absent (linux) (pull_request) Successful in 43s
wai-quantum OpenQASM reader / corpus under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m18s
wai-quantum OpenQASM reader / reader and corpus · linux (pull_request) Successful in 2m2s
wai-quantum command line / command line · linux (pull_request) Successful in 6m41s
wai-quantum OpenCL member / member · OpenCL absent (linux) (pull_request) Successful in 33s
wai-quantum editors / editors · linux (pull_request) Successful in 4m50s
wai-quantum contract / API compatibility · linux (pull_request) Successful in 8m25s
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Successful in 11m26s
wai-quantum for JavaScript / javascript · linux (pull_request) Successful in 5m23s
wai-quantum-qpu / clients against their contracts (linux) (pull_request) Successful in 1m16s
wai-quantum pulse and dynamics / reader, simulator and pulse jobs under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m31s
wai-quantum other formats / readers, writers and the set · linux (pull_request) Successful in 6m20s
wai-quantum matrix-extension member / member · matrix extension, emulated (aarch64 Linux) (pull_request) Failing after 46s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 10m43s
wai-quantum energy-landscape jobs / native against WebAssembly, over many seeds (pull_request) Successful in 4m27s
wai-quantum pulse and dynamics / reader, simulator and pulse jobs · linux, release (pull_request) Successful in 2m30s
wai-quantum extension points / the registry under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m48s
wai-quantum portable tensor program / tensor program · CPU, mutants, GPU builds (pull_request) Successful in 1m20s
wai-quantum for Python / python · linux (pull_request) Successful in 3m8s
wai-quantum CPU vector units / member · vector unit, rvv 1024-bit (riscv64, emulated) (pull_request) Successful in 23s
wai-quantum verdicts and repairs / the intent set and the verdict under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m20s
wai-quantum CPU vector units / member · vector unit, sve 128-bit (aarch64, emulated) (pull_request) Successful in 29s
wai-quantum verdicts and repairs / verdicts, repairs and the intent set · linux (pull_request) Successful in 1m56s
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Successful in 34s
wai-quantum CPU vector units / member · vector unit, sve 2048-bit (aarch64, emulated) (pull_request) Successful in 13s
wai-quantum energy-landscape jobs / reader, kernels, answers and the stated result · linux, release (pull_request) Successful in 7m16s
wai-quantum CPU vector units / member · vector unit, avx2 (x86_64 silicon) (pull_request) Successful in 25s
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Successful in 30s
wai-quantum error correction and mitigation / codes, decoders, texts and mitigation · linux, release (pull_request) Successful in 5m14s
wai-quantum extension points / the registry and the example · linux (pull_request) Successful in 5m5s
wai-quantum docs, course and locales / the course and the command line's languages · linux (pull_request) Successful in 11m11s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux, release (pull_request) Successful in 4m21s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 2m21s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (pull_request) Successful in 1m42s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 2m36s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness (pull_request) Successful in 3m14s
wai-quantum views in agent hosts / views · the page and its engine (pull_request) Successful in 5m26s
wai-quantum signal processor / processor and member · signal processor, emulated (pull_request) Successful in 14m28s
WAI operation catalogue / the catalogue and every door · linux (pull_request) Successful in 17m45s
wai-quantum views in agent hosts / views · a scripted host (pull_request) Successful in 5m36s
wai-quantum studio and desktop / studio · browser (pull_request) Successful in 7m43s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 5m56s
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Successful in 9m32s
WAI examples / WAI examples · portable · linux (pull_request) Successful in 19m56s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 7m7s
wai-quantum studio and desktop / desktop app · linux (pull_request) Successful in 11m9s
wai-quantum contract / schemas and the committed tool lists · linux (pull_request) Successful in 21m51s
wai-quantum service / service · linux (pull_request) Successful in 15m19s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 11m48s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 31m25s
wai-quantum docs, course and locales / every command and snippet in the docs · linux (pull_request) Successful in 31m11s
wai-quantum CUDA member / member · CUDA (thor) (pull_request) Successful in 2m16s
wai-quantum OpenCL member / member · OpenCL GPU and CPU (thor) (pull_request) Successful in 46s
WAI Studio / Studio in WebKit · linux (pull_request) Successful in 36m11s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 54m16s
wai-quantum WebGPU member / member · GPU, Vulkan (thor) (pull_request) Successful in 24m46s
wai-quantum CUDA member / member · CUDA (jetson-hub) (pull_request) Successful in 1m17s
wai-quantum energy-landscape GPU members / members · jetson-hub (pull_request) Failing after 1m19s
wai-quantum OpenCL member / member · OpenCL GPU and CPU (jetson-hub) (pull_request) Successful in 30s
wai-quantum service / service energy · linux packages (pull_request) Successful in 1m16s
wai-quantum portable tensor program / tensor program · GPUs (jetson-hub) (pull_request) Successful in 20s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 2m5s
wai-quantum WebGPU member / member · GPU, Vulkan (jetson-hub) (pull_request) Successful in 18m3s
joule-moq-remote host agent / joule-moq-remote, every target (linux-arm64) (pull_request) Has been cancelled
joule-moq-room room service / joule-moq-room, every target (pull_request) Has been cancelled
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Has been cancelled
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Has been cancelled
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Has been cancelled
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Has been cancelled
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Has been cancelled
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Has been cancelled
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Has been cancelled
wai-pack / wai-pack · linux-arm64 (pull_request) Has been cancelled
wai-pack / wai-pack · independent verifier (Python) (pull_request) Has been cancelled
wai-pack / wai-pack · the floor through a media prober (pull_request) Has been cancelled
wai-pack / wai-pack · dependency licences (pull_request) Has been cancelled
wai-quantum HIP member / member · HIP absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum energy-landscape jobs / the same bits · linux-arm64 (pull_request) Has been cancelled
wai-quantum npu-cores member / member · npu-cores absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum pulse and dynamics / the same bits · linux-arm64 (pull_request) Has been cancelled
wai-quantum extension points / the registry and the example · linux-arm64 (pull_request) Has been cancelled
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (pull_request) Has been cancelled
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Has been cancelled
The review of #672 (35 findings), each fix with a test that fails first: - The conformance set reaches what large jobs reach: settles past a workgroup and past a batch of sweeps; chains held hot to their last sweep, at the seeds where a 32-bit port of the generator first goes wrong, past a workgroup of chains, across a device's windows by table and by work; fields only their full width tells apart; field bounds at 2^31 - 1 and just past it. 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. Each fault a port can have, put into the kernels on a device, costs them the grade. - Placement: call_placed passes over an uncertified kernel, a declining member and one that fails the job, naming each under refusals; no member is run on what it declines however it is reached; every answer says who ran it at what parity. - Budget: a sweep's cut points cover the fields the cells can reach (reach.rs, at most 4P + n), counted in a job's operations and bytes; WebGPU waits once a window, and a member that times out passes the job on. - RunCounter reads the counter through each call, gives a figure only from a live window of the profile's minimum, adds its own terms to the declared uncertainty, holds NVML to its plausibility itself, and says what its figure covers; readings are kept per thread and a run's windows are summed. - The spec states one decline rule and defines the field bound; the schema, docs, READMEs and changelog follow; the devices workflow declares each host's members, reads a report rather than test output, runs the members' unit tests, and keeps the Mac's target off its internal disk. Co-Authored-By: Claude Opus 5.5 <[email protected]>
88 lines
3.9 KiB
Rust
88 lines
3.9 KiB
Rust
//! The engine's energy-landscape GPU members metered by this machine's own on-chip
|
|
//! counter (`sink_meter::RunCounter`): the GPU rail through IOReport on macOS, the board
|
|
//! through NVML on Linux. Hardware only, run by hand with `--ignored --nocapture`.
|
|
//!
|
|
//! The operator's term these tests declare for the counter, 100,000 ppm, is a coarse choice
|
|
//! for a hand run, not an evaluation of the counter's own error; the meter adds its own terms
|
|
//! beside it, and nothing here seals a figure. The figure is the whole rail or board over the
|
|
//! call's window, idle draw and any other work on the device included, as the answer says.
|
|
#![allow(dead_code, unused_imports)]
|
|
|
|
use std::time::Instant;
|
|
use wai::sink_meter::RunCounter;
|
|
use wai_quantum::quantum_landscape::energy::Landscape;
|
|
use wai_quantum::quantum_landscape::member::{Chain, CpuReference, Member};
|
|
use wai_quantum::quantum_landscape::sample::{chain_seed, out, schedule, start};
|
|
use wai_quantum::quantum_landscape::settle::Workload;
|
|
|
|
const DECLARED_PPM: u32 = 100_000;
|
|
|
|
fn work(n: usize, chains: u64, sweeps: u32) -> (Workload, Vec<Chain>, Vec<f64>) {
|
|
let mut l = Landscape::new(n);
|
|
let mut k = 0u64;
|
|
for i in 0..n {
|
|
for _ in 0..4 {
|
|
k += 1;
|
|
let j = (out(0x7177, k) % n as u64) as usize;
|
|
if j != i {
|
|
l.couple(i, j, if k % 3 == 0 { -1 } else { 1 });
|
|
}
|
|
}
|
|
}
|
|
l.set_cost(1);
|
|
let cs = (0..chains)
|
|
.map(|r| {
|
|
let c = chain_seed(9, r);
|
|
Chain { start: start(c, n), seed: c }
|
|
})
|
|
.collect();
|
|
(l.lower(), cs, schedule(l.default_temperature(), sweeps))
|
|
}
|
|
|
|
fn metered(m: &dyn Member, w: &Workload, cs: &[Chain], temperatures: &[f64]) {
|
|
let t = Instant::now();
|
|
let got = m.chains(w, cs, temperatures).unwrap();
|
|
let wall = t.elapsed().as_secs_f64();
|
|
let reading = m.meter();
|
|
println!("{}: {} chains, {} cells, {} sweeps in {wall:.2} s wall-clock", m.id(), cs.len(), w.n(), temperatures.len());
|
|
match &reading {
|
|
Some(r) => println!(" read: {} µJ over {} µs, class {}\n covering {}", r.joules_micro, r.window_us, r.class, r.scope.as_deref().unwrap_or("this run alone")),
|
|
None => println!(" no reading"),
|
|
}
|
|
let r = reading.expect("a call longer than the profile's minimum window, on a live counter, gives a reading");
|
|
assert_eq!(r.class["energy_provenance"], "OnChipCounter", "{}", r.class);
|
|
assert!(r.scope.as_deref().is_some_and(|s| s.contains("idle draw")), "{:?}", r.scope);
|
|
// The same bits as the reference, on a slice of the chains.
|
|
assert_eq!(got[..4], CpuReference.chains(w, &cs[..4], temperatures).unwrap()[..]);
|
|
}
|
|
|
|
#[cfg(all(target_os = "macos", feature = "quantum_landscape_metal"))]
|
|
#[test]
|
|
#[ignore]
|
|
fn a_metal_member_reads_the_gpu_rail() {
|
|
let counter = wai::sink_meter::IoReportGpu::open().expect("IOReport's GPU Energy channel");
|
|
let m = wai_quantum::quantum_landscape::metal::discover().into_iter().find_map(Result::ok).expect("a Metal device");
|
|
let m = m.with_meter(Box::new(RunCounter::new(Box::new(counter), DECLARED_PPM).unwrap()));
|
|
let (w, cs, t) = work(4096, 1024, 400);
|
|
metered(&m, &w, &cs, &t);
|
|
}
|
|
|
|
#[cfg(all(target_os = "linux", feature = "quantum_landscape_cuda"))]
|
|
#[test]
|
|
#[ignore]
|
|
fn a_cuda_member_reads_the_board() {
|
|
let counter = wai::sink_meter::Nvml::open().expect("NVML");
|
|
// energy-measurement §9.3: the bridge itself refuses an implausible counter, so no figure
|
|
// can come from one. This hand run then has nothing to read, and says so.
|
|
let meter = match RunCounter::nvml(counter, DECLARED_PPM) {
|
|
Ok(m) => m,
|
|
Err(why) => {
|
|
println!("no meter: {why}");
|
|
return;
|
|
}
|
|
};
|
|
let m = wai_quantum::quantum_landscape::cuda::discover().into_iter().find_map(Result::ok).expect("a CUDA device");
|
|
let m = m.with_meter(Box::new(meter));
|
|
let (w, cs, t) = work(4096, 1024, 1200);
|
|
metered(&m, &w, &cs, &t);
|
|
}
|