<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[实测报告:RTX 3080 20GB (GA102) 解锁前后 cuBLAS GEMM 对比]]></title><description><![CDATA[<p dir="auto"><a href="https://lcz.me/topic/2488/22">https://lcz.me/topic/2488/22</a> 中没有对魔改20G 3080进行测试，我来补充</p>
<blockquote>
<p dir="auto">v67/PLM 早启动解锁(gpu-unlock 1.0.0)实测。4 种精度 × 3 种规模(4096/8192/16384,各 5 预热 + 12 次计时取中位数),解锁前后各 12 组有效测量,波动 &lt;4%。</p>
</blockquote>
<h2>环境</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项目</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>GPU</td>
<td>NVIDIA GeForce RTX 3080 20GB(改装版,GA102,10DE:2206,68 SM)</td>
</tr>
<tr>
<td>驱动</td>
<td>610.57.04(open kernel modules,DKMS)</td>
</tr>
<tr>
<td>CUDA</td>
<td>13.3.1</td>
</tr>
<tr>
<td>系统</td>
<td>Omarchy 4.0.4(Arch 系),内核 7.2.5-3-omarchy</td>
</tr>
<tr>
<td>引导</td>
<td>Limine + UKI,内核参数 <code>gpu_unlock.targets=all</code></td>
</tr>
<tr>
<td>功耗上限</td>
<td>320 W(两轮一致)</td>
</tr>
<tr>
<td>解锁日志</td>
<td><code>pci 0000:07:00.0: gpu_unlock: unlocked</code></td>
</tr>
<tr>
<td>基准工具</td>
<td>自编译 cuBLAS 13 GEMM(<code>nvcc -arch=sm_86</code>,5 预热 + 12 次计时取中位数)</td>
</tr>
</tbody>
</table>
<h2>方法</h2>
<p dir="auto">直接调用 cuBLAS 13 的 GEMM(单卡,FP32 累加语义):</p>
<ul>
<li><strong>FP32</strong>:<code>cublasSgemm</code>(CUDA 核 FFMA)</li>
<li><strong>TF32</strong>:<code>cublasGemmEx</code> + <code>CUBLAS_COMPUTE_32F_FAST_TF32</code>(张量核)</li>
<li><strong>FP16</strong>:<code>cublasGemmEx</code> + <code>CUBLAS_COMPUTE_16F</code>(fp16 输入/输出,内部 FP32 累加)</li>
<li><strong>BF16</strong>:<code>cublasGemmEx</code> + BF16 输入 + <code>CUBLAS_COMPUTE_32F</code>(张量核 BF16 路径,FP32 输出)</li>
</ul>
<p dir="auto">矩阵规模 N×N,N = 4096 / 8192 / 16384,报告 TFLOPS 为各次计时中位数。测量前有小规模矩阵正确性校验,四种精度全部通过。</p>
<h2>结果(中位数 TFLOPS)</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>精度</th>
<th>规模</th>
<th>解锁前</th>
<th>解锁后</th>
<th>加速</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>FP32 (SGEMM)</strong></td>
<td>4096</td>
<td>21.6</td>
<td>21.5</td>
<td>1.00x</td>
</tr>
<tr>
<td> </td>
<td>8192</td>
<td>21.2</td>
<td>21.2</td>
<td>1.00x</td>
</tr>
<tr>
<td> </td>
<td>16384</td>
<td>21.3</td>
<td>21.3</td>
<td>1.00x</td>
</tr>
<tr>
<td><strong>TF32</strong></td>
<td>4096</td>
<td>31.0</td>
<td>58.3</td>
<td>1.88x</td>
</tr>
<tr>
<td> </td>
<td>8192</td>
<td>31.6</td>
<td>52.2</td>
<td>1.65x</td>
</tr>
<tr>
<td> </td>
<td>16384</td>
<td>31.4</td>
<td>53.4</td>
<td>1.70x</td>
</tr>
<tr>
<td><strong>FP16</strong></td>
<td>4096</td>
<td>111.7</td>
<td>111.5</td>
<td>1.00x</td>
</tr>
<tr>
<td> </td>
<td>8192</td>
<td>107.6</td>
<td>109.1</td>
<td>1.01x</td>
</tr>
<tr>
<td> </td>
<td>16384</td>
<td>110.5</td>
<td>111.0</td>
<td>1.00x</td>
</tr>
<tr>
<td><strong>BF16</strong></td>
<td>4096</td>
<td>61.6</td>
<td>112.9</td>
<td>1.83x</td>
</tr>
<tr>
<td> </td>
<td>8192</td>
<td>64.1</td>
<td>106.8</td>
<td>1.67x</td>
</tr>
<tr>
<td> </td>
<td>16384</td>
<td>63.9</td>
<td>105.3</td>
<td>1.65x</td>
</tr>
</tbody>
</table>
<h2>各精度平均加速</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>精度</th>
<th>平均加速</th>
</tr>
</thead>
<tbody>
<tr>
<td>FP32 (SGEMM)</td>
<td>1.00x</td>
</tr>
<tr>
<td>TF32</td>
<td>1.74x</td>
</tr>
<tr>
<td>FP16</td>
<td>1.01x</td>
</tr>
<tr>
<td>BF16</td>
<td>1.72x</td>
</tr>
</tbody>
</table>
<h2>解读</h2>
<ul>
<li><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=ec85ec55bc1" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 解锁生效:主打的 BF16 / TF32 GEMM 分别获得 <strong>+65% ~ +88%</strong> 提升(BF16 4096³ 从 61.6 → 112.9 TFLOPS,TF32 从 31.0 → 58.3 TFLOPS),与官方报告的"接近 2 倍"一致。</li>
<li><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=ec85ec55bc1" class="not-responsive emoji emoji-android emoji--warning" style="height:1.4em;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ FP16 / FP32 基本无变化:这两个精度在解锁前已顶到本卡的性能平台，也是原版3080解锁后的结果（神奇：魔改卡3080默认解锁fp16算力了）。(FP16 ≈ 110 TFLOPS,FP32 ≈ 21.3 TFLOPS)。解锁后 BF16 恰好抬升到与 FP16 相同的平台值(~110 TFLOPS),说明平台由 320 W 功耗上限 / 其他瓶颈决定,而非 FMA 发放速率。</li>
<li><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4c8.png?v=ec85ec55bc1" class="not-responsive emoji emoji-android emoji--chart_with_upwards_trend" style="height:1.4em;width:auto;vertical-align:middle" title="📈" alt="📈" /> 实用收益:BF16 训练/推理、TF32 混合精度矩阵运算受益最大;纯 FP32 与 FP16 负载在你这张卡上不受影响(功耗余量更大的 3090 Ti 上 FP16 也有 +35%,见上游报告)。</li>
</ul>
<h2>参考</h2>
<ul>
<li>项目:<a href="https://github.com/Zagitta/gpu-unlock" rel="nofollow ugc">Zagitta/gpu-unlock</a>(v67/PLM 早驱动解锁,module GPL-2.0)</li>
<li>同型号先例:<a href="https://github.com/Zagitta/gpu-unlock/issues/10" rel="nofollow ugc">Issue #10 — Successful unlock on 3080 20GB</a></li>
<li>3080 Ti 数据:<a href="https://github.com/Zagitta/gpu-unlock/issues/2" rel="nofollow ugc">Issue #2 — BF16 71.6→114,TF32 35.7→65.3</a></li>
</ul>
]]></description><link>https://lcz.me/topic/2521</link><generator>RSS for Node</generator><lastBuildDate>Sat, 24 Oct 2026 21:06:41 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/2521.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 23 Oct 2026 04:29:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 实测报告:RTX 3080 20GB (GA102) 解锁前后 cuBLAS GEMM 对比 on Fri, 23 Oct 2026 05:02:47 GMT]]></title><description><![CDATA[<h2>LLM 推理实测(真实模型对照 + 锁回 A/B)</h2>
<p dir="auto">用两个真实模型(同机)、<strong>锁回 vs 解锁</strong>两次启动实测(prefill 全部冷启动,0 前缀缓存命中):</p>
<ul>
<li><strong>bf16 稠密模型</strong>:<code>Qwen/Qwen2.5-3B-Instruct</code>,torch bf16 + transformers,prefill 8192 tokens + 贪心 decode 128 tokens(精确 token 计数)</li>
<li><strong>三值量化模型</strong>:<code>Ternary-Bonsai-2-27B</code>(ninfer-serve,三值权重 × int8 激活整数内核),prefill 18369 tokens,引擎 <code>/metrics</code> 计数器口径</li>
</ul>
<h3>bf16 稠密模型(权重矩阵 = bf16 GEMM,解锁受益路径)</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>指标</th>
<th>锁定</th>
<th>解锁</th>
<th>提升</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Prefill @8192</strong></td>
<td>7,136 t/s</td>
<td>10,579 t/s</td>
<td><strong>+48%</strong></td>
</tr>
<tr>
<td>Decode @8192</td>
<td>46.97 t/s</td>
<td>47.18 t/s</td>
<td>~0%</td>
</tr>
</tbody>
</table>
<p dir="auto">同机 cuBLAS bf16 GEMM(8192³)锁回重测:63.2 TFLOPS(与首轮锁定基线 64.1 一致)→ 解锁 106.8,<strong>+69%</strong>。模型 prefill 提升低于内核(注意力/归一化/内核启动开销占一部分),方向与量级一致。</p>
<h3>三值量化模型(整数内核 + 带宽受限,对照组)</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>指标</th>
<th>基线(解锁前记录)</th>
<th>解锁后实测</th>
<th>差异</th>
</tr>
</thead>
<tbody>
<tr>
<td>Prefill @~20K</td>
<td>~1998 t/s</td>
<td>2162 / 2169 t/s</td>
<td>+8%(噪声)</td>
</tr>
<tr>
<td>Decode @20K</td>
<td>63.0 t/s</td>
<td>70.6 / 70.8 t/s</td>
<td>~0%</td>
</tr>
</tbody>
</table>
<h3>解读</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th></th>
<th>bf16 稠密 3B</th>
<th>三值 27B</th>
</tr>
</thead>
<tbody>
<tr>
<td>计算路径</td>
<td>bf16 GEMM(FFMA/FMLA32)</td>
<td>整数三值 × int8(IMLA)</td>
</tr>
<tr>
<td>prefill</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=ec85ec55bc1" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> <strong>+48%</strong></td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=ec85ec55bc1" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /> 无</td>
</tr>
<tr>
<td>decode</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=ec85ec55bc1" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /> ~0%(显存带宽瓶颈)</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=ec85ec55bc1" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /> ~0%(同)</td>
</tr>
</tbody>
</table>
<p dir="auto">→ <strong>bf16 稠密模型的 prefill(首个 token / 大批量)吃到约 1.5x;decode tok/s 两模型都不变——那是带宽的活,解锁管不到。</strong> 三值量化恰好绕开了解锁唯一的受益路径。</p>
]]></description><link>https://lcz.me/post/26908</link><guid isPermaLink="true">https://lcz.me/post/26908</guid><dc:creator><![CDATA[yangkang5303]]></dc:creator><pubDate>Fri, 23 Oct 2026 05:02:47 GMT</pubDate></item></channel></rss>