bend.html: streamline — collapse Wave 1 detail into table, tighten prose

Wave 1's 7 detailed entries (3 paragraphs each) become one compact
4-column table matching Waves 2/3/4. Drops ~30 lines without
losing any reference URL or speedup number.

Protocol section: 2 paragraphs → 1.
Fleet section: 4 paragraphs + table → 2 paragraphs + same table.

Net change: 284 → ~244 lines while preserving every citation and
every measurement. Reads more like a reference doc.
This commit is contained in:
russell@unturf.com 2026-06-05 21:46:12 -04:00
parent 5d1ad62f51
commit 948bdf0e41
No known key found for this signature in database

View file

@ -65,13 +65,12 @@ make gpu-worker LUMBDA=asm # smallest footprint</code></pre>
<tr><td>1M × 16 B</td><td>23,811 ms</td><td>159 ms</td><td>CLIFF</td><td><strong>157 ms</strong></td></tr>
</tbody>
</table>
<p>Binary mode wins by 30&ndash;200&times; over S-expression mode at scale. At 1 M × 16 B inputs, C tier binary is 157 ms end-to-end versus 23,811 ms for the S-exp path. At that scale bend beats host hashlib by ~12&times;.</p>
<p>The CUDA toolchain stays isolated to the leaf binary the worker spawns. No tier links libcudart; no tier requires nvcc at build time. Asm tier hosts workers through hand-written <code>pipe2 + fork + execve</code> syscalls.</p>
<p>Binary mode wins by 30&ndash;200&times; over S-expression at scale; at 1 M × 16 B inputs C tier binary is 157 ms vs 23,811 ms for S-exp, and bend beats host hashlib by ~12&times;. The CUDA toolchain stays isolated to the leaf binary the worker spawns &mdash; no tier links libcudart; asm tier hosts workers through hand-written <code>pipe2 + fork + execve</code> syscalls.</p>
</section>
<section id="fleet">
<h2>Fleet</h2>
<p>bend runs on a 2-host LAN cluster. Round-robin selection lives in <code>bend.lsp</code> via <code>*bend-workers*</code> &amp; the <code>BEND_WORKERS</code> environment variable.</p>
<p>bend runs on a 2-host LAN cluster; round-robin selection lives in <code>bend.lsp</code> via <code>*bend-workers*</code> + <code>BEND_WORKERS</code> env.</p>
<table>
<thead><tr><th>host</th><th>GPU</th><th>arch</th><th>port</th><th>coexists with</th></tr></thead>
<tbody>
@ -79,8 +78,7 @@ make gpu-worker LUMBDA=asm # smallest footprint</code></pre>
<tr><td><code>ai.foxhop.net</code></td><td>RTX 4090 (24 GB)</td><td>sm_89</td><td>9092</td><td>qwen LLM (llama.cpp) on GPU</td></tr>
</tbody>
</table>
<p>The 4090 box shares its GPU with a qwen LLM. Bend kernels fit alongside because secp256k1 / CGBN workloads burn SMs for milliseconds at a time then release; qwen keeps its weights resident, bend allocates transient VRAM per call. 24 GB VRAM holds both.</p>
<p>Cluster aggregate (round-robin fan-out, sequential dispatcher): 1.6&times; at 200 × <code>n=1k</code> CGBN mod-mul, 1.2&times; at 6 × <code>n=100k</code>. Cap is client-side serialization; an async dispatcher unlocks the remaining 2&times; headroom. Workers themselves never block each other.</p>
<p>The 4090 box shares its GPU with a qwen LLM &mdash; bend kernels burn SMs for milliseconds then release; qwen keeps its weights resident; 24 GB VRAM holds both. Cluster aggregate (sequential round-robin dispatcher): 1.6&times; at 200 × <code>n=1k</code> mod-mul, 1.2&times; at 6 × <code>n=100k</code>; an async dispatcher unlocks the remaining 2&times; headroom.</p>
</section>
<section id="catalog">
@ -131,41 +129,18 @@ make gpu-worker LUMBDA=asm # smallest footprint</code></pre>
</table>
<h3>Surveyed forms (Wave 1)</h3>
<h4>A. <code>cuda-secp256k1-batched-mul</code> &mdash; batched secp256k1 scalar / point ops</h4>
<p><strong>Reference numbers:</strong> gECC 4.94&times; on unknown-point mul, 5.56&times; on ECDSA verify vs CPU. VanitySearch forks hit 6.5 Gkeys/s on RTX 4090, 8.6 Gkeys/s on RTX 5090, 2.65 Gkeys/s on RTX 3080.</p>
<p><strong>Wire:</strong> <code>(secp-mul-batch (scalars . blob&lt;N×32B&gt;) (base-point . blob&lt;64B&gt;))</code> &rarr; <code>(points . blob&lt;N×64B&gt;)</code></p>
<p><strong>Refs:</strong> <a href="https://arxiv.org/pdf/2501.03245">gECC paper</a> &middot; <a href="https://github.com/JeanLucPons/VanitySearch">VanitySearch</a> &middot; <a href="https://github.com/FixedPaul/VanitySearch-Bitcrack">VanitySearch-Bitcrack</a></p>
<h4>B. <code>cuda-bignum-cgbn</code> &mdash; 256-bit modular arithmetic primitives</h4>
<p><strong>Reference numbers:</strong> 100&times;+ on dense mul vs Xeon-20c + GMP + OpenMP on V100.</p>
<p><strong>Wire:</strong> <code>(cgbn-batch (op . mod-mul|mod-inv|mod-add) (modulus . blob&lt;32B&gt;) (a . blob&lt;N×32B&gt;) (b . blob&lt;N×32B&gt;))</code> &rarr; <code>blob&lt;N×32B&gt;</code></p>
<p><strong>Refs:</strong> <a href="https://github.com/NVlabs/CGBN">NVlabs CGBN</a> &middot; <a href="https://arxiv.org/pdf/2405.14642">midsize-int benchmarks</a></p>
<h4>C. <code>cuda-rho-pollard-walk</code> &mdash; Pollard rho / kangaroo walks</h4>
<p><strong>Reference numbers:</strong> 87.7 M ops/sec on RTX 2070 Super for ECCp79. Original CUDA Pollard paper reports &gt; 7.2 M points/sec at 256 threads on older hardware.</p>
<p><strong>Wire:</strong> <code>(rho-walk-batch (start-points . blob&lt;W×64B&gt;) (steps . N) (distinguished-mask . blob&lt;32B&gt;))</code> &rarr; <code>(distinguished . blob&lt;K×96B&gt;)</code></p>
<p><strong>Refs:</strong> <a href="https://github.com/atlomak/CUDA-rho-pollard">atlomak/CUDA-rho-pollard</a> &middot; <a href="https://github.com/oritwoen/kangaroo">oritwoen/kangaroo</a></p>
<h4>D. <code>cuda-clifford-stabilizer</code> &mdash; tableau stabilizer simulator (Stim-on-GPU)</h4>
<p><strong>Reference numbers:</strong> 186&times; over Stim (CPU SOTA) on equivalence-checking.</p>
<p><strong>Wire:</strong> <code>(stab-sim-batch (n-qubits . k) (circuit . blob) (n-shots . S))</code> &rarr; <code>(samples . blob&lt;S×ceil(k/8)&gt;)</code></p>
<p><strong>Refs:</strong> <a href="https://arxiv.org/abs/2507.03092">STABSim</a> &middot; <a href="https://arxiv.org/abs/2505.03307">Qimax</a> &middot; <a href="https://arxiv.org/pdf/2603.14641">equivalence-checking</a></p>
<h4>E. <code>cuda-bernstein-yang-inv</code> &mdash; batched modular inverse (safegcd)</h4>
<p><strong>Reference numbers:</strong> 3&ndash;10&times; per inversion over Fermat on CPU. No published dedicated CUDA implementation; Standalone Bernstein-Yang-on-CUDA holds novel territory.</p>
<p><strong>Wire:</strong> <code>(modinv-batch (modulus . blob&lt;32B&gt;) (xs . blob&lt;N×32B&gt;))</code> &rarr; <code>blob&lt;N×32B&gt;</code></p>
<p><strong>Refs:</strong> <a href="https://eprint.iacr.org/2019/266">safegcd</a> &middot; <a href="https://eprint.iacr.org/2024/644">Jumping for Bernstein-Yang</a></p>
<h4>F. <code>cuda-ntt-poly</code> &mdash; Number Theoretic Transform</h4>
<p><strong>Reference numbers:</strong> Up to 123&times; over CPU; 21&times; on RTX 3070; cuFFT-comparable kernel structure.</p>
<p><strong>Wire:</strong> <code>(ntt (mod . p) (omega . root) (xs . blob&lt;N×8B&gt;))</code> &rarr; <code>blob&lt;N×8B&gt;</code></p>
<p><strong>Refs:</strong> <a href="https://arxiv.org/pdf/2405.11353">NTTSuite</a> &middot; <a href="https://eprint.iacr.org/2021/124.pdf">FHE NTT</a></p>
<h4>G. <code>cuda-radix-sort</code> / <code>cuda-prefix-scan</code> &mdash; reduction primitives</h4>
<p><strong>Reference numbers:</strong> 1.4 G keys/sec on Titan; 20&ndash;50&times; over CPU merge sort; 257&times; over Intel Xeon Phi for scan.</p>
<p><strong>Wire:</strong> <code>(sort-u64 (xs . blob&lt;N×8B&gt;))</code> &rarr; <code>blob&lt;N×8B&gt;</code></p>
<p><strong>Refs:</strong> <a href="https://github.com/NVIDIA/cub">NVIDIA CUB</a> &middot; <a href="https://gpuopen.com/learn/boosting_gpu_radix_sort/">Onesweep</a></p>
<table>
<thead><tr><th>form</th><th>throughput</th><th>hardware</th><th>ref</th></tr></thead>
<tbody>
<tr><td><code>cuda-secp256k1-batched-mul</code></td><td>6.5 Gkeys/s VanitySearch RTX 4090; 8.6 Gkeys/s RTX 5090; 2.65 Gkeys/s RTX 3080</td><td>(promoted &mdash; see Live)</td><td><a href="https://arxiv.org/pdf/2501.03245">gECC</a> &middot; <a href="https://github.com/FixedPaul/VanitySearch-Bitcrack">Bitcrack</a></td></tr>
<tr><td><code>cuda-bignum-cgbn</code></td><td>100&times;+ on dense mul vs Xeon-20c + GMP + OpenMP</td><td>V100</td><td><a href="https://github.com/NVlabs/CGBN">NVlabs CGBN</a> &middot; <a href="https://arxiv.org/pdf/2405.14642">midsize-int</a></td></tr>
<tr><td><code>cuda-rho-pollard-walk</code></td><td>87.7 M ops/sec for ECCp79</td><td>RTX 2070 Super</td><td><a href="https://github.com/atlomak/CUDA-rho-pollard">atlomak</a> &middot; <a href="https://github.com/oritwoen/kangaroo">oritwoen</a></td></tr>
<tr><td><code>cuda-clifford-stabilizer</code></td><td>186&times; over Stim (CPU SOTA) on equivalence-checking</td><td>STABSim</td><td><a href="https://arxiv.org/abs/2507.03092">STABSim</a> &middot; <a href="https://arxiv.org/abs/2505.03307">Qimax</a></td></tr>
<tr><td><code>cuda-bernstein-yang-inv</code></td><td>3&ndash;10&times; per inversion over Fermat on CPU; novel territory on GPU</td><td>&mdash;</td><td><a href="https://eprint.iacr.org/2019/266">safegcd</a> &middot; <a href="https://eprint.iacr.org/2024/644">Jumping</a></td></tr>
<tr><td><code>cuda-ntt-poly</code></td><td>up to 123&times; over CPU; 21&times; on RTX 3070</td><td>RTX 3070</td><td><a href="https://arxiv.org/pdf/2405.11353">NTTSuite</a> &middot; <a href="https://eprint.iacr.org/2021/124.pdf">FHE NTT</a></td></tr>
<tr><td><code>cuda-radix-sort</code></td><td>1.4 G keys/sec; 20&ndash;50&times; over CPU merge sort; 257&times; vs Xeon Phi for scan</td><td>Titan</td><td><a href="https://github.com/NVIDIA/cub">CUB</a> &middot; <a href="https://gpuopen.com/learn/boosting_gpu_radix_sort/">Onesweep</a></td></tr>
</tbody>
</table>
<h3>Surveyed forms (Wave 2)</h3>
<p>Sorted by reported speedup descending.</p>