---
id: pr-flashinfer-1178
repo: flashinfer-ai/flashinfer
pr: 1178
title: 'bugfix: softmax NaN results caused by large -inf masks'
author: xslingcn
date: '2025-06-26'
url: https://github.com/flashinfer-ai/flashinfer/pull/1178
source_category: upstream-code
architectures:
- sm100
tags:
- tma
techniques: []
hardware_features:
- tma
kernel_types: []
languages:
- cuda-cpp
captured_at: '2026-04-17'
status: merged
merge_sha: 1b9ba254154f66cf2dff5c3836701d0bbd4290e2
inclusion_reason: kernel file changes
changed_paths:
- include/flashinfer/sampling.cuh
- tests/test_sampling.py
head_ref_oid: 3a5c9ba3ad0c263636e1768e722b4183ce2fbf86
artifact_dir: evidence/pull-bundles/flashinfer/gh-1178
---
# bugfix: softmax NaN results caused by large -inf masks

- Repository: `flashinfer-ai/flashinfer`
- PR: [1178](https://github.com/flashinfer-ai/flashinfer/pull/1178)
- 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-1178`
