§ 03 · Matrix math
GPUs and tiles
Thousands of cores, each one holding a lottery ticket
On this page 6 sections
A GPUGPU: Graphics processing unit: a chip with thousands of small cores working in parallel. Built for games, it now does most AI math, and Pearl mining. is a chip with thousands of small cores. It was built to colour millions of pixels at once, and it turned out to be just as good at matrix multiplication, because every cell of the answer can be computed independently.
Pearl mining runs on GPUs, on the same circuits that serve AI models. This page explains how a GPU actually does the multiplication, and how Pearl turns that process into lottery tickets without slowing it down.
Try it
Run Pearl’s real mining steps on tiny matrices. Watch the output split into tiles, each tile keep its diary, and each diary become a ticket.
How does a GPU multiply matrices?
The slow part of a GPU isn’t arithmetic. It’s fetching numbers from memory. So a fast multiplication is organised around reuse: load each number once, use it as often as possible.
The output is cut into blocks, and each block goes to a group of threads. In Pearl’s reference miner, a group computes a 128 × 256 block of the output. It walks along the shared dimension k in steps of 128: load a 128 × 128 piece of A′ and a 128 × 256 piece of B′ into fast on-chip memory, multiply them, add to the running sums, and move on.
Inside each group, tensor coresTensor core: A circuit inside modern NVIDIA GPUs that multiplies small blocks of matrices in one step. Pearl miners use its 8-bit integer mode. do the multiplying. A tensor core multiplies a small block of matrix in a single instruction. In integer mode it takes 8-bit inputs and adds the products into 32-bit sums, which is exactly the format of Pearl’s noisy matrices (see integers).
What is a hash tile?
A hash tileTile: A small patch of cells in the output matrix: 2 × 64 cells in the official GPU miner, though miners may choose other shapes (block 130,827 used 8 × 16). Each tile of a multiplication becomes one lottery ticket. is a small patch of output cells whose running sums together make one lottery ticketTicket: A 256-bit BLAKE3 hash of a tile's transcript. It wins a block if, read as a number, it is at most the target times the work that tile cost.. Every 128 steps along k, the tile’s running sums are XOR-ed into one 32-bit word and folded into a 64-byte diary; at the end, a keyed BLAKE3 hash of the diary is the ticket.
Pearl’s reference GPU miner uses tiles of 2 × 64 = 128 cells, with an odd-looking pattern: rows 0 and 8, and column pairs 0–1, 8–9, 16–17 and so on up to 248–249, all inside the 128 × 256 output block.
Why that pattern? It’s exactly the set of accumulator registers that one GPU thread holds in an NVIDIA Hopper tensor-core tile of width 256. (That’s the research’s reading of the kernel code, not a design rule Pearl states.) So each thread’s own registers are one ticket. It can XOR them together without exchanging any data with other threads, and the multiplication runs at full speed.
Doesn’t the hashing slow the GPU down?
Barely. The extra work per tile is one XOR per cell per checkpoint:
- A checkpoint comes every 128 steps along k. For a 128-cell tile that’s 128 × 128 = 16,384 multiply-accumulates.
- Folding them costs 128 XORs plus one rotate. That’s one cheap integer operation per 128 multiply-accumulates.
- Those run on the GPU’s ordinary cores while the tensor cores keep multiplying.
- At the very end, each tile needs one BLAKE3 hash of 64 bytes.
The cost that remains is the noise and its removal, a few percent (see rank and noise). Pearl Research Labs report about 5% total overhead serving Llama-3.3-70B on H200 GPUs, against an unspecified baseline.
How many tickets is a multiplication?
Every output cell belongs to exactly one tile, so:
For the shape declared in block 130,825’s certificate, m = 131,072 and n = 262,144 with 128-cell tiles and k = 8,192:
| Value | |
|---|---|
| Tickets in one multiplication | 131,072 × 262,144 ÷ 128 = 268,435,456 |
| Multiply-accumulates per ticket | 128 × 8,192 = 1,048,576 |
| Chance one ticket wins, at the snapshot difficulty | about 9.3 × 10⁻¹⁷ |
The winning bar is scaled by each ticket’s work, so every multiply-accumulate has the same tiny chance, whatever the tile shape or matrix size. That’s why Pearl’s hashrate counts multiply-accumulates. See tickets and target.
Make a guess
A miner switches from 2 × 64 tiles to 8 × 16 tiles, same k. Does it win more often?
Think of your answer first, then check it.
Answer No.
Both shapes have 128 cells, so each ticket costs the same work and faces the same bar. And even with a bigger tile, the bar grows in proportion to the tile’s work. The chance per multiply-accumulate stays the same, which is the point.
How fast are real GPUs?
A 2026 study of pool data lists NVIDIA H100 workers at about 500 to 700 trillion multiply-accumulates per second, and RTX 3090s at 75 to 120 trillion. Explorers write these as “TH/s”, but on Pearl each “hash” is one multiply-accumulate. For what that means for your odds, try the mining odds tool.
Code: the reference miner's settings
From settings.py (miner/miner-base/src/miner_base/settings.py:9-26 at v1.5.2, on GitHub):
noise_rank: int = 128
# GEMM tile sizes
tile_size_m: int = 128
tile_size_n: int = 256
tile_size_k: int = 128
# Hash tile pattern for the 128x256 tile
rows_pattern: list[int] = [0, 8]
cols_pattern: list[int] = [
0, 1, 8, 9, 16, 17, 24, 25, 32, 33, 40, 41, 48, 49, 56, 57,
# … every 8 columns …
192, 193, 200, 201, 208, 209, 216, 217, 224, 225, 232, 233, 240, 241, 248, 249,
] The XOR of a thread’s registers happens in the CUDA kernel, in
pow_utils.hpp (miner/pearl-gemm/csrc/gemm/pow_utils.hpp:165-181 at v1.5.2, on GitHub).