From 937d6c19dfec2f928b5c75562c932de2070a40a7 Mon Sep 17 00:00:00 2001 From: Thien Tran Date: Wed, 14 Oct 2026 16:46:54 +0800 Subject: [PATCH] [Perf][GDN] Skip FLA chunk metadata when FlashInfer GDN prefill is active (#61569) Signed-off-by: Thien Tran Co-authored-by: Kimi Code --- vllm/v1/attention/backends/gdn_attn.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vllm/v1/attention/backends/gdn_attn.py b/vllm/v1/attention/backends/gdn_attn.py index 16a2c39176..6b99ec5452 100644 --- a/vllm/v1/attention/backends/gdn_attn.py +++ b/vllm/v1/attention/backends/gdn_attn.py @@ -546,7 +546,10 @@ class GDNAttentionMetadataBuilder(AttentionMetadataBuilder[GDNAttentionMetadata] cu_seqlens=prefill_query_start_loc, ) ) - else: + elif self.gdn_prefill_backend != "flashinfer": + # FlashInfer's chunk kernel consumes cu_seqlens directly and + # never reads chunk_indices/chunk_offsets, so skip the FLA + # metadata (CPU compute + H2D copies) entirely. chunk_indices, chunk_offsets = self._build_chunk_metadata( prefill_query_start_loc, prefill_query_start_loc_cpu,