-
Notifications
You must be signed in to change notification settings - Fork 920
feat: Integrate CuTe DSL FMHA prefill kernels by loading cubin #3039
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
limin2021
wants to merge
29
commits into
flashinfer-ai:main
Choose a base branch
from
limin2021:integrate_dsl_cubin_fmha
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 7 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
3010812
feat: Integrate CuTe DSL FMHA cubin kernels into prefill backend
limin2021 6fd8c0b
feat: Add FP8 support and fix TMA padding for DSL FMHA prefill
limin2021 19107f6
feat: Add TVM-FFI support for DSL FMHA prefill kernels
limin2021 70a6186
refactor: Consolidate DSL FMHA prefill tests, add ragged shape coverage
limin2021 9147885
fix: Use front-padding for ragged varlen tensors (match DSL example)
limin2021 27cd0aa
feat: Add cute-dsl to benchmark framework, fix CUDA graph compatibility
limin2021 7162590
fix: Preload DSL kernel in plan(), fix output dtype and CUDA graph co…
limin2021 f574404
feat: Route cute-dsl through trtllm_ragged_attention_deepseek, add LS…
limin2021 5ddbd31
fix: Set is_persistent=not is_causal in cute_dsl_fmha_prefill to matc…
limin2021 8a49143
refactor: Remove cute-dsl from single_prefill and BatchPrefillWithRag…
limin2021 05fdbdf
refactor: Remove enable_tvm_ffi=False tests, fix to tvm_ffi=True only
limin2021 7deedef
feat: Support skip-softmax sparsity in cute-dsl FMHA backend
limin2021 df72fc9
fix: Misc cleanups — revert unnecessary prefill.py changes, fix copyr…
limin2021 f55b71b
fix: Use os.path.join for artifact path to avoid absolute path when p…
limin2021 718586e
feat: Wire up DSL FMHA cubin loading from artifactory
limin2021 dcebe3c
update: DSL FMHA artifact path and checksums for multi-arch CI build
limin2021 44db80c
update: Add aarch64 checksums and arch-aware artifact paths for DSL FMHA
limin2021 df6f13e
refactor: Move attention.py into attention/ package, rename attention…
limin2021 61a8665
update: Simplify DSL FMHA test — FP8 only, update docstring
limin2021 4f78691
fix: Review feedback — dedup _get_cpu_arch, document front-padding re…
limin2021 6191a7a
fix: Add dtype validation for cute-dsl backend, remove duplicate head…
limin2021 16e8253
feat: Add FP8 prefill test, consolidate DSL FMHA tests
limin2021 14af985
fix: Rename backend "trtllm-native" to "trtllm-gen" in trtllm_ragged_…
limin2021 4a671bc
Merge origin/main into integrate_dsl_cubin_fmha
limin2021 ae77982
update: DSL FMHA artifact path and checksums to latest cubin release
limin2021 2207c68
test: Mock DSL_FMHA checksums + dir index in test_get_subdir_file_list
limin2021 fdfefa3
Merge branch 'main' into integrate_dsl_cubin_fmha
yzh119 e452cec
fix: Include gpu_arch in get_cute_dsl_fmha_kernel cache key
limin2021 0de6f44
Merge branch 'main' into integrate_dsl_cubin_fmha
yzh119 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Copyright (c) 2025 by FlashInfer team. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| """ | ||
| FlashInfer Attention DSL Module | ||
| ================================ | ||
|
|
||
| CuTe DSL attention kernel implementations (cubin distribution). | ||
| """ |
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,39 @@ | ||
| # Copyright (c) 2025 by FlashInfer team. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| """ | ||
| CuTe DSL Attention Kernels (Cubin Distribution) | ||
| ================================================ | ||
|
|
||
| Pre-compiled FMHA kernels loaded via ExternalBinaryModule. | ||
| """ | ||
|
|
||
| from flashinfer.cute_dsl.utils import is_cute_dsl_available | ||
|
|
||
| if is_cute_dsl_available(): | ||
| from .fmha import ( | ||
| get_cute_dsl_fmha_kernel, | ||
| cute_dsl_fmha_prefill, | ||
| cute_dsl_fmha_ragged_prefill, | ||
| ) | ||
|
|
||
| __all__ = [ | ||
| "is_cute_dsl_available", | ||
| "get_cute_dsl_fmha_kernel", | ||
| "cute_dsl_fmha_prefill", | ||
| "cute_dsl_fmha_ragged_prefill", | ||
| ] | ||
| else: | ||
| __all__ = [ | ||
| "is_cute_dsl_available", | ||
| ] |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.