A Lock-Free, Fully GPU-Resident Architecture for the Verification of Goldbach’s Conjecture
Isaac Llorente-Saguer · 2026
Read A Lock-Free, Fully GPU-Resident Architecture for the Verification of Goldbach’s Conjecture by Isaac Llorente-Saguer (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-07850.txt.
Introduction
Llorente-Saguer presents a fully graphics-chip-based design for checking Goldbach's conjecture at large scale. Moving the whole sieve onto the chip removes host-side build work and link delays. A lock-free counter spreads work across chips with near-linear gains. The setup checks the conjecture to a trillion in under three minutes and to ten trillion in under an hour on one top chip, with code and logs shared for repeat runs.
Catalog record
| CREATOR | Isaac Llorente-Saguer |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 36143 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2603.07850
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
A Lock-Free, Fully GPU-Resident Architecture for the Verification of Goldbach’s Conjecture Isaac Llorente-Saguer Abstract We present a fully device-resident, multi-GPU architecture for the large-scale computational verification of Goldbach’s conjecture. In prior work, a segmented double-sieve eliminated monolithic VRAM bottlenecks but remained constrained by host-side sieve construction and PCIe transfer latency. In this work, we migrate the entire segment generation pipeline to the GPU using highly optimised L1 shared-memory tiling, achieving near-zero host-device communication during the critical verification path. To fully leverage heterogeneous multi-GPU clusters, we introduce an asynchronous, lock-free work-stealing pool that replaces static workload partitioning with atomic segment claiming, enabling 99.7% parallel efficiency at 2 GPUs and 98.6% at 4 GPUs. We further implement strict mathematical overflow guards guaranteeing the soundness of the 64-bit verification pipeline up to its theoretical ceiling of 1.84 × 10 19 1.84\times 10^{19} . On the same hardware, the new architecture achieves a 45.6 × 45.6\times algorithmic speedup over its host-coupled predecessor at N = 10 10 N=10^{10} . End-to-end, the framework verifies Goldbach’s conjecture up to 10 12 10^{12} in 36.5 seconds on a single NVIDIA RTX 5090, and up to 10 13 10^{13} in 133.5 seconds on a four-GPU system. All code is open-source and reproducible on commodity hardware. 1 Introduction Goldbach’s conjecture asserts that every even integer greater than 2 can be expressed as the sum of two prime numbers. Despite theoretical advances, such as Chen’s theorem [ 1 ] on the sum-of-a-prime-and-semiprime representation, and Helfgott’s proof of the ternary variant [ 2 ] , the binary conjecture remains unproven. Computational verification, therefore, provides a valuable empirical foundation, with the current academic record standing at 4\times 10^{18} , established by Oliveira e Silva, Herzog, and Pardi [ 3 ] via highly optimised CPU sieves distributed across computing clusters over several years. In prior work [ 4 ] , we identified that the VRAM ceiling plaguing earlier GPU implementations was architectural rather than fundamental. A segmented double-sieve design, combined with a dense bit-packed prime representation, reduced the constant VRAM footprint to 14 MB regardless of the search limit, enabling exhaustive verification to 10^{12} on a single consumer GPU. However, that architecture introduced a new bottleneck: the host CPU was responsible for constructing each segment bitset and transferring it to the device over the PCIe bus. On high-bandwidth GPUs, kernels completed in fractions of a millisecond and then idled, waiting for the CPU to supply the next segment. As explicitly documented in [ 4 ] , adding a second high-end GPU (H100) produced no meaningful speedup over a single RTX 3090 at N=10^{10} , because both configurations were saturating the CPU sieve rather than the GPU compute units. This paper proposes an architecture that eliminates the host-device dependency entirely. By migrating the segmented sieve into GPU L1 shared memory and coupling it with a decentralised, lock-free work-stealing pool, we decouple the GPU computation from the CPU completely. We detail the architectural design, the mathematical bounds required to ensure verification soundness up to 1.84\times 10^{19} , the CLI interface introduced for deployment flexibility, and the resulting performance in Blackwell-era hardware. 2 Related Work CPU-based verification. The academic record for exhaustive Goldbach verification is 4\times 10^{18} [ 3 ] , achieved through highly cache-efficient segmented sieves with bitwise bulk-marking, targeting O(N\log\log N) complexity with small constants. Earlier milestones include Richstein’s verification to 4\times 10^{14} [ 5 ] . These CPU approaches benefit from decades of cache-hierarchy tuning and are extremely competitive at moderate scales; however, they require large distributed clusters to push the frontier meaningfully beyond 10^{15} . GPU-based approaches. Jarzabek and Czarnul [ 6 ] evaluated CUDA unified memory and dynamic parallelism using Goldbach verification as one of three benchmark applications, but did not target the verification frontier; they verified 10^{4} numbers, at different starting points. Czarnul et al. [ 7 ] used Goldbach as a teaching vehicle across MPI, OpenMP, and CUDA student implementations, testing up to 2.5\times 10^{8} , and observed that student CUDA implementations achieved average times of approximately 100 s for that range. A structurally distinct approach is taken by Jesus et al. [ 8 ] , who employ number-theoretic transforms (NTTs) to count Goldbach partitions (i.e., compute a full histogram of the number of representations) for all even integers up to 2^{40}\approx 10^{12} , running on Arm-based HPC clusters. Counting partitions is algorithmically and computationally different from existence verification: it is a stronger result (a nonzero count implies verification), but requires large-scale distributed Arm CPU infrastructure rather than commodity GPU hardware. None of these frameworks demonstrated exhaustive existence verification beyond 10^{11} on a single commodity device; the obstacles preventing this (VRAM exhaustion from monolithic prime-table storage and the resulting inability to scale the verified range) are documented in our prior work [ 4 ] . GoldbachGPU v1. Our prior work [ 4 ] resolved the VRAM ceiling via a segmented double-sieve: the prime table was replaced by a fixed 14 MB segment bitset, regenerated per segment on the CPU and transferred to the GPU. This enabled exhaustive verification to 10^{12} on an RTX 3070. However, scaling to additional GPUs was limited by the CPU sieve: at N=10^{10} , a single H100 and a single RTX 3090 took essentially the same wall- clock time ( \approx 19 s), confirming that GPU compute was not the bottleneck. The present work removes this bottleneck entirely by moving the sieve to the GPU. 3 Systems Architecture The proposed framework transitions from a sequential, host-orchestrated loop to a fully decentralised, asynchronous multi-GPU pipeline. Figure 1 illustrates the high-level architecture. Host Setup (Precompute Small Primes) Lock-Free Atomic Pool fetch_add(segment) New in v2.0 GPU-Native Tiled Sieve (Built in L1 Shared Memory) Phase 1 Verification (Oracle checks q=n-p ) Unverified n>0 ? Phase 2 CPU Fallback (Optimized Sieve + MR) Assign [A,B] Device Reduction No (Zero-Copy Fast Path) Yes (PCIe D2H Transfer) Resolved Figure 1: High-level decoupled architecture of GoldbachGPU v2.0 . In contrast to v1, where the CPU sieved each segment and transferred the resulting bitset via PCIe, v2.0 generates segment bitsets natively in GPU L1 Shared Memory. A device-side reduction step creates a “Zero-Copy Fast Path” that entirely bypasses the host-device bus during normal operation. 3.1 GPU-Native Segment Sieving via L1 Shared Memory In the prior architecture, the segment prime bitset (representing odd numbers in [A,B] ) was constructed by a segmented Sieve of Eratosthenes running on the host CPU. Every segment required a full Host-to-Device PCIe transfer before the GPU kernel could begin. We resolve this by migrating the sieve entirely to the device via tiled_sieve_segment_kernel . The segment is divided into tiles of 32{,}768 odd numbers, each represented as a 4 KB bitset, sized to fit comfortably within the 48 KB of L1 shared memory available per Streaming Multiprocessor (SM) on Ada Lovelace and Blackwell architectures, while leaving headroom for the thread block’s register file and simultaneously- resident tiles. Each tile is loaded directly into shared memory ( sh_tile ), and GPU threads collaboratively sieve it using a permanently resident, read-only array of base primes. Once a tile is fully sieved, coalesced writes flush the result to the global VRAM segment buffer. This design eliminates PCIe transfers from the critical path. Per segment,