interplane.Get Omega
Read in your language

openaccel-lab

aien-dev/openaccel-lab

Brought by drakestapleton

branch main Branches Tags History

openaccel-lab / site / index.html

156 lines · 10612 bytes Raw Blame History
1<!doctype html>
2<html lang="en">
3<head>
4<meta charset="utf-8">
5<meta name="viewport" content="width=device-width, initial-scale=1">
6<title>OpenAccel Lab: cross-backend kernel conformance board</title>
7<style>
8:root { --bg:#0e1116; --fg:#e6e6e6; --dim:#9aa4b2; --pass:#2e7d4f; --fail:#b3261e; --warn:#a86b00; --na:#3a404a; --line:#2a2f38; }
9body { background:var(--bg); color:var(--fg); font:14px/1.45 system-ui, sans-serif; margin:0; padding:24px; max-width:1400px; }
10h1 { font-size:22px; margin:0 0 4px; } h2 { font-size:17px; margin:28px 0 8px; border-bottom:1px solid var(--line); padding-bottom:4px; }
11p, li { color:var(--dim); max-width:900px; } a { color:#8ab4f8; }
12table { border-collapse:collapse; margin:8px 0; } th, td { border:1px solid var(--line); padding:3px 6px; text-align:left; vertical-align:top; }
13th { background:#161b22; font-weight:600; position:sticky; top:0; }
14td.PASS { background:var(--pass); } td.FAIL, td.RUNTIME_FAIL, td.COMPILE_FAIL, td.TIMEOUT { background:var(--fail); }
15td.COMPILED { background:var(--warn); } td.NOT_RUN, td.NO_SOURCE, td.none { background:var(--na); color:var(--dim); }
16td.flagged { background:var(--pass); } td.missed { background:var(--fail); }
17code { font-size:12px; } .small { font-size:12px; color:var(--dim); } svg text { fill:var(--dim); font-size:11px; }
18</style>
19</head>
20<body>
21<h1>OpenAccel Lab</h1>
22<p>A vendor-neutral, execution-verified conformance and performance lab for accelerator kernels. Every workload has one float64
23reference oracle, a written tolerance contract and the same seeded inputs for every entrant. The entrants are OpenCL C, Triton,
24HIP, CUDA and Omega; none is privileged. Wrong kernels are kept in the lab as controls, and the board shows them being caught.</p>
25<p><b>Read this before reading the numbers.</b> CI timings are host CPU wall-clock times on GitHub runners (OpenCL on PoCL, Triton in
26its interpreter, HIP on HIP-CPU, Omega native AArch64). They show distributions for one runner and are not GPU performance. GPU
27rows appear only from labelled receipts, each linked to its evidence. Timings are shown as min / p10 / p25 / median / p75 / p90 / max
28with the sample count, never as means.</p>
29<p id="meta" class="small"></p>
30
31<h2>Conformance matrix</h2>
32<p>Cell: status over every case and seed (count), and the median share of the tolerance bound used (err ratio; 0 = bit-exact, 1 = at the bound).
33COMPILED means the CUDA source built with nvcc on a runner with no GPU and was not run.</p>
34<div id="matrix"></div>
35
36<h2>Negative controls</h2>
37<p>Each control is a workload with one defect written into every entrant (a dropped term, an exclusive scan, a softmax without max subtraction).
38Green means the lab flagged it on that backend; red means a wrong kernel passed.</p>
39<div id="controls"></div>
40
41<h2>Cross-backend agreement</h2>
42<p>For each workload: how many cases produced 1, 2, 3 or more distinct output byte streams across backends. Bitwise agreement is not
43required, only the tolerance contract; this shows where entrants differ in rounding.</p>
44<div id="agree"></div>
45
46<h2>Timing distributions (default case)</h2>
47<p>Box: p25 to p75, line at median; whiskers p10 to p90; dots min and max. Log scale, nanoseconds.</p>
48<div id="timing"></div>
49
50<h2>Minimised failures</h2>
51<p>For every failing record the CI runs <code>oal-shrink</code>, which reduces the shape while the failure persists and prints the command that reproduces it.</p>
52<div id="shrunk"></div>
53
54<h2>GPU receipts</h2>
55<p>Rows from real GPUs. Each row carries its provenance label; none of them is a CI result.</p>
56<div id="gpu"></div>
57
58<h2>Source</h2>
59<p><a href="https://github.com/aien-dev/openaccel-lab">github.com/aien-dev/openaccel-lab</a> (Apache-2.0 with LLVM exception). Data file: <a href="data.json">data.json</a>.</p>
60
61<script>
62"use strict";
63const esc = s => String(s ?? "").replace(/[&<>"]/g, c => ({"&":"&amp;","<":"&lt;",">":"&gt;","\"":"&quot;"}[c]));
64const fmt = ns => ns >= 1e9 ? (ns/1e9).toFixed(2)+" s" : ns >= 1e6 ? (ns/1e6).toFixed(2)+" ms" : ns >= 1e3 ? (ns/1e3).toFixed(1)+" µs" : ns.toFixed(0)+" ns";
65function worst(st) {
66 for (const k of ["FAIL","RUNTIME_FAIL","COMPILE_FAIL","TIMEOUT","PASS","COMPILED","NOT_RUN","NO_SOURCE"]) if (st[k]) return k;
67 return "none";
68}
69function box(d, lo, hi, w) {
70 if (!d) return "";
71 const x = v => 4 + (Math.log10(v) - lo) / (hi - lo) * (w - 8);
72 const q = d.q;
73 return `<svg width="${w}" height="18"><line x1="${x(q[1])}" x2="${x(q[5])}" y1="9" y2="9" stroke="#9aa4b2"/>` +
74 `<rect x="${x(q[2])}" y="3" width="${Math.max(1, x(q[4]) - x(q[2]))}" height="12" fill="#3d6fb6"/>` +
75 `<line x1="${x(q[3])}" x2="${x(q[3])}" y1="2" y2="16" stroke="#fff" stroke-width="2"/>` +
76 `<circle cx="${x(q[0])}" cy="9" r="2" fill="#9aa4b2"/><circle cx="${x(q[6])}" cy="9" r="2" fill="#9aa4b2"/></svg>`;
77}
78fetch("data.json").then(r => r.json()).then(D => {
79 document.getElementById("meta").textContent =
80 `Generated ${new Date(D.generated * 1000).toISOString()} from lab commit ${D.lab_commit || "unknown"}; ${D.cells.length} cells.`;
81 const cols = [...new Set(D.cells.filter(c => !c.receipt).map(c => c.backend + "@" + c.runner))].sort();
82 const byKey = {};
83 for (const c of D.cells) byKey[c.workload + "|" + c.backend + "@" + c.runner] = c;
84 const names = Object.keys(D.workloads).filter(n => !D.workloads[n].control).sort();
85 const ctl = Object.keys(D.workloads).filter(n => D.workloads[n].control).sort();
86 let h = "<table><tr><th>workload</th><th>family</th>" + cols.map(c => `<th>${esc(c)}</th>`).join("") + "</tr>";
87 for (const n of names) {
88 h += `<tr><td title="${esc(D.workloads[n].summary)}">${esc(n)}</td><td>${esc(D.workloads[n].family)}</td>`;
89 for (const col of cols) {
90 const c = byKey[n + "|" + col];
91 if (!c) { h += `<td class="none">-</td>`; continue; }
92 const w = worst(c.status), cnt = Object.entries(c.status).map(([k, v]) => `${k} ${v}`).join(", ");
93 const er = c.err ? ` · err ${c.err.q[3].toPrecision(2)}` : "";
94 const tip = cnt + (c.first_failure ? " | first failure: " + JSON.stringify(c.first_failure) : "") + (c.versions.length ? " | " + c.versions.join("; ") : "");
95 h += `<td class="${w}" title="${esc(tip)}">${esc(w)}${esc(er)}</td>`;
96 }
97 h += "</tr>";
98 }
99 document.getElementById("matrix").innerHTML = h + "</table>";
100
101 h = "<table><tr><th>control</th><th>judged by</th>" + cols.map(c => `<th>${esc(c)}</th>`).join("") + "</tr>";
102 for (const n of ctl) {
103 h += `<tr><td title="${esc(D.workloads[n].summary)}">${esc(n)}</td><td>${esc(D.workloads[n].reference_from)}</td>`;
104 for (const col of cols) {
105 const c = byKey[n + "|" + col];
106 if (!c) { h += `<td class="none">-</td>`; continue; }
107 const st = c.status, ran = (st.PASS || 0) + (st.FAIL || 0) + (st.RUNTIME_FAIL || 0) + (st.TIMEOUT || 0);
108 const cls = !ran ? "none" : st.PASS ? "missed" : "flagged";
109 const label = !ran ? worst(st) : st.PASS ? `MISSED ${st.PASS}/${ran}` : `flagged ${ran}/${ran}`;
110 h += `<td class="${cls}" title="${esc(JSON.stringify(c.first_failure))}">${esc(label)}</td>`;
111 }
112 h += "</tr>";
113 }
114 document.getElementById("controls").innerHTML = h + "</table>";
115
116 h = "<table><tr><th>workload</th><th>cases</th><th>distinct output streams per case (cases)</th></tr>";
117 for (const n of names) {
118 const a = D.agreement[n]; if (!a) continue;
119 h += `<tr><td>${esc(n)}</td><td>${a.cases}</td><td>${Object.entries(a.distinct_hist).sort().map(([k, v]) => `${k}: ${v}`).join(" · ")}</td></tr>`;
120 }
121 document.getElementById("agree").innerHTML = h + "</table>";
122
123 h = "";
124 for (const n of names) {
125 const cs = D.cells.filter(c => c.workload === n && c.time_default);
126 if (!cs.length) continue;
127 const all = cs.flatMap(c => [c.time_default.q[0], c.time_default.q[6]]).filter(v => v > 0);
128 const lo = Math.floor(Math.log10(Math.min(...all))), hi = Math.ceil(Math.log10(Math.max(...all)) + 1e-9);
129 h += `<h3 class="small">${esc(n)} <span class="small">${esc(JSON.stringify(D.workloads[n].params))}</span></h3><table><tr><th>entrant @ runner</th><th>n</th><th>min</th><th>median</th><th>max</th><th>10^${lo} … 10^${hi} ns</th><th>label</th></tr>`;
130 for (const c of cs) {
131 const q = c.time_default.q;
132 h += `<tr><td>${esc(c.backend + "@" + c.runner)}</td><td>${c.time_default.n}</td><td>${fmt(q[0])}</td><td>${fmt(q[3])}</td><td>${fmt(q[6])}</td><td>${box(c.time_default, lo, hi, 320)}</td><td class="small">${esc(c.time_label)}${c.receipt ? " · " + esc(c.receipt) : ""}</td></tr>`;
133 }
134 h += "</table>";
135 }
136 document.getElementById("timing").innerHTML = h;
137
138 h = D.shrunk.length ? "<table><tr><th>workload</th><th>backend</th><th>status</th><th>from</th><th>to</th><th>reproduce</th></tr>" +
139 D.shrunk.map(s => `<tr><td>${esc(s.workload)}</td><td>${esc(s.backend)}</td><td>${esc(s.status)}</td><td>${esc(JSON.stringify(s.original_params))}</td><td>${esc(JSON.stringify(s.params))}</td><td><code>${esc(s.reproduce)}</code></td></tr>`).join("") + "</table>" : "<p>None.</p>";
140 document.getElementById("shrunk").innerHTML = h;
141
142 const gpuCells = D.cells.filter(c => c.receipt);
143 h = "";
144 if (gpuCells.length) {
145 h += "<table><tr><th>workload</th><th>entrant @ machine</th><th>status</th><th>median time</th><th>evidence</th><th>receipt</th></tr>" +
146 gpuCells.map(c => `<tr><td>${esc(c.workload)}</td><td>${esc(c.backend + "@" + c.runner)}</td><td class="${worst(c.status)}">${esc(JSON.stringify(c.status))}</td><td>${c.time_default ? fmt(c.time_default.q[3]) : "-"}</td><td class="small">${esc(c.evidence)} · ${esc(c.time_label)}</td><td><a href="https://github.com/aien-dev/openaccel-lab/blob/main/${esc(c.receipt)}">${esc(c.receipt)}</a></td></tr>`).join("") + "</table>";
147 }
148 if (D.imported_gpu.length) {
149 h += "<table><tr><th>GPU</th><th>cc</th><th>driver</th><th>kernel</th><th>verdict</th><th>checked</th><th>mismatches</th><th>label</th><th>receipt</th></tr>" +
150 D.imported_gpu.map(g => `<tr><td>${esc(g.gpu)}</td><td>${esc(g.cc)}</td><td>${esc(g.driver)}</td><td>${esc(g.kernel)}</td><td>${esc(g.verdict)}</td><td>${esc(g.checked)}</td><td>${esc(g.mismatches)}</td><td class="small">${esc(g.label)}; ${esc(g.provider)}</td><td><a href="https://github.com/aien-dev/openaccel-lab/blob/main/${esc(g.receipt)}">${esc(g.receipt_sha256 ? g.receipt_sha256.slice(0, 12) : g.receipt)}</a></td></tr>`).join("") + "</table>";
151 }
152 document.getElementById("gpu").innerHTML = h || "<p>None yet.</p>";
153}).catch(e => { document.getElementById("meta").textContent = "data.json failed to load: " + e; });
154</script>
155</body>
156</html>