-
Notifications
You must be signed in to change notification settings - Fork 783
[All] Refactor fused attention APIs with cuDNN-frontend support checks and opaque config/params handles #2964
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
cyanguwa
wants to merge
70
commits into
NVIDIA:main
Choose a base branch
from
cyanguwa:fe_check_support
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 all commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
2b9fbc5
refactor nvte_get_fused_attn_backend with FE calls
cyanguwa 16b837c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5a482f9
Merge branch 'main' into fe_check_support
cyanguwa 42bcd89
replace code+string with string only
cyanguwa de8e814
clean up logic/comments/structure
cyanguwa 4b8c7ed
Merge branch 'main' into fe_check_support
cyanguwa 81e59a9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5640c68
Merge branch 'main' into fe_check_support
cyanguwa 6c5126d
fix compilation errors
cyanguwa d35bff7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f6fc585
remove handle from API; add bottom_right_diagonal
cyanguwa 3e666b0
add batch_size to API
cyanguwa 056aba6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e054863
fix jax binding
cyanguwa a7fe928
specify o_dtype for FP8s
cyanguwa c9b22b5
fix BRCM and custom_fp8 tests
cyanguwa ac44e66
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9131b2d
add o_format/etc to API and other tweaks
cyanguwa 956f159
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b21f606
minor tweaks for docstring
cyanguwa 3421920
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7956b43
replace with nvte_get_fused_attn_backend_v2 and add NVTEFusedAttnConfig
cyanguwa e86fc67
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e2561d0
fix FP8 tests
cyanguwa 724a12f
add do_dtype and dqkv_dtype to API
cyanguwa 3ae36df
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3532e98
Merge branch 'main' into fe_check_support
cyanguwa 3bed68d
Merge branch 'main' into fe_check_support
cyanguwa d634f3b
Merge branch 'main' into fe_check_support
cyanguwa 1c09072
replace with opaque handle
cyanguwa ac19f9d
repeat with fwd/bwd params
cyanguwa 88a327c
remove bucketed b/t_q/t_kv
cyanguwa 391fe2e
thread _v2 through, fix default scaling mode, make config specific to…
cyanguwa 877bf99
Merge branch 'main' into fe_check_support
cyanguwa 261bb9a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] c03d852
reorder struct fields, consolidate APIs to derive, make_config, make_…
cyanguwa eadd005
simplify fused attn config/params wrappers via set_attr helper, add g…
cyanguwa d052fcd
Merge branch 'main' into fe_check_support
cyanguwa 28f5a8c
clean up derived fields, debug probe/exec graph mismatches
cyanguwa ade19fe
match fused attn availability probe to runtime for FP8 specs and per-…
cyanguwa 42e9747
fix bias for jax
cyanguwa c66028a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] cf3265e
fused-attn: share graph cache across threads via mutex, require cuDNN…
cyanguwa cda01d7
Cache attention-backend selection keyed on (NVTE_* env, attention_par…
cyanguwa aa34ccb
use macros for attr_sizes[], cache_key_tuple(), and fprintf in cache …
cyanguwa 642b58a
Revert "use macros for attr_sizes[], cache_key_tuple(), and fprintf i…
cyanguwa 97cb2b7
remove graph cache debug code
cyanguwa 17e5fe0
review and clean up
cyanguwa f802afc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d65c617
guard against pre-scale bias
cyanguwa 47421b9
fix score mod Jax tests
cyanguwa b6d04eb
Mirror PyTorch NVTE_DEBUG logging in JAX fused-attn backend selection…
cyanguwa bcbc084
tidy up on jax side
cyanguwa 1a8c087
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1632f7b
fix lint
cyanguwa c0233a1
fix nvte_get_fused_attn_backend shim, docstring, bias/softmax pointers
cyanguwa 928dd33
add device_id as a key
cyanguwa 7ff8058
add docstring for FP8 recipes
cyanguwa 1db50d9
fix doc/ipynb
cyanguwa dca9585
avoid duplicate checks for fused backend and force to 0 for bias shap…
cyanguwa 7585a1b
reduce ipynb diffs
cyanguwa bd557ca
Merge branch 'main' into fe_check_support
cyanguwa a32b671
Merge branch 'main' into fe_check_support
cyanguwa cbf6550
add fused attn graph cache debug code
cyanguwa bf4bfc0
fix kv cache probes
cyanguwa c7ea7be
Merge branch 'main' into fe_check_support
cyanguwa c056cbe
deduplicate L0 pytest tests
cyanguwa e890b2a
Merge remote-tracking branch 'origin/fe_check_support' into fe_check_…
cyanguwa 16df390
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a6da26e
fix merge with torch.compile PRs
cyanguwa 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
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
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.
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.
Note: The explicit is_fused_attn_kernel_available() pre-check is no longer needed here:
FusedAttnRunner._check_configs() now runs the cuDNN-frontend support probe during
setup and skips with a diagnostic message when no fused-attn backend is available.