---
id: pr-flashinfer-2456
repo: flashinfer-ai/flashinfer
pr: 2456
title: 'fix: fix illegal memory access for NaN input in sampling kernels'
author: zack041
date: '2026-03-13'
url: https://github.com/flashinfer-ai/flashinfer/pull/2456
source_category: upstream-code
architectures:
- sm100
tags:
- gemm
techniques: []
hardware_features: []
kernel_types: []
languages:
- cuda-cpp
captured_at: '2026-04-27'
status: merged
merge_sha: f6ec0d8fa3e67243991d89b4f2198cc714473c68
inclusion_reason: kernel file changes
changed_paths:
- csrc/flashinfer_sampling_binding.cu
- csrc/sampling.cu
- flashinfer/sampling.py
- include/flashinfer/sampling.cuh
- tests/utils/test_sampling.py
head_ref_oid: 7a64a64910b70d1c832f20510f7e2f161cc992c0
artifact_dir: evidence/pull-bundles/flashinfer/gh-2456
---
# fix: fix illegal memory access for NaN input in sampling kernels

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

## Changed Paths

- `csrc/flashinfer_sampling_binding.cu`
- `csrc/sampling.cu`
- `flashinfer/sampling.py`
- `include/flashinfer/sampling.cuh`
- `tests/utils/test_sampling.py`

## Evidence Bundle

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