Praveen Perera was looking for a non-AI job that could make a desktop GPU earn its space. TLA+ model checking looked right. A distributed protocol can produce millions or billions of reachable states, and many of those states can be examined in parallel.
He built Warpspec to test that idea. On his largest comparison, a model of the Paxos commit protocol produced 1,357,590,081 distinct states. TLC, the standard model checker for TLA+, finished in 4 hours 40 minutes with 24 workers. Warpspec finished the same search in 3.65 seconds on an RTX 5090.
The checker starts before the GPU
TLA+ is a mathematical language for describing programs and systems, especially concurrent and distributed ones. Leslie Lamport created it to expose fundamental design errors before they become expensive code. Its main model checker, TLC, explores the states that a specification can reach and stops when it finds a violated invariant, a deadlock or the end of the state graph.
That generality has a cost. TLC interprets arbitrary sets, records, functions and sequences. In Perera’s profile of the EWD998 termination-detection model, 76 percent of TLC’s time went to computing successor states and 22 percent went to hashing and checking the set of states that it had already seen. The queue itself used less than one percent.
Warpspec moves work out of that loop. A compiler reads the TLA+ specification and its configuration, resolves constants, infers fixed types and generates a Rust state machine. Finite sets become bitsets. Strings and model values become enumerations. Records and fixed-key functions split into fields. Bounded sequences become a length and a fixed set of slots.
For PaxosCommit with two resource managers, the possible messages fit into a 144-bit set. The entire state occupies three 64-bit words, or 24 bytes. The generated CPU and GPU programs no longer allocate and traverse dynamic value trees for each state. They move compact arrays of integers.
The transformation explains much of the result. In a single-threaded PaxosCommit test with two resource managers, two Rust tools that retained dynamic value representations took about 26 seconds. Warpspec’s generated CPU code took roughly half a second.
One state machine runs in two places
Warpspec sends the same generated transition logic to its CPU and GPU drivers. The GPU explores the graph one breadth-first level at a time. Threads pull states from a frontier, generate successors and insert fingerprints into a global hash table through 64-bit atomic operations. New states form the next frontier.
That arrangement suits a GPU because the work repeats across a large set of independent states. It also creates hard limits. The visited-state table and the widest frontier must fit in GPU memory. Warpspec has no disk spill. If a level is wider than its frontier buffer, the run stops and asks for a larger one.
Perera reports three comparisons in which TLC and Warpspec both finished. EWD998 with four nodes fell from 401.5 seconds in TLC to 0.121 seconds on the GPU, a 3,318-fold speedup. LamportMutex fell from 1,824 seconds to 0.473 seconds, or 3,856 times. PaxosCommit produced the largest ratio, 4,600 times.
The CPU version also changed the scale of the problem. It took 5.93 seconds for EWD998, 16.55 seconds for LamportMutex and 74.9 seconds for PaxosCommit on 24 threads. Those results isolate two gains: fixed state representations make ordinary cores much faster, and the GPU adds another large parallel step.
Speed had to agree with the reference
A fast checker that skips states is useless. Perera therefore treated TLC’s counts as the test. For every comparison that both tools completed, Warpspec matched the number of distinct states, generated states and search depth.
He then ran the compiler across the public tlaplus/Examples collection. Warpspec compiled 152 of 191 exhaustive-search configurations and rejected the other 39. On the CPU, 134 matched TLC’s exact counts and depth. Fourteen reached the same violated invariant or action property. One stopped with an explicit encoding overflow instead of silently wrapping a value. Three lacked a CPU reference, and none returned a wrong count or verdict.
All 16 counterexample traces matched TLC. Perera also cross-checked 104 examples and the benchmark suite on an Nvidia L40S, a second GPU architecture. The project keeps the full counts and verification notes in its repository.
Refusal matters here. The compiler requires each variable to receive a fixed type from an invariant or its initial values. Unsupported constructs fail during generation. Full hash tables and out-of-range integers stop the run. The tool does not pretend that every TLA+ specification can fit its narrower machine model.
Safety is the cleanest GPU target
GPU mode currently checks safety properties: conditions that say a bad state must never occur. It does not check liveness, fairness or action properties on the GPU. Those run on the CPU and keep the state graph in RAM. Some temporal formulas, symmetry combinations and view-based checks are rejected.
Warpspec also depends on explicit enumeration. It is strongest when the specification has a finite state space that can be packed tightly and stored in memory. A model with an enormous or unbounded state space still needs abstraction, symmetry reduction, proof or another checking method. A speedup does not remove the combinatorial growth that created the problem.
The software is an early alpha. Its command line, generated code and supported TLA+ subset are changing. GPU use needs an Nvidia card, a recent CUDA driver and a separate Rust CUDA toolchain. The first run compiles kernels to PTX and can take minutes, although later runs reuse cached builds.
These constraints leave a useful boundary. Developers can use TLC for the language and workflows that it already covers, then try Warpspec when a safety search is large, regular and bounded enough for the GPU. The Apache-licensed repository includes a command-line tool, an npm package and a skill for coding agents.
A desktop card crosses a different threshold
The most revealing benchmark is not only the 4,600-fold ratio. Warpspec checked two models that Perera did not run through TLC or the CPU checker at all. One held 594,616,815 states and finished in 3.93 seconds. The other held 2,127,805,446 and finished in 3.91 seconds.
That second graph had more states than many machines can keep as ordinary objects. On the GPU it became a table of compact fingerprints and fixed-width records. The card finished before a human could finish reading the number.
References
- Lamport, L. (2025). My TLA+ Home Page. lamport.azurewebsites.net
- Perera, P. (2026). TLA+ Model Checking 4,600× Faster on a GPU: PaxosCommit in 3.65 Seconds. praveenperera.com
- Perera, P. (2026). Warpspec: Early Alpha GPU and Multi-Core CPU Explicit-State Model Checker for TLA+. github.com/praveenperera/warpspec