mirror of
https://github.com/hanzoai/papers.git
synced 2026-10-29 07:34:31 +00:00
61 lines
2.2 KiB
TeX
61 lines
2.2 KiB
TeX
\section{GPU Acceleration: Lux Accel}
|
|
|
|
\label{sec:gpu}
|
|
%% ============================================================================
|
|
|
|
\subsection{Overview}
|
|
|
|
Lux Accel is a unified GPU acceleration library that provides a single API across CUDA (NVIDIA), Metal (Apple), and WebGPU (browsers) backends. It targets cryptographic operations (NTT, polynomial multiplication, multi-scalar multiplication), AI inference kernels, and vector search distance calculations.
|
|
|
|
\subsection{Feature Matrix}
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\caption{GPU acceleration comparison.}
|
|
\footnotesize
|
|
\begin{tabular}{@{}lccc@{}}
|
|
\toprule
|
|
Feature & \rotatebox{60}{Lux Accel} & \rotatebox{60}{Custom CUDA} & \rotatebox{60}{cuBLAS} \\
|
|
\midrule
|
|
CUDA & \yes & \yes & \yes \\
|
|
Metal & \yes & \no & \no \\
|
|
WebGPU & \yes & \no & \no \\
|
|
Unified API & \yes & \no & \pmark \\
|
|
NTT kernels & \yes & Manual & \no \\
|
|
MSM kernels & \yes & Manual & \no \\
|
|
GEMM & \yes & Manual & \yes \\
|
|
Crypto ops & \yes & Manual & \no \\
|
|
Auto-tuning & \yes & \no & \pmark \\
|
|
Rust native & \yes & \no & \no \\
|
|
Open source & \yes & N/A & \no \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\end{table}
|
|
|
|
\subsection{Performance}
|
|
|
|
NTT (Number Theoretic Transform) benchmarks, $2^{24}$ elements, Goldilocks field:
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\caption{NTT throughput (elements per second, billions).}
|
|
\footnotesize
|
|
\begin{tabular}{@{}lrrr@{}}
|
|
\toprule
|
|
Backend & Lux Accel & Custom CUDA & icicle \\
|
|
\midrule
|
|
A100 (CUDA) & 4.2B & 3.8B & 3.5B \\
|
|
M3 Max (Metal) & 1.8B & N/A & N/A \\
|
|
RTX 4090 (CUDA) & 3.6B & 3.2B & 2.9B \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\end{table}
|
|
|
|
Lux Accel's 10--20\% advantage over hand-written CUDA comes from auto-tuned kernel launch parameters, persistent kernel execution (avoiding launch overhead for sequential operations), and memory pool pre-allocation that eliminates \texttt{cudaMalloc} calls in the critical path.
|
|
|
|
\subsection{Key Differentiator}
|
|
|
|
The unified CUDA/Metal/WebGPU API is unique. No other library provides zero-knowledge proof acceleration on Apple Silicon \textit{and} NVIDIA GPUs \textit{and} in the browser, from the same codebase. This enables a single code path for validators (NVIDIA), developers (Apple), and light clients (WebGPU).
|
|
|
|
%% ============================================================================
|