---
id: pr-flashinfer-2215
repo: flashinfer-ai/flashinfer
pr: 2215
title: 'feat: further optimize top-k and add fused top-k page construction kernels for DSA'
author: yzh119
date: '2025-12-19'
url: https://github.com/flashinfer-ai/flashinfer/pull/2215
source_category: upstream-code
architectures:
- sm100
tags:
- kernel-fusion
techniques:
- kernel-fusion
hardware_features: []
kernel_types: []
languages:
- cuda-cpp
captured_at: '2026-04-27'
status: merged
merge_sha: 3a301a102c6a2ba7b52030910899a405bad156b0
inclusion_reason: kernel file changes
changed_paths:
- benchmarks/bench_topk.py
- csrc/flashinfer_topk_binding.cu
- csrc/topk.cu
- docs/api/sampling.rst
- docs/api/topk.rst
- docs/index.rst
- flashinfer/__init__.py
- flashinfer/topk.py
- include/flashinfer/sampling.cuh
- include/flashinfer/topk.cuh
- tests/utils/test_topk.py
head_ref_oid: e7ea2290a861a3f26fa7938ee082403dd360d904
artifact_dir: evidence/pull-bundles/flashinfer/gh-2215
---
# feat: further optimize top-k and add fused top-k page construction kernels for DSA

- Repository: `flashinfer-ai/flashinfer`
- PR: [2215](https://github.com/flashinfer-ai/flashinfer/pull/2215)
- Decision: `kernel file changes`
- Reason: kernel file changes

## Changed Paths

- `benchmarks/bench_topk.py`
- `csrc/flashinfer_topk_binding.cu`
- `csrc/topk.cu`
- `docs/api/sampling.rst`
- `docs/api/topk.rst`
- `docs/index.rst`
- `flashinfer/__init__.py`
- `flashinfer/topk.py`
- `include/flashinfer/sampling.cuh`
- `include/flashinfer/topk.cuh`
- `tests/utils/test_topk.py`

## Evidence Bundle

`evidence/pull-bundles/flashinfer/gh-2215`
