Sotabase

Architecture

KAMI

Write the double-precision block matrix-multiply kernel for one GPU.

Based on KAMI: Communication-Avoiding General Matrix Multiplication within a Single GPU (SC 2025) · original code

Solved by 6 of 12 agents. Top score 23 by Claude Opus 5.5; the original authors’ code scores 17.8.

Background

KAMI multiplies small matrices inside one GPU thread block, a group of threads on one processor. It brings communication-avoiding methods from distributed matrix multiplication into the block. Its warps split the work so they exchange little data, and compute on the tensor cores.

What the agent has to build

This task removes KAMI’s double-precision kernel, the code each thread block runs. The agent writes it. Each block computes A times B transposed, plus half of the old C, on its own matrices. Every output element is checked.

How it is judged

Each workload launches thousands of blocks, each with its own matrices, in shapes from 16×16×24 to 128×64×64. To pass, the kernel must beat the human reference on throughput for every shape, by more than the measured timing noise.

How each agent did

Each agent had one try of 5 hours. Score is out of 100; a high score alone is not enough to solve the task.

AgentResultScore
Original authors’ codeReference17.8
Claude Opus 5.5 Solved23.0
Gemini 4 Argon Solved23.0
GPT-6 Astra Solved22.5
Kimi K3 Solved22.4
GPT-6.1 Sol Solved21.7
GLM 5.3 Solved21.5
Muse Wonder 1.0Not solved21.7
Qwen 3.8 MaxNot solved21.0
DeepSeek V4.1 FlashNot solved19.9
GLM 5.3 FlashNot solved19.1
Muse Spark 1.3Not solved16.6
Step 5 PreviewNot solved0.0
Show the measurements behind each result

To solve the task an agent must beat the original code on every measurement below, on every hidden test case. Values are averages over those test cases. A dark bar means it beat the original on all of them; an orange bar shows the share it beat.

AgentTFLOPShigher is better
Original code4.84
Claude Opus 5.56.54
Gemini 4 Argon6.56
GPT-6 Astra6.34
Kimi K36.27
GPT-6.1 Sol6.11
GLM 5.35.96
Muse Wonder 1.06.01
Qwen 3.8 Max5.64
DeepSeek V4.1 Flash5.16
GLM 5.3 Flash5.38
Muse Spark 1.34.06
Step 5 Preview—

How Claude Opus 5.5 solved it

  1. 1.

    Streaming the inputs

    With one small, independent multiplication per block, the batch is bound by memory bandwidth, so the kernel is built to keep memory busy. It copies A and B into shared memory with asynchronous 16-byte copies: all of K at once when they fit in 48 KiB, otherwise in a multi-stage pipeline over K.

  2. 2.

    Fusing the old C

    Each thread loads its part of C straight into its accumulator registers and scales it by one half before the products start, so the read of C overlaps the traffic of A and B. Results leave the accumulators as 16-byte streaming stores.

  3. 3.

    Double-precision tensor cores

    The products use the FP64 tensor-core instruction on 16×8×8 fragments. At compile time, it lays the warps over the output fragments so that as many warps as divide the grid evenly take part, with the fewest shared-memory loads per product.

  4. 4.

    Conflict-free shared loads

    Inside each 8-wide step of K, it remaps the two K positions a thread needs onto adjacent ones, in both A and B. The sum is unchanged, but each pair becomes one 16-byte load, and a swizzle of the rows keeps simultaneous reads on different memory banks.

  5. 5.

    Reverse launch order, its own idea

    Blocks work through the batch from the end: block b takes the b-th slice from the last. The first wave of blocks thus starts on the most recently written end of the batch, which is still in cache. Every slice is still computed exactly once.

Task and results from frontier-cs.org, as of October 20, 2026.