#!/usr/bin/env bash # Summary of the arms of sm120-e2e-ab.sh (run on rnr5090): per arm the client's per-turn decode tok/s and input tokens, the CUPTI turn-5 window per round # (decode_rounds.py of the decode-sass tools: round wall, verify graph GPU span, the families the switches touch), and the sm120 line of the engine log. # summarize.sh [ARM ...] default: every arm directory under /data/leleka-e2e/runs/sm120 set -uo pipefail R=/data/leleka-e2e/runs/sm120 T=/data/leleka-e2e/decode/tools arms=("$@"); [ ${#arms[@]} -gt 0 ] || arms=($(ls $R)) for a in "${arms[@]}"; do d=$R/$a echo "=== $a" grep -a -h "sm120" $d/inference.log 2>/dev/null | head -2 | cut -c1-200 python3 - "$d/long-session.json" <<'PY' import json, sys try: r = json.load(open(sys.argv[1])) print("turns: " + " | ".join("t%s in=%s out=%s ttft=%.1fs dec=%.1f tok/s" % (x.get("turn"), x.get("input_tokens"), x.get("output_tokens"), x.get("ttft_s") or 0, x.get("decode_tok_s") or 0) for x in r)) except Exception as e: print("no long-session.json:", e) PY if [ -d $d/win-turn5 ] || ls $d/win-turn5* >/dev/null 2>&1; then w=$(ls -d $d/win-turn5* | head -1) python3 -I $T/decode_rounds.py $w --big 900 --label $a --tsv $d/rounds.tsv 2>&1 | grep -E "round wall|verify graph GPU span|busy inside|after the verify graph|GPU busy|kernels per round|attn_chunk|attn_merge|qsa_decode|leleka_qsa|gu_swiglu|window_moe|swiglu_entries|quantize_q8_1_kernel|gdn_ab|gdn_alpha|ALL kernels" | cut -c1-150 else echo "no CUPTI window" fi done