# GPUs and tiles

> How a GPU multiplies matrices in tiles, why Pearl's reference miner uses 2 × 64 hash tiles that match one GPU thread's registers, and how tiles become tickets.

Source: https://pearlcodex.com/technical/math/gpus-and-tiles/ · Last updated: 2026-10-20 · Checked against Pearl's source code at v1.5.5

A [GPU](https://pearlcodex.com/glossary/#gpu) 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.

_Interactive: Toy miner. Try it on the page: <https://pearlcodex.com/technical/math/gpus-and-tiles/>_

## 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.

$$
\frac{128 \times 256 \times 128 \ \text{MACs}}{(128 + 256) \times 128 \ \text{numbers loaded}} \;=\; \frac{4{,}194{,}304}{49{,}152} \;\approx\; 85
$$

_Each number fetched from memory feeds about 85 multiply-accumulates. That ratio is what keeps the arithmetic units busy._

Inside each group, [tensor cores](https://pearlcodex.com/glossary/#tensor-core) 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](https://pearlcodex.com/technical/math/integers-and-quantization/)).

## What is a hash tile?

A hash [tile](https://pearlcodex.com/glossary/#tile) is a small patch of output cells whose running sums together make **one** lottery [ticket](https://pearlcodex.com/glossary/#ticket). 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.

_The reference miner’s hash tile, in the top-left corner of a GPU output block. The highlighted cells are rows 0 and 8 at columns 0, 1, 8, 9, 16, 17…_

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.

> **Note: Tile shape is the miner's choice**
>
> The 2 × 64 shape belongs to Pearl’s reference GPU miner, not to the consensus rules. A miner may pick another shape, within limits: even side lengths, between 32 and 256 cells, and tiles that cover every output cell exactly once. Block 130,825’s certificate declares a 2 × 64 tile, and block 130,827’s declares 8 × 16 (rows 0, 8, 32, 40, 64, 72, 96, 104 and column pairs every 32 columns), both over k = 8,192. The node’s built-in CPU miner uses 4 × 8.

## 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](https://pearlcodex.com/technical/math/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:

$$
\text{tickets} = \frac{m \cdot n}{\text{cells per tile}}, \qquad \text{work per ticket} = \text{cells per tile} \times k
$$

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](https://pearlcodex.com/technical/mining/tickets-and-target/).

**Make a guess:** A miner switches from 2 × 64 tiles to 8 × 16 tiles, same k. Does it win more often?

**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](https://pearlcodex.com/tools/mining-odds/) tool.

**Code: the reference miner's settings**

From [`settings.py`](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/miner/miner-base/src/miner_base/settings.py#L9-L26):

`miner/miner-base/src/miner_base/settings.py`

```python
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`](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/miner/pearl-gemm/csrc/gemm/pow_utils.hpp#L165-L181).

## In short

- A GPU multiplies matrices by splitting the output into tiles and giving each tile to a group of threads, which load each number once and reuse it many times.
- Tensor cores multiply small blocks of 8-bit integers in one instruction, accumulating into 32-bit sums: exactly Pearl’s format.
- A hash tile is the patch of output cells whose running sums make one ticket. Pearl’s reference GPU miner uses 2 × 64 = 128 cells, the accumulators one GPU thread already holds.
- Tile shape is the miner’s choice within limits (cells per tile from 32 to 256): block 130,825 used 2 × 64, block 130,827 used 8 × 16.
- Every 128 steps along k, a thread XORs its 128 running sums into one word: one cheap extra operation per 128 multiply-accumulates.

## Read the code

- [The reference GPU miner's tile sizes and hash-tile pattern](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/miner/miner-base/src/miner_base/settings.py#L9-L26) `miner/miner-base/src/miner_base/settings.py:9-26`
- [XOR-reducing a thread's register fragment](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/miner/pearl-gemm/csrc/gemm/pow_utils.hpp#L165-L181) `miner/pearl-gemm/csrc/gemm/pow_utils.hpp:165-181`
- [Consensus limits on hash-tile shape and position](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/zk-pow/src/api/sanity_checks.rs#L40-L60) `zk-pow/src/api/sanity_checks.rs:40-60`
- [The node's built-in CPU miner settings](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/zk-pow/bindings/go/src/mine.rs#L16-L25) `zk-pow/bindings/go/src/mine.rs:16-25`

## Sources

### Pearl docs

- [Pearl INT whitepaper, §4.5–4.8](https://pearlresearch.ai/research/int-whitepaper)

### Papers

- [Basu, Usefulness Gap (arXiv 2606.04819), Table 2: per-GPU rates in pool data](https://arxiv.org/abs/2606.04819)

### Other

- [NVIDIA CUTLASS: tiled matrix multiplication in CUDA](https://github.com/NVIDIA/cutlass)
