﻿# FlashInfer study: dynamic CPU planning, CUDA graphs and latency claims

Trace the original FlashInfer results to CPU planning, graph replay, the H100 serving stack and separate long-context and shared-prefix experiments.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/flashinfer-original-study-dynamic-planning-graph-latency/
Language: en

FlashInfer's original serving study is about adapting attention computation to changing sequence lengths and KV-cache layouts. Its design combines a block-sparse representation, customizable generated kernels and a runtime scheduler. The practical insight is that dynamic requests can be handled without rebuilding the entire captured GPU execution graph for every generation step. [Full paper, version 2](https://arxiv.org/html/2501.01005v2).

## The scheduler prepares work outside the captured graph

The paper separates planning from execution. Planning uses current sequence lengths to distribute work and map partial attention outputs to final outputs. It runs on the CPU, and its metadata is copied into GPU workspace. Execution uses that plan with persistent kernels and fixed workspace offsets.

The planning function is not captured by CUDA graphs; the execution function can be. Plans may be reused across attention operations with matching sequence-length specifications, such as layers within a generation step. Compatibility with graph replay therefore does not mean the entire dynamic scheduling process has disappeared or become a static GPU-only operation.

## The headline serving result has a named experimental stack

The evaluation describes FlashInfer 0.2, SGLang 0.3.4, CUDA 12.4 and PyTorch 2.4.0, using half precision. The general hardware section identifies A100 40 GB SXM and H100 80 GB SXM. The main serving comparison specifically uses Llama 3.1 8B on one H100 and 70B on four H100s.

Request rate is adjusted to keep P99 time to first token below 200 ms. The reported 29–69% inter-token latency reduction is consequently evidence from a latency-constrained serving comparison against the selected Triton backend, not a throughput guarantee for every installable device. It also should not be transferred to a different request distribution without measurement.

## Long-context and parallel-generation percentages describe other cases

The long-context experiment integrates fused attention and rotary position handling into an optimized Streaming-LLM implementation. It uses Vicuna-13B and MT-Bench, reporting 28–30% latency reduction as the recent-window size changes. That is a separate workload from the main SGLang comparison.

The parallel-generation experiment instead tests composable shared-prefix formats in MLC-Engine. At four parallel outputs, it reports inter-token latency reductions of 13.73% for the 8B model and 17.42% for the 70B model. These are latency reductions, not automatically the same percentages of extra tokens per second. The paper notes limited benefit when the shared-prefix opportunity is small and eventual saturation when attention stops dominating the workload.

## Reproduce a design choice rather than a permanent ranking

The [current official repository](https://github.com/flashinfer-ai/flashinfer) describes a broader library with multiple operations and backends. That evolving implementation is not identical to the paper's evaluated release. Record the selected package revision, attention path, layouts and device before comparing it with the historical results.

The [FlashInfer and FlashAttention guide](/journal/flashinfer-vs-flashattention-kernel-stack/) places those libraries within a complete kernel stack. The [benchmark method guide](/journal/inference-benchmark-method/) helps define matched workloads. For this specific study, preserve CPU planning, graph replay, request lengths and prefix-sharing conditions as separate parts of the experiment. That makes the result useful for deciding whether its scheduling and cache design address an actual serving bottleneck, rather than turning several unrelated percentage ranges into one universal speedup.

## Sources

- [Original FlashInfer paper and experimental details](https://arxiv.org/html/2501.01005v2).
- [Official implementation and current project scope](https://github.com/flashinfer-ai/flashinfer).
