---
id: pr-flashinfer-2841
repo: flashinfer-ai/flashinfer
pr: 2841
title: '[Perf] Add FMHAv2 to flashinfer_benchmark.py and eliminate unnecessary H2D'
author: jimmyzho
date: '2026-05-06'
url: https://github.com/flashinfer-ai/flashinfer/pull/2841
source_category: upstream-code
architectures:
- sm100
- sm90
tags:
- TMA
- arch_pipeline
- attention_kv
- benchmark
- benchmark_test
- cuda kernel
- fp8
- hopper
- nvfp4
- paged attention
- sm90
- warpspec
techniques:
- async-copy
- cache-policy
- epilogue-fusion
- pipeline-stages
- warp-specialization
hardware_features:
- fp4
- fp8
- hopper
- nvfp4
- tma
kernel_types:
- attention
- runtime
languages:
- cuda-cpp
captured_at: '2026-05-16'
status: merged
merge_sha: 955ddc9599288e7fcb9b26d2cb3960e6451959d5
inclusion_reason: Preserve page/KV/layout and plan-run contracts; profile memory traffic separately from math utilization.
changed_paths:
- benchmarks/routines/attention.py
- benchmarks/routines/flashinfer_benchmark_utils.py
- csrc/fmha_v2/fmha/gmem_tile_qkv_packed.h
- csrc/fmha_v2/fmha/paged_kv_cache.h
- csrc/fmha_v2/fmha/warpspec/dma.h
- csrc/fmha_v2/fmha/warpspec/epilogue.h
- csrc/fmha_v2_jit_binding.cu
- csrc/fmha_v2_run.cu
- flashinfer/prefill.py
- tests/attention/test_fmha_v2_prefill.py
artifact_dir: evidence/pull-bundles/flashinfer/gh-2841
head_ref_oid: 3019f97a6ecb28495a4c3fe574470f2ba50241f8
---
# [Perf] Add FMHAv2 to flashinfer_benchmark.py and eliminate unnecessary H2D

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

- `benchmarks/routines/attention.py`
- `benchmarks/routines/flashinfer_benchmark_utils.py`
- `csrc/fmha_v2/fmha/gmem_tile_qkv_packed.h`
- `csrc/fmha_v2/fmha/paged_kv_cache.h`
- `csrc/fmha_v2/fmha/warpspec/dma.h`
- `csrc/fmha_v2/fmha/warpspec/epilogue.h`
- `csrc/fmha_v2_jit_binding.cu`
- `csrc/fmha_v2_run.cu`
- `flashinfer/prefill.py`
- `tests/attention/test_fmha_v2_prefill.py`

## Evidence Bundle

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