-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhero.html
More file actions
93 lines (93 loc) · 6.16 KB
/
Copy pathhero.html
File metadata and controls
93 lines (93 loc) · 6.16 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>compile-lens session report</title>
<style>:root{color-scheme:light dark}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;line-height:1.5;margin:0;padding:0 1rem 4rem;color:#1a1a1a;background:#fafafa}header{max-width:60rem;margin:0 auto;padding:1.5rem 0 .5rem}h1{font-size:1.4rem;margin:0}.sub{color:#666;margin:.25rem 0 0;font-size:.9rem}main{max-width:60rem;margin:0 auto}details{background:#fff;border:1px solid #e2e2e2;border-radius:8px;margin:1rem 0;padding:.5rem 1rem}summary{cursor:pointer;list-style:none}summary h2{display:inline;font-size:1.1rem;margin:0}.body{padding:.5rem 0}dl.meta{display:grid;grid-template-columns:max-content 1fr;gap:.2rem 1rem;margin:0}dl.meta dt{color:#666;font-size:.9rem}dl.meta dd{margin:0;font-variant-numeric:tabular-nums}table{border-collapse:collapse;width:100%;font-size:.9rem}th,td{text-align:left;padding:.35rem .6rem;border-bottom:1px solid #eee}th{color:#666;font-weight:600}code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.85em}.muted{color:#888;font-size:.9rem}.good{color:#1a7f37}.warn{color:#9a6700}h3{font-size:.95rem;margin:.8rem 0 .3rem;color:#444}</style>
</head>
<body>
<header>
<h1>compile-lens session report</h1>
<p class="sub">torch 2.12.0 · 2026-01-01T00:00:00Z</p>
</header>
<main>
<details open id="metadata">
<summary><h2>Session metadata</h2></summary>
<div class="body"><dl class="meta"><dt>torch</dt><dd>2.12.0</dd><dt>session id</dt><dd>00000000-0000-4000-8000-00000000he50</dd></dl></div>
</details>
<details open id="ir-diff">
<summary><h2>IR Diff (base → head)</h2></summary>
<div class="body"><p class="warn">The compiled graph changed: <strong>0</strong> added, <strong>0</strong> removed, <strong>1</strong> modified node(s).</p><dl class="meta"><dt>match coverage</dt><dd>100%</dd><dt>anchor uniqueness</dt><dd>100%</dd></dl><h3>modified (1)</h3>
<table>
<thead><tr><th>node</th><th>op</th><th>what changed</th><th>where</th><th>confidence</th></tr></thead>
<tbody>
<tr><td><code>sub</code></td><td>aten.sub.Tensor</td><td>operands reordered</td><td><code>{repo}/examples/hero_scene.py:89</code></td><td>1.00</td></tr>
</tbody>
</table>
</div>
</details>
<details open id="recompile">
<summary><h2>Recompile summary</h2></summary>
<div class="body"><p><strong>3</strong> recompilation(s), across <strong>1</strong> guard categor(y/ies).</p><p class="muted">Recompiling <code>forward</code> at <code>{repo}/examples/hero_scene.py:86</code>.</p><table>
<thead><tr><th>category</th><th>count</th><th>axis</th><th>observed values</th></tr></thead>
<tbody>
<tr><td>size</td><td>3</td><td><code>x[0]</code></td><td>16→32, 16→64, 16→128</td></tr>
</tbody>
</table>
<h3>Top suggestions</h3>
<ol>
<li>`x` dim 0 keeps changing size — mark it dynamic to stop the recompiles: `torch._dynamo.mark_dynamic(x, 0)` (or compile with `dynamic=True`).<br><span class="muted">evidence: size cluster on x[0] — 3 recompile(s) (values 16→32, 16→64, 16→128)</span></li>
</ol>
</div>
</details>
<details open id="cache-stability">
<summary><h2>Cache stability</h2></summary>
<div class="body"><p class="good">No silently-stale-cache findings — recompilation tracked the state changes.</p></div>
</details>
<details open id="divergence">
<summary><h2>Divergence (eager vs compiled)</h2></summary>
<div class="body"><table>
<thead><tr><th>first divergent layer</th><th>max abs diff</th><th>layers compared</th><th>attributed cause</th></tr></thead>
<tbody>
<tr><td><code>blocks.0.norm</code></td><td>5.033e0</td><td>2</td><td>pass: <code>post_grad_custom_post_pass</code></td></tr>
</tbody>
</table>
</div>
</details>
<details open id="lint">
<summary><h2>Lint (Tool 4)</h2></summary>
<div class="body"><p class="warn">1 candidate pattern(s) from the static scan — not yet escalated. Pass <code>--db <correctness.toml></code> to rate severity and attach issue links.</p>
<table>
<thead><tr><th>pattern</th><th>location</th><th>trigger</th><th>confidence</th></tr></thead>
<tbody>
<tr><td><code>in_place_op_on_alias</code></td><td><code>{repo}/examples/hero_scene.py:96</code></td><td><code>—</code></td><td>ast_match</td></tr>
</tbody>
</table>
</div>
</details>
<details open id="fusion">
<summary><h2>Fusion opportunities (CODA)</h2></summary>
<div class="body"><p class="muted">Algebraic fusions Inductor leaves unfused — opportunities, not applied changes. The speedup is an analytical memory-bound <strong>upper bound for ranking</strong> (real is ~1.05–1.15×); applying one means a fused epilogue kernel.</p>
<table>
<thead><tr><th>pattern</th><th>where</th><th>shape (M×N×K0×K1)</th><th>HBM saved</th><th>≤ speedup</th></tr></thead>
<tbody>
<tr><td>GEMM → +resid → RMSNorm → GEMM <span class="muted">×3</span></td><td><code>{repo}/examples/hero_scene.py:69-72</code></td><td>16×256×64×64</td><td>↓30% (264 KiB → 184 KiB)</td><td><strong>≤ 1.43×</strong></td></tr>
</tbody>
</table>
<p><strong>What to change:</strong> fold per-row 1/rms into the second GEMM epilogue — so the normalized activation never round-trips HBM between the norm and the second GEMM.</p>
<p class="muted"><strong>How to apply:</strong> suggest-only — implement with a fused epilogue kernel (a Triton or CUTLASS epilogue), or check whether <code>torch.compile</code>'s max-autotune already performs it. This tool reads the graph; it never rewrites it or runs a kernel.</p>
</div>
</details>
<details open id="roofline">
<summary><h2>Roofline (Tool 5)</h2></summary>
<div class="body"><p class="muted">No kernel carried the flops/bytes features the roofline model needs (GPU: <code>A100-SXM-80GB</code>).</p></div>
</details>
<details open id="raw">
<summary><h2>Raw artifacts</h2></summary>
<div class="body"><dl class="meta"><dt>schema</dt><dd>0.5.0</dd><dt>recompilations</dt><dd>3</dd><dt>compiled graphs</dt><dd>1</dd><dt>graph breaks</dt><dd>0</dd><dt>iterations</dt><dd>3</dd></dl><p class="muted">The machine-readable <code>.cls.json</code> is the source of truth for this report.</p></div>
</details>
</main>
</body>
</html>