Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
259 lines (234 loc) · 13.6 KB
/
Copy pathindex.html
File metadata and controls
259 lines (234 loc) · 13.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GPU-Solver — self-evolving GPU kernel optimizer</title>
<style>
:root {
--fg:#1a1a1a; --mut:#5c5c5c; --accent:#b8860b; --card:#fafafa; --line:#e2e2e2;
--bg:#ffffff; --pill-bg:#fff3cc; --pill-line:#e6c26a; --code-bg:#f0f0f0;
--on:#2f7a3d; --off:#8a1f1f; --on-bg:#e7f5ea; --off-bg:#fbeaea;
}
@media (prefers-color-scheme: dark) {
:root {
--fg:#e8e8e8; --mut:#a3a3a3; --accent:#e0b23d; --card:#1b1b1b; --line:#333;
--bg:#111; --pill-bg:#3a3110; --pill-line:#6b5a1c; --code-bg:#232323;
--on:#5fd97a; --off:#f28b8b; --on-bg:#173321; --off-bg:#3a1c1c;
}
}
:root[data-theme="dark"] {
--fg:#e8e8e8; --mut:#a3a3a3; --accent:#e0b23d; --card:#1b1b1b; --line:#333;
--bg:#111; --pill-bg:#3a3110; --pill-line:#6b5a1c; --code-bg:#232323;
--on:#5fd97a; --off:#f28b8b; --on-bg:#173321; --off-bg:#3a1c1c;
}
:root[data-theme="light"] {
--fg:#1a1a1a; --mut:#5c5c5c; --accent:#b8860b; --card:#fafafa; --line:#e2e2e2;
--bg:#ffffff; --pill-bg:#fff3cc; --pill-line:#e6c26a; --code-bg:#f0f0f0;
--on:#2f7a3d; --off:#8a1f1f; --on-bg:#e7f5ea; --off-bg:#fbeaea;
}
* { box-sizing:border-box; }
body { margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif; color:var(--fg); line-height:1.6; background:var(--bg); }
.wrap { max-width:760px; margin:0 auto; padding:44px 20px 64px; }
/* ---- top ---- */
h1 { font-size:28px; margin:0 0 8px; letter-spacing:-0.01em; }
.lede { color:var(--mut); font-size:16px; margin:0 0 22px; max-width:60ch; }
.stats { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:0 0 24px; }
.stat { border:1px solid var(--line); border-radius:10px; padding:14px 12px; text-align:center; background:var(--card); }
.stat .num { font-size:22px; font-weight:700; color:var(--accent); line-height:1.2; }
.stat .lbl { font-size:12px; color:var(--mut); margin-top:3px; }
.arch { border:1px solid var(--line); border-radius:10px; padding:14px; background:var(--card); margin:0 0 8px; }
.arch img { width:100%; height:auto; display:block; }
.arch-cap { font-size:12.5px; color:var(--mut); text-align:center; margin:8px 0 0; }
/* ---- sections ---- */
section { margin-top:46px; }
h2 { font-size:20px; margin:0 0 4px; }
.h2sub { color:var(--mut); font-size:13.5px; margin:0 0 16px; }
.card { border:1px solid var(--line); border-radius:10px; background:var(--card); padding:16px; margin:0 0 4px; }
.card img { width:100%; height:auto; display:block; }
.cap { font-size:13px; color:var(--mut); margin:10px 2px 0; }
.cap b { color:var(--fg); }
code { background:var(--code-bg); padding:1px 5px; border-radius:4px; font-size:12.5px; }
a { color:#3172d8; }
@media (prefers-color-scheme: dark) { a { color:#7aa6e8; } }
:root[data-theme="dark"] a { color:#7aa6e8; }
:root[data-theme="light"] a { color:#3172d8; }
/* ---- toggle interaction ---- */
.toggle-box { border:1px solid var(--line); border-radius:12px; background:var(--card); padding:20px; }
.toggle-row { display:flex; align-items:center; gap:14px; margin-bottom:16px; flex-wrap:wrap; }
.switch { position:relative; display:inline-block; width:56px; height:30px; flex:0 0 auto; }
.switch input { opacity:0; width:0; height:0; }
.slider { position:absolute; cursor:pointer; inset:0; background:var(--off); border-radius:30px; transition:.25s; }
.slider::before { content:""; position:absolute; height:24px; width:24px; left:3px; bottom:3px; background:#fff; border-radius:50%; transition:.25s; }
.switch input:checked + .slider { background:var(--on); }
.switch input:checked + .slider::before { transform:translateX(26px); }
.toggle-label { font-weight:700; font-size:15px; }
.toggle-state { font-size:13px; color:var(--mut); }
.rule-table { width:100%; border-collapse:collapse; font-size:13.5px; }
.rule-table th, .rule-table td { border:1px solid var(--line); padding:8px 10px; text-align:left; }
.rule-table th { background:var(--code-bg); font-weight:600; }
.rule-row { transition:background .3s, opacity .3s; }
.rule-row.retired { opacity:0.45; text-decoration:line-through; }
.rule-row.active-fire { background:var(--on-bg); }
.badge { display:inline-block; font-size:11px; font-weight:700; padding:1px 8px; border-radius:9px; }
.badge.retire { background:var(--off-bg); color:var(--off); }
.badge.fire { background:var(--on-bg); color:var(--on); }
.badge.stuck { background:var(--off-bg); color:var(--off); }
.result-line { margin-top:14px; padding-top:14px; border-top:1px dashed var(--line); font-size:14px; }
.result-line .best { font-weight:700; }
.result-line.on .best { color:var(--on); }
.result-line.off .best { color:var(--off); }
/* ---- limits ---- */
.limits { border:1px solid var(--line); border-radius:10px; background:var(--card); padding:16px 18px; }
.limits ul { margin:0; padding-left:20px; font-size:14px; }
.limits li { margin:8px 0; }
/* ---- footer ---- */
footer { margin-top:52px; padding-top:20px; border-top:1px solid var(--line); font-size:13.5px; color:var(--mut); }
.neighbors { display:flex; gap:10px; flex-wrap:wrap; margin:12px 0 4px; }
.neighbors a { border:1px solid var(--line); border-radius:8px; padding:8px 12px; text-decoration:none; color:var(--fg); font-size:13.5px; background:var(--card); }
.neighbors a:hover { border-color:var(--accent); }
.neighbors .tag { color:var(--mut); }
</style>
</head>
<body>
<div class="wrap">
<h1>GPU-Solver</h1>
<p class="lede">A GPU-kernel optimization loop whose <b>classification rule table evolves from measurement feedback</b> —
a rule that keeps failing is retired by measurement, not by an LLM's judgment call.</p>
<div class="stats">
<div class="stat"><div class="num">6.4×</div><div class="lbl">matmul gain (fp32 → TF32, A100)</div></div>
<div class="stat"><div class="num">5.75×</div><div class="lbl">evolution ON vs OFF, endpoint</div></div>
<div class="stat"><div class="num">0</div><div class="lbl">cases evolution made things worse</div></div>
</div>
<div class="arch">
<img src="charts/architecture.svg" alt="Architecture: generate, gate, profile, match, ledger, evolve loop; orange feedback edges from evolve back into the rule table"/>
</div>
<p class="arch-cap">One round = generate → gate → profile → match → ledger → evolve. The orange edges
feeding back into <code>rules</code> are the feedback edge static-rule prior art doesn't have.</p>
<section>
<h2>Try it: evolution ON vs OFF</h2>
<p class="h2sub">Same variant pool, same problem (<code>kb_matmul_scalar</code>, real A100 run). Only the evolver differs.</p>
<div class="toggle-box">
<div class="toggle-row">
<label class="switch">
<input type="checkbox" id="evoToggle" checked/>
<span class="slider"></span>
</label>
<span class="toggle-label">Evolution</span>
<span class="toggle-state" id="toggleState">ON — rule table updates from measurement</span>
</div>
<table class="rule-table">
<thead>
<tr><th>Round</th><th>Rule fired</th><th>Signal</th><th>Outcome</th></tr>
</thead>
<tbody id="ruleBody">
<!-- filled by JS -->
</tbody>
</table>
<div class="result-line on" id="resultLine">
Best latency: <span class="best">55.5 µs</span> — misfire retired at round 4, <code>uncoalesced</code> fired next (load_eff 41.7% measured), tensor cores excluded (FFMA).
</div>
</div>
</section>
<section>
<h2>Gain axis — matmul 6.4×</h2>
<p class="h2sub">measure → hypothesize → rewrite → faster kernel (A100)</p>
<div class="card"><img src="charts/gain.svg" alt="matmul fp32 9.6ms to TF32 1.5ms, 6.4x speedup"/></div>
<p class="cap">fp32 <code>ampere_sgemm</code> 9.6 ms → TF32 <code>cutlass_tensorop</code> 1.5 ms = <b>6.4×</b>.
Kernel name changed (sgemm ≠ tensorop) — a genuinely different kernel was selected, not a flag flip.
Same contract on batched GEMM: <b>4.5×</b> (2631 → 580 µs).</p>
</section>
<section>
<h2>Endpoint — evolution ON beats OFF</h2>
<p class="h2sub">retire opens the path to gain — reproduced 3× (5.82× / 5.78× / 5.75×)</p>
<div class="card"><img src="charts/endpoint.svg" alt="evolution ON best 55.5us vs OFF best 319.1us, 5.75x, kb_matmul_scalar"/></div>
<p class="cap">Evolution <b>OFF</b> stays trapped on a misfiring rule forever: <b>319.1 µs</b>.
Evolution <b>ON</b>: failures accumulate → <b>retire</b> → next eligible rule fires → <b>55.5 µs = 5.75×</b>.
Same callback, same variant pool — the only difference is the evolver.</p>
</section>
<section>
<h2>Rule retirement — the mechanism itself</h2>
<p class="h2sub">evolution ON retires the false rule at round 4; OFF never retires (T4, 8 rounds)</p>
<div class="card"><img src="charts/retire.svg" alt="evolution ON retires the false rule at round 4 (retire=1); OFF never retires (retire=0); latency flat on both"/></div>
<p class="cap">Latency is flat on <i>both</i> tracks (T4 fp32 ceiling) — the difference is the retire itself,
not speed. This is the step static-rule prior art structurally cannot do.</p>
</section>
<section>
<h2>Limits / not proven</h2>
<div class="limits">
<ul>
<li><b>Sample size is small.</b> The natural multi-problem batch is 4 problems (1 headroom + 3
bandwidth-ceiling). The batch driver already scales to KernelBench's 250-problem set —
running it is seed-wrapping work, not new mechanism, and has not been done.</li>
<li><b>"Both axes as one event" is not claimed.</b> Retire (rule A's event) and gain (rule B's
event) are sequential by construction. What's proven is the endpoint of the causal chain,
not simultaneity.</li>
<li><b>No SOTA performance claim.</b> The differentiator is interpretable, auditable, evolving
judgment — orthogonal to absolute kernel performance.</li>
<li><b>"Reproduced 3 runs" means the same procedure re-run 3 times</b>, not verification by an
isolated second party from raw artifacts alone.</li>
<li><b>Rule-firing correctness has not been adversarially tested</b> against out-of-distribution
kernels.</li>
</ul>
</div>
</section>
<footer>
Source: <a href="https://github.com/alexxony/gpu-solver-loop">github.com/alexxony/gpu-solver-loop</a>
· Full methodology: <a href="https://github.com/alexxony/gpu-solver-loop/blob/master/README.md">README</a>
<div class="neighbors">
<a href="https://github.com/alexxony/compiler-thermal">compiler-thermal <span class="tag">— thermal-aware compilation, same loop</span></a>
<a href="https://github.com/alexxony/hbm-build">hbm-build <span class="tag">— Icepak thermal ground truth</span></a>
</div>
</footer>
</div>
<script>
(function () {
var toggle = document.getElementById('evoToggle');
var stateLabel = document.getElementById('toggleState');
var ruleBody = document.getElementById('ruleBody');
var resultLine = document.getElementById('resultLine');
// real measured rows: loop/run_gain_hypcond.py, kb_matmul_scalar, A100
var rowsOn = [
{ round: '1–3', rule: 'fp32_no_tensorcore', signal: 'tc=False, occ low', outcome: 'misfire ×3', cls: '' },
{ round: '4', rule: 'fp32_no_tensorcore', signal: '4th consecutive fail', outcome: 'RETIRE', cls: 'retired', badge: 'retire' },
{ round: '5', rule: 'uncoalesced', signal: 'load_eff 41.7% (measured)', outcome: 'fires → K-tiled coalesced load', cls: 'active-fire', badge: 'fire' },
{ round: '6', rule: 'tensorcore_saturated', signal: 'FFMA path, tc excluded', outcome: 'STOP — 55.5 µs', cls: 'active-fire', badge: 'fire' }
];
var rowsOff = [
{ round: '1–3', rule: 'fp32_no_tensorcore', signal: 'tc=False, occ low', outcome: 'misfire ×3', cls: '' },
{ round: '4–12', rule: 'fp32_no_tensorcore', signal: 'same misfire repeats', outcome: 'STUCK — never retired', cls: 'retired', badge: 'stuck' },
{ round: 'end', rule: '(none eligible)', signal: '—', outcome: 'best stays 319.1 µs', cls: '' }
];
function badgeHtml(b) {
if (!b) return '';
var text = b === 'retire' ? 'RETIRE' : (b === 'fire' ? 'FIRE' : 'STUCK');
return ' <span class="badge ' + b + '">' + text + '</span>';
}
function render(on) {
var rows = on ? rowsOn : rowsOff;
ruleBody.innerHTML = rows.map(function (r) {
return '<tr class="rule-row ' + r.cls + '">' +
'<td>' + r.round + '</td>' +
'<td><code>' + r.rule + '</code></td>' +
'<td>' + r.signal + '</td>' +
'<td>' + r.outcome + badgeHtml(r.badge) + '</td>' +
'</tr>';
}).join('');
if (on) {
stateLabel.textContent = 'ON — rule table updates from measurement';
resultLine.className = 'result-line on';
resultLine.innerHTML = 'Best latency: <span class="best">55.5 µs</span> — misfire retired at round 4, ' +
'<code>uncoalesced</code> fired next (load_eff 41.7% measured), tensor cores excluded (FFMA).';
} else {
stateLabel.textContent = 'OFF — rule table is static, never updates';
resultLine.className = 'result-line off';
resultLine.innerHTML = 'Best latency: <span class="best">319.1 µs</span> — the misfiring rule\'s ' +
'prescription (TF32) is physically inert on this hand-written kernel; it fires forever because nothing retires it.';
}
}
toggle.addEventListener('change', function () { render(toggle.checked); });
render(toggle.checked);
})();
</script>
</body>
</html>