---
id: pr-flashinfer-2127
repo: flashinfer-ai/flashinfer
pr: 2127
title: 'fix: add a check for int32 indices in sampling.py'
author: raayandhar
date: '2025-11-22'
url: https://github.com/flashinfer-ai/flashinfer/pull/2127
source_category: upstream-code
architectures:
- sm100
tags: []
techniques: []
hardware_features: []
kernel_types: []
languages: []
captured_at: '2026-05-16'
status: merged
merge_sha: 5e110040cb103fad08e3947485b5d532dd83a995
inclusion_reason: include
changed_paths:
- flashinfer/sampling.py
- tests/utils/test_sampling.py
artifact_dir: evidence/pull-bundles/flashinfer/gh-2127
head_ref_oid: 214a7a920554bc6760671dad8afc326a52a37bf4
---
# fix: add a check for int32 indices in sampling.py

- Repository: `flashinfer-ai/flashinfer`
- PR: [2127](https://github.com/flashinfer-ai/flashinfer/pull/2127)
- Decision: `include`
- Reason: include

## Changed Paths

- `flashinfer/sampling.py`
- `tests/utils/test_sampling.py`

## Evidence Bundle

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