[Attention] remove decode wrapper of flashinfer #24918
Open
+46
−35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This PR removes the decode wrapper of the FlashInfer backend in V1 to simplify code paths and improve maintenance. As
use_tensor_coresis always enabled for batch decode requests for better performance (vllm/vllm/v1/attention/backends/flashinfer.py
Line 380 in aae725a
DecodeWrapperorPrefillWrapperis theoretically equivalent.In the future, both prefill and decode could be batched and executed within a single kernel call for a unified kernel (as proposed in flashinfer-ai/flashinfer#1137).
cc @heheda12345 for #24856. This PR is compatible with current stable FlashInfer.
Test Plan
Test Result
perf benchmark:

The ~2% perf degrade potentially due to the lightly higher overhead of
planfunction ofBatchPrefillWrapper, which should be minimal when usingfast_decode_plan(vllm/vllm/v1/attention/backends/flashinfer.py
Line 978 in aae725a
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.