-
Notifications
You must be signed in to change notification settings - Fork 920
feat(dllm): add Block Extend Attention for Diffusion LLM #2722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
fdz-1999
wants to merge
12
commits into
flashinfer-ai:main
Choose a base branch
from
fdz-1999:feature/block-extend
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
450bf90
Revert "[API change] deprecate tile_token_dim in trtllm_moe (#2086)"
yzh119 a70d31c
bump-version
yzh119 0e68a2f
Merge remote-tracking branch 'origin/main' into HEAD
yzh119 3dfbec1
PullRequest: 6 feat(dllm,ci): add Block Expanding Attention & PyPI re…
fdz-1999 7ea307f
drop flashinfer-jit-cache build
eabde64
rename block_expanding to block_extend; add FlashInfer vs Flex Attent…
8e80f0b
cg->cuda_graph
3f9c818
Blockexpanding->blockextend && Remove redundant comments
b623785
Refine DLLM block-extend path and precision tests
a8266d8
Remove deprecated v2/v3 wrappers in block_extend API
5e07b58
feat(dllm): add Block Extend Attention for Diffusion LLM
fdz-1999 4284113
fix(dllm): address review feedback for Block Extend Attention
fdz-1999 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| from .block_extend import ( | ||
| block_extend_attention_with_offset, | ||
| block_extend_cascade, | ||
| get_block_extend_module_with_offset, | ||
| BLOCK_EXTEND_V2_WITH_OFFSET_VARIANT_DECL, | ||
| BLOCK_EXTEND_V3_WITH_OFFSET_VARIANT_DECL, | ||
| ) | ||
|
|
||
| from .batch_block_extend import ( | ||
| BatchBlockExtendPagedOffsetWrapper, | ||
| BatchBlockExtendRaggedOffsetWrapper, | ||
| batch_block_extend_cascade, | ||
| sglang_style_cascade_attention, | ||
| _BATCH_BE_OFFSET_VARIANT_DECL, | ||
| _BATCH_BE_OFFSET_VARIANT_DECL_FA3, | ||
| _check_batch_be_aot_available, | ||
| _get_batch_be_aot_path, | ||
| _get_batch_be_module_uri, | ||
| ) | ||
|
|
||
| __all__ = [ | ||
| # Single Prefill with offset (FA2/FA3 auto-select) | ||
| "block_extend_attention_with_offset", | ||
| "get_block_extend_module_with_offset", | ||
| "BLOCK_EXTEND_V2_WITH_OFFSET_VARIANT_DECL", | ||
| "BLOCK_EXTEND_V3_WITH_OFFSET_VARIANT_DECL", | ||
| # Cascade + block extend (SGLang 风格: causal + merge_state) | ||
| "block_extend_cascade", | ||
| "batch_block_extend_cascade", | ||
| "sglang_style_cascade_attention", | ||
| # Batch Prefill with offset versions | ||
| "BatchBlockExtendPagedOffsetWrapper", | ||
| "BatchBlockExtendRaggedOffsetWrapper", | ||
| # Batch Offset variant declarations | ||
| "_BATCH_BE_OFFSET_VARIANT_DECL", | ||
| "_BATCH_BE_OFFSET_VARIANT_DECL_FA3", | ||
| ] | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sort
__all__to satisfy Ruff.Ruff flags this list with RUF022; please apply the project’s
__all__sorting convention or the lint step may fail.🛠️ Proposed fix
🧰 Tools
🪛 Ruff (0.15.10)
[warning] 21-37:
__all__is not sortedApply an isort-style sorting to
__all__(RUF022)
🤖 Prompt for AI Agents