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
CUDApp / evidence / amd-speed-20261114 / recompute / render_sessions.py
| 1 | #!/usr/bin/env python3 |
| 2 | # Write the two card-session tables of REPORT.md section 12 from out/sessions-table.json (between the two marker lines). |
| 3 | # REPORT.md is rewritten only if its bytes would change. |
| 4 | import json, sys |
| 5 | from common import HERE, OUT |
| 6 | |
| 7 | rep = HERE.parent / 'REPORT.md' |
| 8 | rows = json.loads((OUT / 'sessions-table.json').read_text()) |
| 9 | BEGIN, END = '<!-- sessions:begin (generated by recompute/render_sessions.py) -->', '<!-- sessions:end -->' |
| 10 | lines = [BEGIN, |
| 11 | '| Session | UTC start | Lane | What ran | State |', |
| 12 | '|---|---|---|---|---|'] |
| 13 | for r in rows: |
| 14 | lines.append(f"| {r['session'][-8:]} | {r['utc_start']} | {r['lane']} | {r['ran']} | {r['state']} |") |
| 15 | lines += ['', 'Evidence file and hash for each session (full session name; paths under `raw/`):', '', |
| 16 | '| Session | Evidence | sha256 |', '|---|---|---|'] |
| 17 | for r in rows: |
| 18 | h = f"`{r['sha256']}`" if r['sha256'] else 'not downloaded' |
| 19 | lines.append(f"| `{r['session']}` | `{r['evidence']}` | {h} |") |
| 20 | lines.append(END) |
| 21 | text = rep.read_text() |
| 22 | if BEGIN not in text or END not in text: |
| 23 | sys.exit('RENDER FAIL: markers missing in REPORT.md') |
| 24 | head, rest = text.split(BEGIN, 1) |
| 25 | tail = rest.split(END, 1)[1] |
| 26 | new = head + '\n'.join(lines) + tail |
| 27 | if new != text: |
| 28 | rep.write_text(new) |
| 29 | print(f'RENDER sessions rows={len(rows)} {"unchanged" if new == text else "written"}') |