Technical Specification: Multi-Prime Number Theoretic Transforms (NTT) for GPU-Accelerated Primality Verification Past 50 Million Digits
收藏资源简介:
Abstract Deterministic verification and probable prime (PRP) screening of giant Mersenne candidates (M_p = 2^p - 1) exceeding 50 million decimal digits (p > 1.5 \times 10^8) encounter an impassable numerical precision wall when utilizing traditional floating-point Fast Fourier Transforms (FFTs) via Richard Crandall’s Irrational Base Discrete Weighted Transform (IBDWT). As transform lengths scale past N > 2^{25}, IEEE 754 64-bit double-precision trigonometric roundoff noise and carry-sweep failure rates violate strict normalization tolerances. To eliminate floating-point error entirely while preserving O(N \log N) asymptotic complexity, this paper establishes a complete architectural specification for Multi-Prime Number Theoretic Transforms (NTT) executed over finite integer fields \mathbb{Z}_q on NVIDIA GPU hardware. We present low-level PTX assembly implementations of universal Barrett reduction primitives that overcome the prime-shape constraints of Solinas moduli, coupled with a multi-prime parallel execution pipeline. To bridge multi-field residues back to standard integer space without multi-precision global memory bottlenecks, we formulate and optimize Garner’s Mixed-Radix Chinese Remainder Theorem (CRT) via native 128-bit hardware carry chains. Furthermore, we eliminate the linear carry-propagation bottleneck via a 3-stage hierarchical parallel prefix scan utilizing register-level warp-shuffles (__shfl_up_sync) and bit-field extraction primitives. Supported by HBM3 memory bandwidth optimizations, multi-GPU NVLink scaling, and Gerbicz error-checking for Silent Data Corruption (SDC), this exact finite field architecture successfully scales deterministic Mersenne prime verification past the 50-million-digit threshold.



