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>
This commit is contained in:
52
archive/experimental_scripts/sweep_tiny_params.sh
Normal file
52
archive/experimental_scripts/sweep_tiny_params.sh
Normal file
@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Sweep Tiny parameters via env for 16–64B and capture throughput.
|
||||
# This keeps code unchanged and only toggles env knobs:
|
||||
# - HAKMEM_TINY_TLS_SLL: 0/1
|
||||
# - HAKMEM_TINY_MAG_CAP: e.g. 128/256/512/1024
|
||||
#
|
||||
# Usage: scripts/sweep_tiny_params.sh [cycles]
|
||||
|
||||
ROOT_DIR=$(cd "$(dirname "$0")/.." && pwd)
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
cycles=${1:-150000}
|
||||
|
||||
make -s bench_fast >/dev/null
|
||||
|
||||
TS=$(date +%Y%m%d_%H%M%S)
|
||||
OUTDIR="bench_results/sweep_tiny_${TS}"
|
||||
mkdir -p "$OUTDIR"
|
||||
CSV="$OUTDIR/results.csv"
|
||||
echo "size,sll,mag_cap,throughput_mops" > "$CSV"
|
||||
|
||||
sizes=(16 32 64)
|
||||
slls=(1 0)
|
||||
mags=(128 256 512 1024 2048)
|
||||
|
||||
run_case() {
|
||||
local size="$1"; shift
|
||||
local sll="$1"; shift
|
||||
local cap="$1"; shift
|
||||
local out
|
||||
HAKMEM_TINY_TLS_SLL="$sll" HAKMEM_TINY_MAG_CAP="$cap" ./bench_tiny_hot_hakmem "$size" 100 "$cycles" \
|
||||
| sed -n 's/^Throughput: \([0-9.][0-9.]*\) M ops.*/\1/p' >"$OUTDIR/tmp.txt" || true
|
||||
out=$(cat "$OUTDIR/tmp.txt" || true)
|
||||
if [[ -n "$out" ]]; then
|
||||
echo "$size,$sll,$cap,$out" >> "$CSV"
|
||||
fi
|
||||
}
|
||||
|
||||
for sz in "${sizes[@]}"; do
|
||||
for sll in "${slls[@]}"; do
|
||||
for cap in "${mags[@]}"; do
|
||||
echo "[sweep] size=$sz sll=$sll cap=$cap cycles=$cycles"
|
||||
run_case "$sz" "$sll" "$cap"
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
echo "[done] CSV: $CSV"
|
||||
grep -E '^(size|16|32|64),' "$CSV" | sed -n '1,30p' || true
|
||||
|
||||
Reference in New Issue
Block a user