Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/evidence/amd-speed-20261114/recompute/baseline.py # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / evidence / amd-speed-20261114 / recompute / baseline.py` 56 lines · 4212 bytes Raw Blame History 1 #!/usr/bin/env python3 2 # Baseline: the published run (10:12 UTC) and the same-session repeat (18:50 UTC session), from raw stdout captures. 3 import json, statistics 4 from common import ROOT, Book, omega_run, first_difference 5 6 b = Book('baseline') 7 PUB = 'amd-launch-gap/src/CUDApp-base/evidence/amd-qwen38-native-refusal-`20261113`' # CUDApp `dc536882` clone 8 REP = 'card-evidence' 9 10 pub = [omega_run(ROOT / f'{PUB}/native/sample{i}.stdout') for i in range(1, 6)] 11 pub_ids = pub[0]['ids'] 12 b.check('published 5 runs x 285 steps', all(r['steps'] == 285 for r in pub)) 13 b.check('published ids equal across runs', all(r['ids'] == pub_ids for r in pub)) 14 b.check('published 256 ids', len(pub_ids) == 256) 15 meds = [round(r['decode_ms_median'], 3) for r in pub] 16 b.add('published.run_medians', meds, 'ms/token', 'MEASURED', [f'{PUB}/native/sample{i}.stdout' for i in range(1, 6)], 17 'median of the 255 OMEGA_STEP us values after the 30 prompt steps, per run') 18 pm = b.add('published.decode_ms', round(statistics.median(meds), 3), 'ms/token', 'MEASURED', 19 [f'{PUB}/native/sample{i}.stdout' for i in range(1, 6)], 'median of the five run medians') 20 calc = json.loads((ROOT / f'{PUB}/calculations.json').read_text()) 21 b.check('published equals filed calculations.json', pm == calc['median_decode_ms'], f'{pm} vs {calc["median_decode_ms"]}') 22 b.add('published.prefill_ms', round(statistics.median(r['prefill_ms'] for r in pub), 3), 'ms', 'MEASURED', 23 [f'{PUB}/native/sample{i}.stdout' for i in range(1, 6)], 'median over runs of the sum of the 30 prompt step times') 24 25 rep = [omega_run(ROOT / f'{REP}/uxl-native-run{i}.txt') for i in range(1, 6)] 26 b.check('repeat ids equal published', all(r['ids'] == pub_ids for r in rep)) 27 rmeds = [round(r['decode_ms_median'], 3) for r in rep] 28 b.add('repeat.run_medians', rmeds, 'ms/token', 'MEASURED', [f'{REP}/uxl-native-run{i}.txt' for i in range(1, 6)], 29 'median of 255 decode steps per run') 30 rm = b.add('repeat.decode_ms', round(statistics.median(rmeds), 3), 'ms/token', 'MEASURED', 31 [f'{REP}/uxl-native-run{i}.txt' for i in range(1, 6)], 'median of the five run medians') 32 b.add('repeat.prefill_ms', round(statistics.median(r['prefill_ms'] for r in rep), 3), 'ms', 'MEASURED', 33 [f'{REP}/uxl-native-run{i}.txt' for i in range(1, 6)], 'median over runs of the 30 prompt step times') 34 35 ctl = omega_run(ROOT / f'{REP}/uxl-native-control.txt') 36 b.add('repeat.control_first_difference', first_difference(ctl['ids'], pub_ids), 'index', 'MEASURED', 37 f'{REP}/uxl-native-control.txt', 'first index where the altered-weights plan differs from the published ids') 38 39 g = json.loads((ROOT / f'{REP}/uxl-graph-fresh.json').read_text()) 40 b.check('HIP graph ids equal published', g['ids'] == pub_ids) 41 hip = b.add('repeat.hip_graph_ms', round(g['decode_ms_median'], 3), 'ms/token', 'MEASURED', f'{REP}/uxl-graph-fresh.json', 42 'decode_ms_median of one HIP graph replay process (255 steps)') 43 r = json.loads((ROOT / f'{REP}/uxl-reference-fresh.json').read_text()) 44 b.add('repeat.pytorch_fp8_ms', round(r['decode_ms_median'], 3), 'ms/token', 'MEASURED', f'{REP}/uxl-reference-fresh.json', 45 'decode_ms_median, PyTorch plus transformers on ROCm, FP8 checkpoint') 46 b.add('repeat.pytorch_fp8_first_difference_vs_spark', r['first_divergence'], 'index', 'MEASURED', f'{REP}/uxl-reference-fresh.json', 47 'first_divergence field') 48 b.add('repeat.omega_vs_pytorch_first_difference', first_difference(rep[0]['ids'], r['ids']), 'index', 'MEASURED', 49 [f'{REP}/uxl-native-run1.txt', f'{REP}/uxl-reference-fresh.json'], 'first generated index where Omega and PyTorch (same card, session and checkpoint) differ') 50 s = json.loads((ROOT / f'{REP}/uxl-stock.json').read_text()) 51 smeds = [x['decode_ms_median'] for x in s['rows'] if x['label'].startswith('run')] 52 b.add('repeat.stock_bf16_ms', round(statistics.median(smeds), 3), 'ms/token', 'MEASURED', f'{REP}/uxl-stock.json', 53 'median of the five timed rows (warmup row left out); BF16, 70 prompt tokens, not like for like') 54 b.add('gap.ms', round(rm - hip, 3), 'ms/token', 'DERIVED', [f'{REP}/uxl-native-run1.txt', f'{REP}/uxl-graph-fresh.json'], 55 'repeat.decode_ms minus repeat.hip_graph_ms (same session)') 56 b.close()