open-standards/wai/research/determinism-cost/runs/linux-b-narrow-decodes.sh
Transaction Science 61759c51b5 wai: the int_hyper decode on the narrow kernel sets, measured; determinism-tiers §7 quotes it
research/determinism-cost.md §4.6, in the same record and by the same
procedure: the 192 payloads decoded again on every platform with every
kernel set it runs (15 new runs, 0 decodes differing from the record's),
and the record's time and energy runs repeated in one session per host
beside the record's own build and the float decoder. On x86_64 host A the
integer decode on the narrow kernels took 144.8 ms and 12.43 J of marginal
package energy at quality 6 against 210.7 ms and 14.03 J for the float
decode beside it (the record's build: 728.0 ms, 92.14 J). On the build
host its own CPU energy fell from 11.01 J to 6.43 J at quality 6 and is
still above the float decode's 1.28 J by that count. Host B's integer
decode was measured before and after, without a float decode beside it.
The scripts that took the readings are in runs/; decode-throughput.md
notes the new sets; the changelog records the change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 04:06:15 -04:00

21 lines
1.3 KiB
Shell

# x86_64 host B: build this change's decoder and DET1's, then the 192 integer decodes with each kernel set.
set -euo pipefail
R=$HOME/idf; W=$R/work; X=$R/xplat; mkdir -p $X $R/bin
export PATH=$HOME/.cargo/bin:$PATH CARGO_PROFILE_DEV_DEBUG=0
TAG=${1:?tag}
cd $R/src/wai/wai-rs && CARGO_TARGET_DIR=$R/target nice -n 19 cargo build --locked --release --no-default-features --features neural_int --bin wai_det_cost -j 8 2>&1 | tail -1
cp $R/target/release/wai_det_cost $R/bin/native.$TAG
python3 - "$W" > $W/jobs.all.tsv <<'PY'
import json, sys
w = sys.argv[1]
ids = [p["id"] for p in json.load(open(f"{w}/pictures.json"))["pictures"]]
for q in range(1, 9):
for i in ids:
print(f"{w}/sets/q{q}\t{w}/int/q{q}/{i}.wih1\t-")
PY
OS="Linux $(uname -r), $(ldd --version 2>&1 | sed -n '1s/.* //p') glibc"; HW="x86_64 laptop CPU, 14 cores, 20 threads, AVX2; discrete GPU, PCI vendor 0x10de"
for k in ${SETS:-avx2-vnni avx2 wide}; do
WAI_INT_ISA=$k nice -n 19 $R/bin/native.$TAG decode $W/jobs.all.tsv > $X/linux-x86_64-b-cpu-isa-$k.tsv
printf '{"system": "%s", "hardware": "%s", "target": "x86_64-unknown-linux-gnu", "fabric": "CPU", "kernels": "fast, kernel set %s", "threads": "all (20)", "rustc": "1.98.0", "runtime": "native", "measured": "%s"}\n' "$OS" "$HW" "$k" "$(date +%F)" > $X/linux-x86_64-b-cpu-isa-$k.json
wc -l $X/linux-x86_64-b-cpu-isa-$k.tsv
done