# The integer and float decodes on the x86_64 Linux host (CPU, and the integrated GPU through Vulkan). set -euo pipefail R=$HOME/wai-build/det1; W=$R/work; PY=$R/venv/bin/python; BIN=$R/target/release/wai_det_cost; X=$W/xplat; mkdir -p $X $W/fdecode cd $R/src/wai $PY -I tools/wai_determinism_cost.py jobs $W - > $W/jobs.dash.tsv OS="Linux $(uname -r), $(ldd --version 2>&1 | sed -n '1s/.* //p') glibc"; HW="x86_64 SoC, 16 cores, 32 threads, AVX-512" meta() { printf '{"system": "%s", "hardware": "%s", "target": "%s", "fabric": "%s", "kernels": "%s", "threads": "%s", "rustc": "%s", "runtime": "%s"}\n' "$OS" "$HW" "$1" "$2" "$3" "$4" "1.98.0" "$5"; } case "$1" in int) nice -n 10 $BIN decode $W/jobs.dash.tsv > $X/linux-x86_64-cpu.tsv meta x86_64-unknown-linux-gnu CPU fast "all (32)" native > $X/linux-x86_64-cpu.json WAI_DET_GPU_KEY=gpu-vulkan-1002 nice -n 10 $BIN --gpu decode $W/jobs.dash.tsv > $X/linux-x86_64-gpu-vulkan.raw 2> $X/linux-x86_64-gpu-vulkan.err cut -f1-4 $X/linux-x86_64-gpu-vulkan.raw > $X/linux-x86_64-gpu-vulkan.tsv meta x86_64-unknown-linux-gnu "GPU, Vulkan, integrated, PCI vendor 0x1002" fast "all (32) for graphs off the device" "wgpu 30.0.1, $(grep -o 'adapter: .*' $X/linux-x86_64-gpu-vulkan.err | head -1 | sed 's/"/'"'"'/g')" > $X/linux-x86_64-gpu-vulkan.json ;; float) nice -n 10 $PY -I tools/wai_determinism_cost.py fdecode $W linux-x86_64-cpu --device cpu nice -n 10 $PY -I tools/wai_determinism_cost.py fdecode $W linux-x86_64-cpu-1t --device cpu --threads 1 for t in linux-x86_64-cpu linux-x86_64-cpu-1t; do printf '{"system": "%s", "hardware": "%s"}\n' "$OS" "$HW" > $W/fdecode/$t.meta; done ;; esac