interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / evidence / amd-speed-20261114 / recompute / run-all.sh

37 lines · 2116 bytes Raw Blame History
1#!/bin/sh
2# Re-run every recompute script, rebuild ../numbers.json and the session tables of ../REPORT.md, check the report against
3# numbers.json, and prove the run is repeatable: a second complete run (every topic script, numbers.json, the session
4# tables) must leave numbers.json, REPORT.md and every file under out/ byte-identical.
5# With --verify-sums it also requires every file listed in ../SHA256SUMS to verify after the run (use it in a finished
6# folder; while the report is being edited the list is stale by design).
7# Exit 0 only if every step passes.
8set -u
9cd "$(dirname "$0")" || exit 2
10rc=0
11sum() { if command -v sha256sum >/dev/null 2>&1; then sha256sum "$@"; else shasum -a 256 "$@"; fi; }
12build() {
13 for s in baseline launcher kernels fourbit specdecode combined sessions; do
14 python3 -B -E -s "$s.py" || rc=1
15 done
16 python3 -B -E -s build_numbers.py || rc=1
17 python3 -B -E -s render_sessions.py || rc=1
18}
19snapshot() { sum ../numbers.json ../REPORT.md out/*; }
20build
21python3 -B -E -s check_report.py ../REPORT.md ../numbers.json claims.json || rc=1
22python3 -B -E -s check_report.py ../REPORT.md ../numbers.json claims.json --selftest || rc=1
23first=$(snapshot)
24build >/dev/null
25second=$(snapshot)
26if [ "$first" = "$second" ]; then echo "REPEATABLE PASS a second complete run left numbers.json, REPORT.md and out/ ($(ls out | wc -l | tr -d ' ') files) byte-identical"
27else echo "REPEATABLE FAIL a second complete run changed:"; printf '%s\n' "$first" > /tmp/runall-a.$$; printf '%s\n' "$second" > /tmp/runall-b.$$
28 diff /tmp/runall-a.$$ /tmp/runall-b.$$ | sed -n 's/^> / /p'; rm -f /tmp/runall-a.$$ /tmp/runall-b.$$; rc=1; fi
29if [ "${1:-}" = "--verify-sums" ]; then
30 if [ -f ../SHA256SUMS ]; then
31 bad=$( (cd .. && sum -c SHA256SUMS 2>/dev/null) | grep -vc ': OK$')
32 if [ "$bad" = "0" ]; then echo "SUMS PASS every file in SHA256SUMS verifies after the recompute"
33 else echo "SUMS FAIL $bad files in SHA256SUMS do not verify after the recompute"; rc=1; fi
34 else echo "SUMS FAIL ../SHA256SUMS not found"; rc=1; fi
35fi
36echo "RUN-ALL rc=$rc"
37exit $rc