Archived
sycl: profile_decode.sh reports calls and us a call; the BetterBench runs recorded
The decode profile now prints calls a step and the time a call for every op, from the same two differenced runs. SYCL_PROGRESS records thea869226run that was missing from the table and theb07da2arun: decode 51.8 / 41.4 tok/s (median / 1% low), prefill 1575.6 tok/s @2000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
This commit is contained in:
1 parent
b07da2a121
commit
e74e5b2413
2 files changed
+10
-5
No files matched your search
@@ -22,7 +22,7 @@ work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
port=${PORT:-8139}
|
||||
|
||||
run() { # run TOKENS FLAGS... -> $work/TOKENS.tsv: op, total ms
|
||||
run() { # run TOKENS FLAGS... -> $work/TOKENS.tsv: op, total ms, calls
|
||||
tok=$1; shift
|
||||
RADIANCE_SYCL_TIMING=1 RADIANCE_HOME="$root/build-sycl/radiance_home" \
|
||||
"$root/build-sycl/bin/radiance" --model "$model" --profile-ops --max-num-seqs 1 \
|
||||
@@ -41,15 +41,18 @@ run() { # run TOKENS FLAGS... -> $work/TOKENS.tsv: op, total ms
|
||||
kill -INT $pid
|
||||
wait $pid 2>/dev/null || true
|
||||
n=$(grep -n -E 'calls +total ms' "$work/$tok.log" | tail -1 | cut -d: -f1)
|
||||
awk -v from="$n" 'NR > from && $4 == "dev" { t[$7] += $2 } END { for (o in t) print o, t[o] }' \
|
||||
awk -v from="$n" 'NR > from && $4 == "dev" { t[$7] += $2; c[$7] += $1 }
|
||||
END { for (o in t) print o, t[o], c[o] }' \
|
||||
"$work/$tok.log" | sort > "$work/$tok.tsv"
|
||||
}
|
||||
|
||||
run 1 "$@"
|
||||
run $((steps + 1)) "$@"
|
||||
join "$work/1.tsv" "$work/$((steps + 1)).tsv" | awk -v n="$steps" '
|
||||
{ d = $3 - $2; T += d; a[$1] = d }
|
||||
{ d = $4 - $2; T += d; a[$1] = d; k[$1] = ($5 - $3) / n }
|
||||
END {
|
||||
for (o in a) printf "%8.3f ms/step %5.1f%% %s\n", a[o] / n, 100 * a[o] / T, o
|
||||
for (o in a)
|
||||
printf "%8.3f ms/step %5.1f%% %5.1f calls/step %7.1f us/call %s\n", a[o] / n,
|
||||
100 * a[o] / T, k[o], (k[o] > 0 ? 1000 * a[o] / n / k[o] : 0), o
|
||||
printf "%8.3f ms/step of device time over %d decode steps\n", T / n, n
|
||||
}' | sort -rn
|
||||
Reference in new issue
Block a user