---
id: pr-flashinfer-1137
repo: flashinfer-ai/flashinfer
pr: 1137
title: '[feat] add unified batch attention w/ correctness tests.'
author: happierpig
date: '2025-06-12'
url: https://github.com/flashinfer-ai/flashinfer/pull/1137
source_category: upstream-code
architectures:
- sm100
tags:
- attention
- persistent-kernel
- prefill
techniques:
- persistent-kernel
hardware_features: []
kernel_types:
- attention
- prefill
languages:
- cuda-cpp
captured_at: '2026-04-17'
status: merged
merge_sha: 568ab6ceabbe4bcee0822fbd735960cf48e9641f
inclusion_reason: kernel file changes
changed_paths:
- benchmarks/bench_batch_attention.py
- csrc/batch_attention.cu
- csrc/batch_attention_customize_config.jinja
- csrc/batch_attention_jit_pybind.cu
- csrc/batch_attention_paged_kernel_inst.jinja
- flashinfer/__init__.py
- flashinfer/attention.py
- flashinfer/jit/__init__.py
- flashinfer/jit/attention/__init__.py
- flashinfer/jit/attention/pytorch.py
- include/flashinfer/attention/cascade.cuh
- include/flashinfer/attention/persistent.cuh
- include/flashinfer/attention/persistent_template.cuh
- include/flashinfer/attention/prefill.cuh
- include/flashinfer/attention/scheduler.cuh
- include/flashinfer/permuted_smem.cuh
- include/flashinfer/utils.cuh
- tests/test_batch_attention.py
head_ref_oid: 156eac8c39dc66a79f4d99be990799d1c16a0642
artifact_dir: evidence/pull-bundles/flashinfer/gh-1137
---
# [feat] add unified batch attention w/ correctness tests.

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

## Changed Paths

- `benchmarks/bench_batch_attention.py`
- `csrc/batch_attention.cu`
- `csrc/batch_attention_customize_config.jinja`
- `csrc/batch_attention_jit_pybind.cu`
- `csrc/batch_attention_paged_kernel_inst.jinja`
- `flashinfer/__init__.py`
- `flashinfer/attention.py`
- `flashinfer/jit/__init__.py`
- `flashinfer/jit/attention/__init__.py`
- `flashinfer/jit/attention/pytorch.py`
- `include/flashinfer/attention/cascade.cuh`
- `include/flashinfer/attention/persistent.cuh`
- `include/flashinfer/attention/persistent_template.cuh`
- `include/flashinfer/attention/prefill.cuh`
- `include/flashinfer/attention/scheduler.cuh`
- `include/flashinfer/permuted_smem.cuh`
- `include/flashinfer/utils.cuh`
- `tests/test_batch_attention.py`

## Evidence Bundle

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