Less memory traffic. A slower kernel.
First the GPU scores the tokens it has seen. It writes those scores to memory, then reads them back to decide which tokens to keep.
Junxian Ma put both jobs in a single kernel. The scores no longer had to make the round trip. Somehow, the work took longer.
Where the time went
Try the three versions in order. Each blue dot counts one unit of throughput. The line marks the original kernel pair.
Scoring stops while selection runs. The memory traffic is gone, but the wait remains.
In the first fused kernel, scoring had to stop while the best tokens were being picked. A second buffer let the GPU start scoring the next query while it was still picking tokens for the last. The same work now took less time.
Read Junxian Ma’s engineering noteSelected research
03 worksAbout the lab
Reckoner Lab is a collective of young AI researchers working across model architecture, inference systems and reasoning. We choose our own questions and share tools, compute opportunities and early results.
Each work links back to its original authors. Invited members can add a profile or research link ↗.