Rotating Before Slicing: Cheaper Double-Precision Emulation on Integer Tensor Cores

Consumer and many newer GPUs devote most of their silicon to low-precision matrix units, meaning INT8 or FP16 "Tensor Cores" built for deep learning. Their native double-precision (FP64) throughput is throttled, sometimes to a small fraction of single precision. One established workaround is the Ozaki scheme. It cuts each FP64 number into several short integer "slices," multiplies the slices on the fast INT8 units, and adds the partial products back together exactly. DGEMM on Integer Matrix Multiplication Unit showed this can beat native cuBLAS DGEMM by up to 6x on consumer GPUs. It has a known weak spot. Each row shares one exponent, so the number of slices, and with it the number of INT8 matrix multiplies, grows with how widely magnitudes vary within a row. Matrices with a few very large entries per row are the worst case.

Quantization research for language models has already solved a problem with the same shape. There, a few outlier values stretch a shared scale and waste the available bits. QuIP fixed this by multiplying weight matrices by random orthogonal matrices before rounding, which spreads outlier energy evenly across coordinates. This proposal carries that trick into scientific computing. Before slicing, we rotate the shared inner dimension of the product $AB$ with a fast Hadamard transform, so $AB = (AH)(H^\top B)$. This flattens the magnitude spread inside each row of $A$ and each column of $B$, which lets the scheme reach FP64-level accuracy with fewer slices. We then ask a systems question, the one the FLOPs-latency literature says must be asked: does removing whole INT8 GEMMs actually pay for an extra memory-bound transform pass in wall-clock time?

Core Claim

The slice count in block-exponent Ozaki emulation is roughly

$$s \approx \left\lceil \frac{p + \Delta}{\beta} \right\rceil,$$

where $p = 53$ is the FP64 significand length, $\Delta$ is the spread in bits between the largest and smallest entry sharing an exponent, and $\beta$ is the useful bits per INT8 slice. This form follows from requiring the lowest slice of the smallest entry to still resolve its last significand bit relative to the block's shared exponent. The cost of the multiply stage grows roughly with $s^2$, because slice pairs are multiplied cross-wise, and pruning schemes only soften this.

An orthogonal rotation along the inner dimension leaves the product unchanged in exact arithmetic. For heavy-tailed rows, it concentrates entry magnitudes near the row norm divided by $\sqrt{k}$, where $k$ is the inner dimension. This shrinks $\Delta$ by an amount that depends on the data. We claim three things.

First, for matrices whose spread comes from within-row outliers, a rotation of cost $O(nk\log k)$ reduces $s$ by one or more slices. Second, on GPUs this becomes a real end-to-end speedup at large sizes. Third, the speedup disappears, or reverses, in skinny and small-batch shapes where the extra pass dominates. That last regime is where a cheap predictor built from exponent histograms and a roofline model should decide whether to rotate.

What would be new is this: using incoherence processing to lower the data-dependent slice count of exact-summation GEMM emulation, and pairing it with a latency model rather than a FLOP count. DGEMM on Integer Matrix Multiplication Unit names exponent spread as its main cost driver but offers only per-row scaling. QuIP rotates only to protect low-bit neural network weights and never targets bit-level accuracy.

Research Program

The prior work plays three different roles here. The Ozaki integer-slicing kernel of DGEMM on Integer Matrix Multiplication Unit supplies the base method, and we reuse its block-shared exponents and exact integer accumulation. QuIP supplies the rotation idea. IM-Unpack and ABQ-LLM both decompose values into integer or bit components to survive outliers, and they motivate the analogy. Both keep low-precision accuracy targets and never meet an FP64 error bound, so neither addresses this question.

ShuffleNet V2 and Searching for Fast Model Families on Datacenter Accelerators constrain the design. The first shows that operations with few FLOPs but heavy memory traffic dominate latency, and the second shows that low arithmetic intensity leaves matrix units idle. Together they warn that an extra transform pass could erase the FLOP savings. For that reason the Hadamard transform will be fused into the slicing kernel, which already reads the FP64 input once. In the fused kernel, the rotation adds butterfly arithmetic in registers or shared memory but no extra trip to DRAM.

The work has four parts.

The first is a numerical analysis. We will bound the error of rotated emulation. This includes the $O(u\log k)$ rounding error of performing the FP64 Hadamard transform, where $u$ is the FP64 unit roundoff. We will also cover the fact that the emulated product's normwise bound now involves $|AH||H^\top B|$ rather than $|A||B|$.

The second is a fused slicing-plus-rotation CUDA kernel built on CUTLASS. The third is a per-call decision rule. It estimates $\Delta$ before and after rotation from a sampled exponent histogram, predicts $s$ for each case, and applies a roofline cost model calibrated per GPU to choose whether to rotate and how many slices to use.

The fourth is an honest account of what rotation breaks. The integer scheme can beat native DGEMM on zero-cancellation problems because digit-wise sums are exact. A floating-point rotation adds rounding before slicing, and this may give that advantage up. We will measure the loss rather than assume it away.

Baselines

The naive reference is native cuBLAS DGEMM on the same consumer GPU, both the RTX A6000 used by the original ozIMMU work and a newer consumer card. It sets the floor for accuracy and speed.

The strongest competitor is the unrotated integer-slicing Ozaki scheme of DGEMM on Integer Matrix Multiplication Unit, which reports up to 6x over cuBLAS DGEMM on consumer GPUs and a 4.33x speedup in StateVec quantum circuit simulation. We will run it with the slice count chosen by the same accuracy-targeted rule as our method, not a fixed count. Both methods are tuned to reach the same error target: the relative Frobenius error of native DGEMM on that input, measured against a quad-precision reference. Both run on identical matrices, GPUs, and CUTLASS tile-tuning budgets. Beating it means matching the error target with fewer slices and lower wall-clock time on the heavy-tailed matrix classes, while losing no more than a few percent on well-scaled ones, where the decision rule should turn rotation off.

Two ablations isolate the key ingredient. The first applies per-row and per-column power-of-two diagonal scaling without rotation. This separates the benefit of fixing across-row spread from the benefit of fixing within-row spread. The second runs rotation as a separate, unfused kernel, to measure how much of any gain depends on fusion.

For the FP32-target variant, the reference is the FP16 mantissa-split method of Recovering single precision accuracy from Tensor Cores, which reports 51 TFlop/s on an A100 against the 19.5 TFlop/s native FP32 peak. We will check whether rotation also removes its need for the $2^{11}$ underflow scaling.

Why not just…?

Why not just use per-row and per-column scaling, which Ozaki implementations already do? Diagonal scaling equalizes magnitudes across rows but cannot change the spread inside a row. The limitation stated for integer slicing in the ozIMMU work is sensitivity to exponent range within shared blocks. The diagonal-scaling ablation tests this directly. If it recovers most of the slice savings on our matrix classes, rotation is unnecessary and we will report that.

Why not just use hardware with fast FP64, or wait for vendors to restore it? Datacenter parts with fast FP64 exist, but the gap this proposal addresses is on consumer and deep-learning-oriented silicon. There, ozIMMU's 6x speedup over native DGEMM shows emulation already wins. Rotation only matters if emulation is the chosen path. We make no claim against machines with strong native FP64 and will not benchmark against them as competitors.

Why not just add slices adaptively and skip the rotation? Adaptive slice count is exactly our strongest baseline. The real question is whether one transform pass costs less than the one or two INT8 GEMMs it removes. This is a genuine threat in memory-bound shapes, following the operational-intensity arguments of Searching for Fast Model Families on Datacenter Accelerators. The shape sweep below is designed to locate the crossover, and the decision rule exists because we expect it to be real.

Why not just use microscaling formats with fine-grained shared scales? MicroMix gets near-FP16 LLM accuracy with MXFP4/6/8 formats on Blackwell, but these formats target low-precision inference. They provide no exact accumulation to FP64 accuracy, and the MicroMix gains are tied to Blackwell hardware. Finer shared-exponent blocks inside the Ozaki kernel are a fair alternative, since they reduce $\Delta$ without rotation, at the cost of more exponent bookkeeping. We will include block size as a swept variable so rotation competes against the best block size.

Proposed Experiments

The accuracy-versus-cost study uses the standard Ozaki test family: entries of the form (uniform − 0.5) times exp(φ·Gaussian), with φ swept to control dynamic range. We add two variants. One plants a fixed number of large outliers per row, which is the case rotation should help most. The other has spread only across rows, the case rotation should not help. Finally, we include the ill-conditioned zero-cancellation matrices on which ozIMMU beat native DGEMM.

For each input we record three quantities: the slice count needed to meet the DGEMM error target, both normwise and componentwise error against a quad-precision reference, and wall-clock time.

The shape study sweeps from square $n = 16384$ down to skinny $n \times k \times 8$ products. At each shape we report achieved arithmetic intensity against the GPU roofline, to find where rotation stops paying. No reported result found on Lacuna for emulated DGEMM latency in skinny or batch-1 shapes, so this regime will be characterized from scratch.

The application checks are StateVec quantum circuit simulation, where the reported speedup to beat is 4.33x over ZGEMM (DGEMM on Integer Matrix Multiplication Unit). We also include a dense multiply step inside the extended-precision hyperbolic embedding pipeline of Low-distortion and GPU-compatible Tree Embeddings in Hyperbolic Space, whose element-wise approach never uses matrix units. There, float64 gives distortion 9.42 on the Mosses tree. We will check whether a rotated emulated product preserves the near-optimal distortion that their ~100-bit expansion reaches.

The decisive result has three parts. First, on outlier-heavy inputs, rotation must cut at least one slice at equal accuracy and yield a measurable end-to-end speedup over adaptively sliced ozIMMU. Second, the decision rule must avoid regressions on well-scaled and skinny inputs. Third, the zero-cancellation accuracy advantage must be reported honestly, whether it survives or not. If diagonal scaling or finer blocks match the rotation's savings, the proposal's central claim fails.