---
id: pr-flashinfer-2799
repo: flashinfer-ai/flashinfer
pr: 2799
title: '[fmha-v2] Support HND and NHD paged KV cache layouts with conditional stride handling'
author: zhou-yuxin
date: '2026-05-01'
url: https://github.com/flashinfer-ai/flashinfer/pull/2799
source_category: upstream-code
architectures:
- sm90
tags:
- TMA
- attention_kv
- hopper
- paged attention
- warpspec
techniques:
- async-copy
- cache-policy
- kernel-fusion
- warp-specialization
hardware_features:
- hopper
- tma
kernel_types:
- attention
languages:
- cuda-cpp
captured_at: '2026-05-16'
status: merged
merge_sha: cd6c7030d52fa2d5e7cef63d131ae19886a9b7e3
inclusion_reason: Preserve page/KV/layout and plan-run contracts; profile memory traffic separately from math utilization.
changed_paths:
- csrc/fmha_v2/fmha/gmem_tile_qkv_packed.h
- csrc/fmha_v2/fmha/warpspec/dma.h
- csrc/fmha_v2/fused_multihead_attention.h
- csrc/fmha_v2/fused_multihead_attention_demo_bert_params.h
- csrc/fmha_v2_run.cu
- flashinfer/prefill.py
artifact_dir: evidence/pull-bundles/flashinfer/gh-2799
head_ref_oid: 3175712ca11a1fd59fe7bbbe2aa2e14be5ffab69
---
# [fmha-v2] Support HND and NHD paged KV cache layouts with conditional stride handling

- Repository: `flashinfer-ai/flashinfer`
- PR: [2799](https://github.com/flashinfer-ai/flashinfer/pull/2799)
- Decision: `Preserve page/KV/layout and plan-run contracts; profile memory traffic separately from math utilization.`
- Reason: Preserve page/KV/layout and plan-run contracts; profile memory traffic separately from math utilization.

## Changed Paths

- `csrc/fmha_v2/fmha/gmem_tile_qkv_packed.h`
- `csrc/fmha_v2/fmha/warpspec/dma.h`
- `csrc/fmha_v2/fused_multihead_attention.h`
- `csrc/fmha_v2/fused_multihead_attention_demo_bert_params.h`
- `csrc/fmha_v2_run.cu`
- `flashinfer/prefill.py`

## Evidence Bundle

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