---
id: pr-flashinfer-1050
repo: flashinfer-ai/flashinfer
pr: 1050
title: 'fix: top_k_mask_logits hangs on -inf inputs'
author: xslingcn
date: '2025-05-10'
url: https://github.com/flashinfer-ai/flashinfer/pull/1050
source_category: upstream-code
architectures:
- sm100
tags:
- gemm
techniques: []
hardware_features: []
kernel_types:
- gemm
languages:
- cuda-cpp
captured_at: '2026-04-17'
status: merged
merge_sha: 9087587442cb3d6aecf3670c0fe26e644611a22a
inclusion_reason: kernel file changes
changed_paths:
- include/flashinfer/sampling.cuh
- tests/test_sampling.py
head_ref_oid: 1e8c368a4f8ee81b8be8a6f7b18499fd0d7d4358
artifact_dir: evidence/pull-bundles/flashinfer/gh-1050
---
# fix: top_k_mask_logits hangs on -inf inputs

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

## Changed Paths

- `include/flashinfer/sampling.cuh`
- `tests/test_sampling.py`

## Evidence Bundle

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