aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/041-batches/runs.sh
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-08 15:16:39 +0100
committereunhhu <[email protected]>2026-10-08 15:16:39 +0100
commit7770574b327238213c07fccc813b575277231c61 (patch)
tree9343c511d318cbe76dec626ea9baf52aab538411 /research/experiments/041-batches/runs.sh
parent02925df6da43b6f737671c1957739102cdb49b71 (diff)
downloadpure-7770574b327238213c07fccc813b575277231c61.tar.gz
pure-7770574b327238213c07fccc813b575277231c61.zip
Research 134: batch plans' stage 1 measured (b10 = a6fabf0 against b9, interleaved): knapsack's per-batch cost 0.90 to 0.68 us and knapsack 11.48 to 10.34 ms, short of 025's bars (0.60 us, 10.3 ms): 025 counted the pass's per-instruction head as lookups; sum0 2,330 to 1,822 instructions a batch (bar 1,550); matmul 40.0 to 38.2 ms with the same instructions and BFS 24.04 to 24.31 with 0.2% fewer (placement); sum0's 8.69 to 6.13 ms mostly the compiler now vectorizing the reductions' first loop; the executor alone the same instructions; what is left a batch is the pass's Val handling (stage 2); 041 runs.sh pairs, pairs and counts data
Diffstat (limited to 'research/experiments/041-batches/runs.sh')
-rwxr-xr-xresearch/experiments/041-batches/runs.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/research/experiments/041-batches/runs.sh b/research/experiments/041-batches/runs.sh
index 876f249..4da74fb 100755
--- a/research/experiments/041-batches/runs.sh
+++ b/research/experiments/041-batches/runs.sh
@@ -10,6 +10,11 @@
# runs.sh counts NAME [WORK ...] user-mode instructions and cycles
# of suite-run's 3 rounds, each of
# the two executor ways (icount.c)
+# runs.sh pairs A B ROUNDS TIMES [WORK ...] the batches way of A then B,
+# TIMES turns (interleaved: the
+# medians of A's and B's turns)
+# (A build of another lane count: CPPFLAGS=-DPURE_BATCH_LANES=256 with
+# 040's runs.sh build.)
set -e
here=research/experiments/041-batches
builds=$HOME/.cache/pure-040
@@ -41,7 +46,17 @@ counts)
| sed "s/^{/{\"version\":\"$name\",\"way\":\"$way\",\"work\":\"$work\",/" >> "$here/$day-counts.jsonl"
done
done ;;
-*) echo "runs.sh suite NAME ROUNDS [WORK ...] | counts NAME [WORK ...]" >&2
+pairs)
+ other=$1 rounds=$2 times=$3
+ shift 3
+ for turn in $(seq "$times"); do
+ for version in "$name" "$other"; do
+ quiet
+ PURE_JIT=0 python3 research/guard.py --most 3072 -- "$builds/$version/suite-run" "$builds/$version" "$rounds" "$@" \
+ | grep median | sed "s/^{/{\"version\":\"$version\",\"way\":\"batches\",\"turn\":$turn,/" >> "$here/$day-pairs.jsonl"
+ done
+ done ;;
+*) echo "runs.sh suite NAME ROUNDS [WORK ...] | counts NAME [WORK ...] | pairs A B ROUNDS TIMES [WORK ...]" >&2
exit 2 ;;
esac
# 2026-10-08-lanes.jsonl (research 132): b9's code with BATCH 1024, 512 and