---
id: pr-flashinfer-1661
repo: flashinfer-ai/flashinfer
pr: 1661
title: 'perf&bugfix: skip kv-tile computation out of sliding window in FA2; fix __syncthreads in mergestate'
author: happierpig
date: '2025-09-11'
url: https://github.com/flashinfer-ai/flashinfer/pull/1661
source_category: upstream-code
architectures:
- sm100
tags:
- attention
- decode
- fp8
- prefill
techniques: []
hardware_features:
- fp8
kernel_types:
- attention
- decode
- prefill
languages:
- cuda-cpp
captured_at: '2026-04-27'
status: merged
merge_sha: 6dff34d1b8aadec626bd507715a5f45999458329
inclusion_reason: kernel file changes
changed_paths:
- benchmarks/bench_sliding_window.py
- csrc/batch_prefill.cu
- csrc/batch_prefill_fp8_sm90.cu
- csrc/batch_prefill_jit_pybind.cu
- csrc/batch_prefill_sm90.cu
- csrc/batch_prefill_sm90_jit_pybind.cu
- flashinfer/decode.py
- flashinfer/pod.py
- flashinfer/prefill.py
- flashinfer/sparse.py
- include/flashinfer/attention/cascade.cuh
- include/flashinfer/attention/prefill.cuh
- include/flashinfer/attention/scheduler.cuh
- include/flashinfer/attention/variants.cuh
- tests/test_sliding_window.py
- tvm_binding/batch_prefill.cu
- tvm_binding/batch_prefill_jit_tvm_binding.cu
- tvm_binding/batch_prefill_sm90.cu
- tvm_binding/batch_prefill_sm90_jit_tvm_binding.cu
head_ref_oid: 6d89e5717a13db2e7e6e86faf72cbbb3d40651c4
artifact_dir: evidence/pull-bundles/flashinfer/gh-1661
---
# perf&bugfix: skip kv-tile computation out of sliding window in FA2; fix __syncthreads in mergestate

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

## Changed Paths

- `benchmarks/bench_sliding_window.py`
- `csrc/batch_prefill.cu`
- `csrc/batch_prefill_fp8_sm90.cu`
- `csrc/batch_prefill_jit_pybind.cu`
- `csrc/batch_prefill_sm90.cu`
- `csrc/batch_prefill_sm90_jit_pybind.cu`
- `flashinfer/decode.py`
- `flashinfer/pod.py`
- `flashinfer/prefill.py`
- `flashinfer/sparse.py`
- `include/flashinfer/attention/cascade.cuh`
- `include/flashinfer/attention/prefill.cuh`
- `include/flashinfer/attention/scheduler.cuh`
- `include/flashinfer/attention/variants.cuh`
- `tests/test_sliding_window.py`
- `tvm_binding/batch_prefill.cu`
- `tvm_binding/batch_prefill_jit_tvm_binding.cu`
- `tvm_binding/batch_prefill_sm90.cu`
- `tvm_binding/batch_prefill_sm90_jit_tvm_binding.cu`

## Evidence Bundle

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