Files
hakmem/benchmarks/scripts/tiny/run_tiny_hot_sweep.sh
Moe Charm (CI) 52386401b3 Debug Counters Implementation - Clean History
Major Features:
- Debug counter infrastructure for Refill Stage tracking
- Free Pipeline counters (ss_local, ss_remote, tls_sll)
- Diagnostic counters for early return analysis
- Unified larson.sh benchmark runner with profiles
- Phase 6-3 regression analysis documentation

Bug Fixes:
- Fix SuperSlab disabled by default (HAKMEM_TINY_USE_SUPERSLAB)
- Fix profile variable naming consistency
- Add .gitignore patterns for large files

Performance:
- Phase 6-3: 4.79 M ops/s (has OOM risk)
- With SuperSlab: 3.13 M ops/s (+19% improvement)

This is a clean repository without large log files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 12:31:14 +09:00

48 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Sweep Tiny hot-path microbench across sizes/batches and save CSV
# Usage: scripts/run_tiny_hot_sweep.sh [cycles]
ROOT_DIR=$(cd "$(dirname "$0")/.." && pwd)
cd "$ROOT_DIR"
cycles=${1:-200000}
echo "[info] Building tiny hot benches (bench_fast)"
make -s bench_fast >/dev/null
TS=$(date +%Y%m%d_%H%M%S)
OUTDIR="bench_results/tiny_hot_${TS}"
mkdir -p "$OUTDIR"
CSV="$OUTDIR/results.csv"
echo "mode,size,batch,cycles,throughput_mops" > "$CSV"
sizes=(8 16 24 32 40 48 56 64 128)
batches=(50 100 200)
run_case() {
local mode="$1"; shift
local size="$1"; shift
local batch="$1"; shift
local cyc="$1"; shift
local bin
if [[ "$mode" == "hakmem" ]]; then bin="./bench_tiny_hot_hakmem"; else bin="./bench_tiny_hot_system"; fi
local out
out=$($bin "$size" "$batch" "$cyc" | sed -n 's/^Throughput: \([0-9.][0-9.]*\) M ops.*/\1/p' || true)
if [[ -n "$out" ]]; then echo "$mode,$size,$batch,$cyc,$out" >> "$CSV"; fi
}
for s in "${sizes[@]}"; do
for b in "${batches[@]}"; do
echo "[run] HAKMEM size=$s batch=$b cycles=$cycles"
run_case hakmem "$s" "$b" "$cycles"
echo "[run] SYSTEM size=$s batch=$b cycles=$cycles"
run_case system "$s" "$b" "$cycles"
done
done
echo "[done] CSV: $CSV"
grep -E '^(mode|hakmem)' "$CSV" | sed -n '1,20p' || true