Exact numbers on current GPUs
GPUs are built for floating-point numbers that are rounded, and the result depends on the order of the sums. This paper measures what four current NVIDIA GPUs do when the answer has to be exact or correctly rounded, against the vendor libraries and against FLINT, the reference CPU library for exact polynomial arithmetic.
Abstract
On 1 December 2026 Riptide ran four sets of measurements on an RTX 4090, an H100 SXM, an H200 SXM and a B200 (RunPod), with FLINT 3.6.0 on two EC2 servers as the CPU reference.
Correctly rounded matrix products. Riptide's float64 and float32 matrix products gave the correctly rounded result on every sampled output in all 76 cases (4 GPUs, sizes 1024 to 16384, normal and wide-range inputs; 256 outputs per case checked against an exact big-integer reference). cuBLAS float64 is correctly rounded on 1–8% of outputs, and NVIDIA's float64 emulation in cuBLAS 13 on 61–78%. On the RTX 4090 Riptide's float64 product is 9.8× and 12.9× faster than cuBLAS float64 at 4096 and 8192. On the B200 it is 1.23× and 1.50× faster at 8192 and 16384. On the H100 and H200 it is slower: 0.35–0.56× at the large sizes.
Polynomial products. On the GPU, counting the copy of the operands in and of the result out, exact multivariate polynomial products beat FLINT 3.6.0 at its best thread count on a 128-core AMD EPYC server in 71 of 75 GPU-and-case pairs. The geometric mean is 6.6× (RTX 4090), 7.3× (H100), 9.2× (H200) and 7.4× (B200), and the maximum is 47×. Every answer is identical to FLINT's. FLINT wins the smallest products, which take about 1 ms either way.
Small-integer storage. With int8 or int16 data already on the GPU, exact matrix–vector products are 1.6–1.9× faster than float16 at batch 1, and exact sums of squares are 2.0–3.0× faster than float32. Exact int8 embedding search is slower end to end than float16: 0.68–0.87×.
Training. A 15.9M-parameter GPT trained for 100 steps in Riptide's exact mode ends with one SHA-256 of the final weights on all four GPUs. Stock PyTorch gives three different results. The exact mode is 9.2–19.2× slower per step.
What this lets you do
- Get the one correct float64 answer. A correctly rounded matrix product has exactly one right answer for given inputs, whatever the GPU, library version or order of the sums. Riptide's product matched it on every one of the 256 sampled outputs per case. (The outputs were checked against an exact reference on each GPU; they were not compared bit for bit across GPUs.)
- Run float64 work on GPUs with little float64 hardware. The RTX 4090 runs float64 at 1.2 TFLOPS. A correctly rounded float64 product on it is up to 12.9× faster than its own cuBLAS float64.
- Move exact algebra off the CPU. Exact polynomial products run 5.7–9.2× faster (geometric mean) on one GPU than on a 96- or 128-core server running FLINT. In 143 of 150 CPU-and-GPU pairs each product is also cheaper at the prices paid in this run.
- Reproduce a training run on whatever GPU is available. The same seed and data gave the same weights on the four GPUs tested (Ada, Hopper and Blackwell; one seed, 100 steps).
Method
This section describes each method at the level of the algorithm. The implementations (CUDA kernels called from PyTorch) are not published.
Correctly rounded matrix products from int8 tensor cores
The product is computed exactly as integers and rounded once. The approach is a residue number system on the integer tensor cores, the same family as the Ozaki scheme II of Ozaki, Uchino and Imamura (2026); NVIDIA's float64 emulation in cuBLAS 13 also runs on the integer units.
- Exact integer inputs. Each row of is multiplied by a power of two , the smallest that turns every element of the row into an integer; each column of likewise by . Multiplying by a power of two is exact, so no input bit is dropped, and the row's largest element sets its bit length (and for the column).
- Enough moduli. Every output is then an integer smaller in magnitude than , for inner dimension . The method takes pairwise coprime moduli , all at most 256 (256, 255, 253, 251, 247, …), until their product exceeds , so every output, sign included, is fixed by its residues. The float64 runs here used 21 to 28 moduli and the float32 runs 13 to 20; the implementation stops with an error above 48 moduli (about 334 bits).
- Residues. Each integer element is reduced modulo each to a signed residue in , which is one int8 value. The power of two is applied modulo from a table, so no wide integer is ever formed.
- One int8 product per modulus. For each the GPU's int8 matrix product (int32 accumulation) multiplies the residue matrices. With the int32 sums are exact for below , so each product is exact; it is then reduced modulo . The code does not check this bound; every run here had .
- Reconstruction. For each output, the Chinese remainder theorem combines the residues into the exact integer modulo (an explicit sum with , in multi-word arithmetic), and values above are taken as negative.
- One rounding. The exact integer is scaled by and rounded once, to nearest even, to float64 or float32. For outputs in the normal float range that is the correctly rounded result by construction; subnormal and overflowing outputs are rounded a second time. The samples check the implementation.
At 8192 to 16384 the int8 products take 57–83% of the time, forming the residues 11–28% and reconstruction with rounding 6–15%. A variant with residues small enough for float8 (moduli at most 31) was tested only on matrices of int8-range integers, where it was exact on every output. Its moduli cover about 46 bits, so as built it cannot do the float64 or float32 products above; it needed 6–7 float8 moduli for every 4 int8 moduli and ran 1.4–3.0× slower.
Exact polynomial products on the GPU
Two methods run on the GPU, and the faster one counts for each case. Both follow published approaches (see What is known and what is new).
- All pairs, then sort (sparse products). Each monomial's exponents are packed into one 64-bit key, 8 bits per variable, so multiplying two monomials is one integer addition of keys. The GPU forms every pair of terms at once: the key sum and the product of the two coefficients (64-bit integers, which held every coefficient in these tests; this path does not check a bound). It sorts the pairs by key, then adds the coefficients of equal keys with a prefix sum and differences at the run boundaries. This needs memory for all pairs, about 56 bytes each by the code's own estimate (15 GB for the 16,384-term sparse case). On the 24 GB RTX 4090 that case passed the estimate but then ran out of memory when allocating 15.98 GiB, so it was not run there.
- Kronecker substitution and number-theoretic transforms (dense products, large coefficients). With for each variable , a monomial becomes the index of a one-dimensional array, so the multivariate product becomes one long convolution with no wrap-around. The array is zero-padded to a power of two . From a bound on the result's coefficients (for example the product of the two factors' coefficient sums), the method picks enough primes below of the form () for their product to exceed twice the bound. For each prime it runs a cyclic number-theoretic transform of length on both operands (Montgomery modular arithmetic), multiplies pointwise and transforms back. The Chinese remainder theorem then recovers each signed coefficient as a multi-word integer, and the non-zero indices are decoded back to exponents. The dense array has slots, so this method suits 4 variables here; 8 variables would need slots and was not run.
Every GPU time includes copying the operands to the GPU and the result back.
Small integers
The int8 matrix–vector product keeps the weights as int8 and uses the 4-way byte dot-product instruction (dp4a) with int32 accumulation, which is exact here. The int16 sum of squares squares each sample exactly in 32 bits; each thread adds its squares in a 64-bit integer, each block adds its threads' totals, and the blocks combine with 64-bit integer atomic additions. Integer addition is exact, so the total is the same in any order. The int8 embedding search computes int32 scores with the vendor int8 matrix product; every score is at most , so the int32 scores are exact (being below , they also convert to float32 exactly), and the top 10 are selected from them.
Exact training
The training mode is the one in Training that gives the same weights on every machine, which describes it at the level of the algorithm: matrix products on exact integer arithmetic with power-of-two scales and two int8 limbs per int16 value, every reduction as an exact 64-bit integer sum, transcendental functions computed with only additions and multiplications, and Newton iteration for reciprocal square roots. Each step is the same sequence of correctly rounded operations on every GPU, so the weights come out the same.
Setup
Machines
| machine | where | notes |
|---|---|---|
| NVIDIA GeForce RTX 4090 (24 GB) | RunPod | Ada |
| NVIDIA H100 SXM (80 GB HBM3) | RunPod | Hopper |
| NVIDIA H200 SXM (141 GB) | RunPod, secure cloud | Hopper; the first host offered failed its CUDA check and was not used |
| NVIDIA B200 (180 GB) | RunPod | Blackwell |
| c7a.32xlarge: 128 cores, AMD EPYC 9R14 | AWS EC2 us-west-2 | FLINT 3.6.0, 1 to 128 threads |
| c8g.24xlarge: 96 cores, AWS Graviton4 | AWS EC2 us-west-2 | FLINT 3.6.0, 1 to 96 threads |
All GPUs ran NVIDIA driver 595.112.07 (CUDA 13.2). An AMD MI350X was planned but RunPod had none available, so no AMD GPU was measured.
Workloads
- **Matrix products, by ,** = 1024 to 16384 (8192 on the RTX 4090), in float64 and float32. Inputs are normally distributed ("normal") or spread over ("wide"). Baselines: cuBLAS float64, float32 and TF32 through PyTorch 2.9.1 (TF32 off for the float32 rows); NVIDIA's emulated float64 (fixed-point) and float32 (BF16x9) in cuBLAS 13.10, from = 4096; and, for float32, a cuBLAS float64 product rounded to float32.
- Polynomial products with integer coefficients, the same three families as in Multinumbers, measured: dense products in 4 variables (256 to 65,536 terms per factor), sparse products in 8 variables (256 to 16,384 terms per factor) and the Fateman benchmark with , = 10 to 30, whose coefficients reach 140 bits at = 30. Baseline: FLINT 3.6.0
fmpz_mpoly_mulon the two EC2 servers, at every thread count from 1 to all cores; the best one counts. - Small-integer storage, with the data already on the GPU: a 16384 × 16384 int8 weight matrix times 1 or 8 vectors; the sum of squares of int16 audio samples; scoring 32 queries against 6 million (RTX 4090) or 10 million (other GPUs) int8 embeddings of dimension 384, then selecting the top 10. Baselines: the same work in float16, bfloat16, float32 and (for the sum) float64 with stock PyTorch.
- Training: a GPT with width 512, 5 layers and 8 heads (15.9M parameters) on TinyShakespeare, with the same seed, initial weights and batches on every GPU. Stock PyTorch 2.13.0 against Riptide's exact training mode from Training that gives the same weights on every machine. 100 steps on all four GPUs, and a full 2,000-step run on the RTX 4090.
Measures
- Correct rounding is checked against an exact big-integer computation of each sampled output: 256 outputs per matrix-product case. An output counts as correct only if it equals the exactly computed value rounded once, to nearest even.
- Time is the best of 3 runs (float64 and Riptide's products) or 5 runs (other matrix products) after a warm-up. Matrix-product inputs and outputs stay on the GPU for every method. Polynomial times on the GPU are end to end: copying the operands to the GPU, the product, and copying the result back.
- Same answer for polynomials means the same number of terms and the same checksum as FLINT. For training it means the same SHA-256 of the final weights.
- Cost per product is the hourly price paid in this run times the wall time: RunPod for the GPUs, AWS on-demand for the CPUs. Energy is an estimate: rated power times wall time (GPUs at full board power, which overstates them; the c7a at 480 W, an assumption, as AMD publishes no TDP for the EPYC 9R14). It is not a measurement. No energy estimate is given for Graviton4, which has no published power figure.
Results
Correctly rounded float64 matrix products

| GPU | Riptide | cuBLAS float64 | cuBLAS 13 emulation | Riptide vs cuBLAS float64 | correctly rounded: Riptide / cuBLAS / emulation | |
|---|---|---|---|---|---|---|
| RTX 4090 | 2048 | 2.6 | 13.9 | – | 5.3× | 100% / 6% / – |
| RTX 4090 | 4096 | 11.3 | 110.8 | 37.9 | 9.8× | 100% / 2% / 75% |
| RTX 4090 | 8192 | 69.0 | 888.1 | 175.3 | 12.9× | 100% / 1% / 73% |
| H100 SXM | 4096 | 8.8 | 2.3 | 2.8 | 0.26× | 100% / 2% / 74% |
| H100 SXM | 8192 | 47.4 | 19.7 | 17.5 | 0.42× | 100% / 2% / 71% |
| H100 SXM | 16384 | 300.3 | 168.7 | 142.1 | 0.56× | 100% / 2% / 75% |
| H200 SXM | 4096 | 8.8 | 2.3 | 2.7 | 0.26× | 100% / 2% / 74% |
| H200 SXM | 8192 | 47.6 | 19.5 | 17.1 | 0.41× | 100% / 2% / 71% |
| H200 SXM | 16384 | 304.2 | 168.1 | 143.9 | 0.55× | 100% / 2% / 75% |
| B200 | 4096 | 5.7 | 3.9 | 1.7 | 0.68× | 100% / 2% / 68% |
| B200 | 8192 | 25.1 | 31.0 | 9.4 | 1.23× | 100% / 2% / 72% |
| B200 | 16384 | 162.3 | 243.3 | 74.9 | 1.50× | 100% / 4% / 61% |
- Every Riptide output sampled was correctly rounded: 76 of 76 cases, float64 and float32, on all four GPUs. cuBLAS float64 was correctly rounded on 0.8–8.2% of sampled outputs and the cuBLAS 13 float64 emulation on 61–78%. The emulation's errors are small: its worst sampled output is within 1–3 ulp (median 0), against up to 85,446 ulp for native cuBLAS float64.
- RTX 4090: 9.8× and 12.9× faster than cuBLAS float64 at 4096 and 8192 (8.8× and 11.6× on wide inputs), 1.1–1.3× at 1024, and 2.4–3.4× faster than the cuBLAS 13 emulation.
- B200: 1.23× and 1.50× faster than cuBLAS float64 at 8192 and 16384 on normal inputs, 1.04× and 1.23× on wide ones; slower at 4096 and below (0.06–0.68×). The cuBLAS 13 emulation is 2.2–3.5× faster than Riptide's product on the B200, but it is correctly rounded on only 61–72% of outputs there.
- H100 and H200: slower everywhere. 0.35–0.56× of cuBLAS float64 at 8192 and 16384, 0.05–0.26× at 4096 and below. On these two GPUs the emulation runs at about the speed of native float64.
Correctly rounded float32 matrix products
A correctly rounded float32 product has a simple stock route: compute in cuBLAS float64 and round to float32. It was correctly rounded on every sampled output on all four GPUs (double rounding can in principle differ, but no case did). Plain cuBLAS float32 is correctly rounded on 0–10% of outputs and TF32 on 0–0.4%.
| GPU | Riptide | cuBLAS float32 | cuBLAS TF32 | cuBLAS float64, rounded | Riptide vs float64-rounded | |
|---|---|---|---|---|---|---|
| RTX 4090 | 4096 | 7.5 | 2.4 (3%) | 1.6 | 111.0 | 14.9× |
| RTX 4090 | 8192 | 45.8 | 20.1 (2%) | 12.5 | 886.5 | 19.3× |
| H100 SXM | 8192 | 31.6 | 21.4 (2%) | 2.7 | 17.0 | 0.54× |
| H100 SXM | 16384 | 197.5 | 164.3 (0.4%) | 24.1 | 147.8 | 0.75× |
| H200 SXM | 8192 | 31.5 | 21.6 (2%) | 2.7 | 17.7 | 0.56× |
| H200 SXM | 16384 | 200.2 | 164.5 (0.4%) | 25.7 | 151.1 | 0.75× |
| B200 | 8192 | 17.3 | 17.2 (2%) | 1.5 | 31.2 | 1.80× |
| B200 | 16384 | 114.5 | 130.8 (0%) | 13.2 | 244.0 | 2.13× |
Against the float64-then-round route, Riptide's float32 product is faster on the RTX 4090 at 2048 and above (6.2–19.3×) and on the B200 at 8192 and above (1.5–2.1×), and slower on the H100 and H200 (0.07–0.75×). Against plain cuBLAS float32, which is not correctly rounded, it costs 2.3–3.6× the time on the RTX 4090 and 1.2–2.7× on the H100 and H200 at 4096 and above. On the B200 at 16384 with normal inputs it is faster than plain float32 (114.5 against 130.8 ms).
Polynomial products against FLINT 3.6.0

| family | terms per factor | result terms | FLINT, c7a | FLINT, c8g | RTX 4090 | H100 | H200 | B200 |
|---|---|---|---|---|---|---|---|---|
| dense, 4 variables | 1,024 | 426,359 | 4.0 ms (8) | 3.2 ms (8) | 5.0× | 4.2× | 6.7× | 3.5× |
| dense, 4 variables | 8,192 | 902,180 | 8.5 ms (96) | 6.5 ms (64) | 7.2× | 9.1× | 9.8× | 7.1× |
| dense, 4 variables | 65,536 | 923,521 | 19.2 ms (1) | 22.4 ms (32) | 10.6× | 12.5× | 12.8× | 9.3× |
| sparse, 8 variables | 1,024 | 1,048,573 | 42.7 ms (32) | 36.6 ms (96) | 28.9× | 42.3× | 47.2× | 25.9× |
| sparse, 8 variables | 8,192 | 67,088,218 | 459.8 ms (128) | 394.1 ms (16) | 5.5× | 12.9× | 13.5× | 12.9× |
| sparse, 8 variables | 16,384 | 268,104,299 | 1.27 s (64) | 1.06 s (32) | – | 9.0× | 9.4× | 9.0× |
| Fateman, = 10 | 1,001 | 10,626 | 0.71 ms (64) | 0.88 ms (96) | 0.83× | 0.74× | 0.82× | 0.59× |
| Fateman, = 20 | 10,626 | 135,751 | 20.2 ms (128) | 12.3 ms (64) | 3.5× | 4.7× | 4.8× | 4.1× |
| Fateman, = 30 | 46,376 | 635,376 | 377.9 ms (16) | 502.4 ms (8) | 12.5× | 18.3× | 19.8× | 23.2× |
- Speed. Over all 19 cases and both servers, the GPU was faster in 142 of 150 CPU-and-GPU pairs. Against the 128-core EPYC the geometric means are 6.6× (RTX 4090), 7.3× (H100), 9.2× (H200) and 7.4× (B200); against the 96-core Graviton4, 5.7–7.9×. By family against the EPYC: dense 3.5–14×, sparse 1.9–47×, Fateman 0.59–23×.
- Where FLINT wins. Fateman = 10 on every GPU against the EPYC (0.59–0.83×), and = 10 and 15 against the Graviton4 on the H100 and B200 (0.73–0.92×). These products take about 1–3 ms on either side.
- Cost. At the prices paid here (RunPod for the GPUs, AWS on-demand for the CPUs) the GPU was cheaper per product in 143 of 150 pairs, by a geometric mean of 2.7–49× depending on the pair; the RTX 4090 is the cheapest per product. At AWS on-demand GPU prices (H100 $6.88 an hour, B200 $14.24 an hour per GPU) the GPU is still 1.7–7.0× cheaper. AWS has no on-demand H200 or RTX 4090.
- Energy (estimate). The GPU used 3.5–7.1× less energy per product than the EPYC server (geometric mean per GPU), with the GPUs counted at full board power.
Small integers, computed exactly

| GPU | 16384² matrix × 1 vector: int8 exact / fp16 / fp32 | sum of squares, samples: int16 exact / fp32 / fp64 | embedding search + top-10: int8 exact / fp16 |
|---|---|---|---|
| RTX 4090 | 316 / 611 / 1,197 µs | 0.63 / 1.25 / 2.48 ms | 9.0 / 7.8 ms |
| H100 SXM | 114 / 221 / 358 µs | 0.18 / 0.37 / 0.72 ms | 8.1 / 6.5 ms |
| H200 SXM | 82 / 152 / 266 µs | 0.14 / 0.29 / 0.56 ms | 7.5 / 5.7 ms |
| B200 | 66 / 105 / 276 µs | 0.11 / 0.32 / 0.33 ms | 7.2 / 4.9 ms |
- Matrix–vector, batch 1: int8 exact is 1.6–1.9× faster than float16 and bfloat16 and 3.1–4.2× faster than float32 on all four GPUs. The float16 and bfloat16 results are not exact; float32 happens to be exact here. At batch 8 int8 is 1.9× faster than float16 on the RTX 4090, 1.1× on the H100 and H200, and slower on the B200 (0.92×).
- Sum of squares: int16 exact is 2.0–3.0× faster than a float32 dot product (relative error 2–3 × 10⁻⁷) and 3.1–4.0× faster than float64. Float64 was exact on the RTX 4090 and B200 and not on the H100 and H200, which reflects the inputs, not the GPUs. Every total exceeds . The H100 and H200 used one shared input whose exact total is odd, which float64 cannot represent at all; the RTX 4090 and B200 inputs had even totals, which float64 can hold.
- Embedding search: the exact int8 search returns the exact top 10 for every query. Float16 finds the right top-10 set on 99–100% of queries and the right order on 72–78%; bfloat16 the right order on 19–34%. But the int8 search is slower end to end, at 0.68–0.87× of float16. Its scoring step is 1.2–1.7× faster, and its top-10 selection step is 1.7–2.5× slower.
With data in host memory the CPU can be as fast. On the H200 the copy from pinned host memory runs at about 55 GB/s, so it dominates one-pass work. The 16384² int8 matrix–vector product takes 4.9 ms including the copy. A 96-core Graviton4 does it in 2.7 ms in float32 and a 128-core EPYC in 6.0 ms in exact int8, both with PyTorch 2.15.0 on the CPU. The sum of squares takes 9.8 ms including the copy, against 3.1–4.9 ms for a CPU float64 dot product, which is exact on the Graviton4 but not on the EPYC. Embedding search is still about 10× faster on the GPU with the copy: 7.7 ms per million embeddings against 70–75 ms per million on the CPUs (the best method on each CPU). These CPU runs use PyTorch, not a tuned CPU library.
One set of trained weights on four GPUs

| run | GPU | final weights (SHA-256, first 16 hex digits) | final training loss | ms per step |
|---|---|---|---|---|
| stock PyTorch | RTX 4090 | 3c0537e2f6ac91e0 | 2.306355 | 24.3 |
| stock PyTorch | H100 SXM | fed7f4df37490022 | 2.306355 | 21.3 |
| stock PyTorch | H200 SXM | fed7f4df37490022 | 2.306355 | 20.8 |
| stock PyTorch | B200 | 86ce759c66f385f6 | 2.306355 | 19.5 |
| Riptide exact | RTX 4090 | 016da1c531e2ad98 | 2.306518 | 465.6 |
| Riptide exact | H100 SXM | 016da1c531e2ad98 | 2.306518 | 229.3 |
| Riptide exact | H200 SXM | 016da1c531e2ad98 | 2.306518 | 190.2 |
| Riptide exact | B200 | 016da1c531e2ad98 | 2.306518 | 288.4 |
The exact runs end with the same weights and the same final loss, to the last bit, on all four GPUs. Stock PyTorch gives three different results: the H100 and H200 agree with each other, as they use the same Hopper kernels, and the RTX 4090 and B200 each differ. The stock losses agree to six decimals but not in the last bits.
Over a full 2,000-step run on the RTX 4090 (one seed), the exact run reached a validation loss of 1.786 nats per character against stock's 1.804, with character accuracy of 54.4% against 54.0%. One seed is not enough to call that difference real. The exact mode costs 9.2× (H200) to 19.2× (RTX 4090) stock's time per step.
What is known and what is new
Polynomial multiplication on GPUs is published work, going back to at least 2009. Emeliyanenko (2009), Moreno Maza and Pan (2010), Haque and Moreno Maza (2012) and Popescu and Garcia (2016) multiplied polynomials on GPUs of their time and reported large gains over CPU code. Kronecker substitution with modular transforms and the Chinese remainder theorem, as used here for dense products, is that published approach; sorting all pairs by monomial is the standard parallel alternative to FLINT's heap. This paper does not claim a new way to multiply polynomials on a GPU. Its contribution is the measurement: current GPUs (Ada, Hopper, Blackwell), timed end to end including both copies, dense and sparse multivariate families and big coefficients, against FLINT's latest release (3.6.0) on all cores of current 96- and 128-core servers, with every answer checked against FLINT. Their codes were not rerun here, because they target older CUDA generations.
Float64 matrix products on integer units are not new either. Ozaki, Ogita, Oishi and Rump (2012) split floating-point matrices into exactly multipliable slices; Ootomo, Ozaki and Yokota (2024) ran float64 products on int8 tensor cores that way; and the Ozaki scheme II (Ozaki, Uchino and Imamura, 2025) uses integer residues and the Chinese remainder theorem, as this paper's method does. NVIDIA's cuBLAS 13 float64 emulation is a baseline here, and 22–39% of its outputs are not correctly rounded. What this method adds is exactness end to end: every input bit is kept (the number of moduli is chosen for each product from its largest row and column bit lengths) and the exact integer result is rounded once, so the output is the correctly rounded product; the measurements compare it on four GPUs with native float64 and with that emulation.
Bit-identical training across GPUs and CPUs is described in Training that gives the same weights on every machine for models up to 3.2M parameters. This paper extends it to 15.9M parameters and to the H200 and B200.
Limitations and next steps
The limits of these results, each with its cause and, where one is planned, the next step.
- Float64 products on the H100 and H200. 0.35–0.56× of cuBLAS float64 at 8192 and 16384, and less at smaller sizes. Cause: these GPUs have strong native float64 units (60 TFLOPS measured, against 1.2 on the RTX 4090 and 35 on the B200), so cuBLAS float64 is already fast and the emulation runs at about the same speed.
- NVIDIA's emulation is faster on the B200. cuBLAS 13's float64 emulation is 2.2–3.5× faster than Riptide's product there, though it is correctly rounded on only 61–72% of outputs. Cause: under investigation.
- Small matrix products. At 4096 and below Riptide's float64 product is slower than cuBLAS float64 on the H100, H200 and B200 (0.05–0.68×), and at 1024 its float32 product takes 10–21× the time of plain float32 on every GPU. Cause: under investigation.
- Correctly rounded float32 on Hopper. On the H100 and H200 computing in cuBLAS float64 and rounding is faster than Riptide's float32 product at every size (Riptide 0.07–0.75×). Cause: the same strong float64 units.
- The smallest polynomial products. FLINT 3.6.0 wins the Fateman = 10 product on every GPU (0.59–0.83× against the EPYC) and = 15 against the Graviton4 on the H100 and B200. Cause: these products take about 1–3 ms, where launch and copy costs on the GPU dominate.
- Exact int8 embedding search is 0.68–0.87× of float16 end to end. Cause: the top-10 selection step on the exact scores is 1.7–2.5× slower than on float16 scores, while the scoring itself is faster. A fix has been identified and has not been measured yet.
- Matrix–vector at batch 8 on the B200 (0.92× of float16). Cause: under investigation.
- One-pass work on data in host memory. When each operation has to copy its data to the GPU, a large CPU is as fast or faster for a matrix–vector product or a sum of squares. Cause: the copy (about 55 GB/s) takes longer than the work.
- Exact training is slow. 9.2–19.2× stock's time per step. Cause: the exact training mode runs uncompiled, as separate operations rather than fused kernels (see the training paper).
Reproduce it yourself
Run kits/exact-numbers-on-gpus from the public riptide-reproduce repository: one command, a few minutes on a laptop, public software only. It reproduces how often NumPy and cuBLAS float64 matrix products are correctly rounded, entry by entry, with each error in ulps. Every baseline's value and its error against the exact answer are printed and saved to errors.csv, and the exact results print the same hash on every machine: if your float hash differs from ours or a colleague's, that is precision drift in your pipeline.
Reproduction notes
- Software. Riptide's GPU kernels and exact training mode are not published. Riptorch 0.4.0 is on the Riptorch page, and evaluation builds are available through Request an evaluation. FLINT 3.6.0 was built from the release tarball; its version is recorded with every run.
- Records. One record per measurement: 354 matrix-product, 75 polynomial, 60 storage and 10 training records on the GPUs, plus FLINT and CPU storage records for both servers and the machine records for every pod and instance. Evaluation partners can have the raw files on request.
- Cost. $9.00 of rented machine time: $5.76 on RunPod and $3.24 on EC2. Every pod and instance was terminated after the run.
References
- P. Emeliyanenko, Efficient multiplication of polynomials on graphics hardware, APPT 2009, Lecture Notes in Computer Science 5737, pp. 134–149. doi:10.1007/978-3-642-03644-6_11
- M. Moreno Maza and W. Pan, Fast polynomial multiplication on a GPU, Journal of Physics: Conference Series 256 (2010) 012009. doi:10.1088/1742-6596/256/1/012009
- S. A. Haque and M. Moreno Maza, Plain polynomial arithmetic on GPU, Journal of Physics: Conference Series 385 (2012) 012014. doi:10.1088/1742-6596/385/1/012014
- D. Popescu and R. Garcia, Multivariate polynomial multiplication on GPU, Procedia Computer Science 80 (2016), pp. 154–165. doi:10.1016/j.procs.2016.05.306
- K. Ozaki, T. Ogita, S. Oishi and S. M. Rump, Error-free transformations of matrix multiplication by using fast routines of matrix multiplication and its applications, Numerical Algorithms 59 (2012), pp. 95–118. doi:10.1007/s11075-011-9478-1
- H. Ootomo, K. Ozaki and R. Yokota, DGEMM on integer matrix multiplication unit, International Journal of High Performance Computing Applications 38(4) (2024), pp. 297–313. doi:10.1177/10943420241239588
- K. Ozaki, Y. Uchino and T. Imamura, Ozaki Scheme II: A GEMM-oriented emulation of floating-point matrix multiplication using an integer modular technique, International Journal of High Performance Computing Applications (2026). doi:10.1177/10943420261467787
- L. Kronecker, Grundzüge einer arithmetischen Theorie der algebraischen Grössen, Journal für die reine und angewandte Mathematik 92 (1882), pp. 1–122.
- J. M. Pollard, The fast Fourier transform in a finite field, Mathematics of Computation 25 (1971), pp. 365–374.
- P. L. Montgomery, Modular multiplication without trial division, Mathematics of Computation 44 (1985), pp. 519–521.
- R. Fateman, Comparing the speed of programs for sparse polynomial multiplication, ACM SIGSAM Bulletin 37(1), 2003, pp. 4–15. doi:10.1145/844076.844080
- The FLINT team, FLINT: Fast Library for Number Theory, version 3.6.0, flintlib.org.
- NVIDIA, cuBLAS (CUDA Toolkit 13), floating-point emulation.
Date and version
Version 1.2, 1 December 2026. Measurements from 1 December 2026. Includes a Method section at the level of the algorithm. Updated 1 December 2026: limitations section retitled. Updated 1 December 2026: added "Reproduce it yourself".
Working with Riptide
Riptide works with a small number of teams. Each engagement starts with 4 weeks inside your systems, learning how your models, data and infrastructure work. Only then does Riptide apply its software to them. Contact samario@riptidecompute.com or riptidecompute.com/evaluate.