AI Infra Interviews logo
← CUDA, Triton & Kernel Engineering / 25
mediumNVIDIAOpenAI

Select the top k logits from a 128,000-token vocabulary on the GPU. What shape does the kernel take and why not just sort?

Choose between local candidates, radix selection and sorting from k and the required output. A tested FP32 reference makes ties, signed zero, NaNs and threshold selection explicit.

Updated Sep 2026 · Learn how AI infrastructure works through explanations, worked examples and diagrams, then practise applying it to interview questions.

Choose between local candidates, radix selection and sorting from k and the required output. A tested FP32 reference makes ties, signed zero, NaNs and threshold selection explicit.

The full answer is part of Premium. A free account includes more answers in each topic, but does not unlock this one.

20 answers per topic instead of 10, plus saved progress and bookmarks · no cardor unlock all 316 remaining answers · ₹2,000 / $25

Work through the numbers

Change the assumptions in a free calculator, then explain what the result establishes and what still needs measurement.

UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

Define ordering and edge cases before selecting an algorithm. Explain why local top-k candidates suffice, what radix passes do and why a cache-capacity estimate does not establish the bottleneck.

DISCUSSION · 0

No comments yet — be the first to share your approach.