---
id: pr-vllm-34206
repo: vllm-project/vllm
pr: 34206
title: '[Kernel] Optimize grouped topk kernel'
author: xyang16
date: '2026-02-20'
url: https://github.com/vllm-project/vllm/pull/34206
source_category: upstream-code
architectures:
- sm100
tags:
- csrc kernel
- moe_routing
- topk
techniques: []
hardware_features: []
kernel_types:
- moe
languages:
- cuda-cpp
captured_at: '2026-05-16'
status: merged
merge_sha: b1c4f0b26548d36fca304b298957e4791eafa09b
inclusion_reason: Separate routing, permutation, top-k, and expert GEMM costs; keep tail-token and expert-layout tests attached to the idea.
changed_paths:
- csrc/moe/grouped_topk_kernels.cu
- csrc/moe/moeTopKFuncs.cuh
- tests/kernels/moe/test_grouped_topk.py
artifact_dir: evidence/pull-bundles/vllm/gh-34206
head_ref_oid: 606eb193353409fce511c3fc96a4aed346c0f91e
---
# [Kernel] Optimize grouped topk kernel

- Repository: `vllm-project/vllm`
- PR: [34206](https://github.com/vllm-project/vllm/pull/34206)
- Decision: `Separate routing, permutation, top-k, and expert GEMM costs; keep tail-token and expert-layout tests attached to the idea.`
- Reason: Separate routing, permutation, top-k, and expert GEMM costs; keep tail-token and expert-layout tests attached to the idea.

## Changed Paths

- `csrc/moe/grouped_topk_kernels.cu`
- `csrc/moe/moeTopKFuncs.cuh`
- `tests/kernels/moe/test_grouped_topk.py`

## Evidence Bundle

`evidence/pull-bundles/vllm/gh-34206`
