A6 · GPU batch ML‑KEM

When does a graphics card beat the processor at ML‑KEM?

Recorded batch timings show where parallel work pays off, and how long each batch takes.

Comparison controls

Comparison

Recorded
Operation
GPU

The other GPU stays on the throughput chart, dotted, for context.

CPU baseline

Timing scope

Changing a control reads the recorded curves. It does not launch a GPU job.

01 / Recorded timings · live readout

Throughput against batch size

Operations per second, against batch size; both axes logarithmic.

Chart. The left and right arrow keys move between measured batch sizes; Home and End reach the first and last; Escape hides the reading.

A threshold, not a best point

Arrow keys on the chart inspect the next or previous measured batch. Home and End reach the bounds; Escape closes the reading.

All measured points
02 / Recorded timings · live readout

Time for one batch

Median time for the whole batch, in milliseconds, against batch size; both axes logarithmic.

Chart. The left and right arrow keys move between measured batch sizes; Home and End reach the first and last; Escape hides the reading.

Time per operation

Time per operation is batch time divided by batch size. It is not the wait for an individual request. Time spent filling the batch is excluded.

All measured batch times
03 / Recorded stage timings

Where the time goes

04 / Live in this browser

Check a batch in this browser

JavaScript runs ML‑KEM‑768 key generation and encapsulation for the same seeds, then compares each full-output digest with the recorded GPU digest.

05 / Recorded correctness checks

Verified before it was timed

Passed / run, and identical / compared, for each operation and GPU.

Every timed run checked

¹ NIST’s ML‑KEM vectors test complete operations. The standalone NTT is checked coefficient by coefficient against the reference code, after its centred representatives are moved into [0, q).

Python reference and Keccak checks
06 / How the batch runs

One batch on the GPU, in five steps

Each horizontal lane represents an independent instance in the batch. Beneath each step, the kernels’ own mapping.

    Key generation and encapsulation use this flow. The standalone NTT benchmark measures one forward transform per polynomial.

    07 / Method and limits

    Method notes

    Recorded evidence, with the timing boundary stated.

    Sources and dates
    1. NIST · FIPS 203 · ML‑KEM
    2. NIST · ACVP test vectors
    3. ML‑KEM reference code (pq-crystals)
    4. NVIDIA · CUDA compute capability
    Technical note · PDF Notebook

    The technical note sets out the method and results. The notebook contains the executed calculations and stored outputs.