[Refactor] Move fla to third party (#48500)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2026-07-16 19:22:36 +01:00
committed by GitHub
parent 251f7e478e
commit 626c90b2d5
42 changed files with 87 additions and 62 deletions
+4 -2
View File
@@ -331,7 +331,9 @@ class GDNAttentionMetadataBuilder(AttentionMetadataBuilder[GDNAttentionMetadata]
prefill_state_indices: torch.Tensor | None = None
prefill_has_initial_state: torch.Tensor | None = None
if num_prefills > 0:
from vllm.model_executor.layers.fla.ops.utils import FLA_CHUNK_SIZE
from vllm.third_party.flash_linear_attention.ops.utils import (
FLA_CHUNK_SIZE,
)
# In a mixed non-spec batch, decodes are peeled off to the recurrent
# kernel (decode-first front slice), so build chunk metadata from the
@@ -371,7 +373,7 @@ class GDNAttentionMetadataBuilder(AttentionMetadataBuilder[GDNAttentionMetadata]
# Only prefill batches use FLA chunk ops.
# Pre-compute on CPU and async-copy to GPU to avoid
# GPU→CPU sync (.tolist()) in prepare_chunk_indices.
from vllm.model_executor.layers.fla.ops.index import (
from vllm.third_party.flash_linear_attention.ops.index import (
prepare_chunk_indices,
prepare_chunk_offsets,
)