-
Notifications
You must be signed in to change notification settings - Fork 817
[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
151
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
151 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 3f06482
Merge branch 'main' into fe_check_support
cyanguwa e2d1fc9
remove redundant change
cyanguwa fa6e636
group newly enabled SWA tests to tiers L0/L1 in Jax
cyanguwa 5b33337
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6461b66
fix lint
cyanguwa 00429e7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 988c9ba
fix torch.compile for get_backend
cyanguwa 96ee857
Merge branch 'main' into fe_check_support
cyanguwa d374a3d
a cleaner way to make torch.compile work
cyanguwa 288046c
skip fused attn checks for flash tests
cyanguwa 1d10f80
add tq/tkv to per-step cp configs
cyanguwa e3300ea
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7b604a2
Merge branch 'main' into fe_check_support
cyanguwa fbf1988
Merge branch 'main' into fe_check_support
cyanguwa dadb07f
Merge branch 'main' into fe_check_support
cyanguwa 71e8982
fix jax CI
cyanguwa 8fdd81d
temporary changes: cache debug, timers, single flight, is_probe, dry-…
cyanguwa e027294
Revert "temporary changes: cache debug, timers, single flight, is_pro…
cyanguwa 734aca7
fix probe/exec bias drift in keys
cyanguwa d2f7774
fix probe/exec cp drift in keys
cyanguwa 6201d04
fix MHA init to avoid probe/exec drift
cyanguwa 157a975
WIP: graph cache and restructuring of impl
cyanguwa 6d2b577
revert consolidating of derive() and make nvte_get_backend_v2 only re…
cyanguwa ce58a99
incorporate PR5
cyanguwa 35d6da1
address review comments
cyanguwa 24f53ba
fix CI failures
cyanguwa 2a7eed9
more fixes: cache only genuine cuDNN refusals, bound the graph cache …
cyanguwa 76ae514
WIP: restructuring and polishing
cyanguwa 63b959a
WIP: clean up graph cache/debug
cyanguwa a82b6bd
WIP: tidy up structure
cyanguwa 244fc73
Merge branch 'main' into fe_check_support
cyanguwa fbc09d4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 596c227
fix compile warnings and misc changes
cyanguwa 4a20bba
Merge branch 'main' into fe_check_support
cyanguwa 9609324
WIP: trim code/comments
cyanguwa 76092d1
WIP: trim code/comments v2
cyanguwa b1417ca
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] da7aa18
minor fixes
cyanguwa c5b31e7
fix notebook
cyanguwa 2a86e66
fix notebook
cyanguwa 108c87f
more fixes
cyanguwa d56bf1d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f0bb146
Merge branch 'main' into fe_check_support
cyanguwa cb0f2f3
Merge remote-tracking branch 'upstream/main' into fe_check_support
cyanguwa 63f5ed8
minor tweaks of notebook
cyanguwa 61fee23
reorder FusedAttnFwd/BwdParams scalars to match FusedAttnConfig
cyanguwa 15a50d0
improvements/fixes
cyanguwa 4f8e7d7
fix jax merge
cyanguwa 4fd2657
Merge branch 'main' into fe_check_support
cyanguwa 9cf5959
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] cf5deb9
remove redundant comments
cyanguwa 2cc172e
fix linter
cyanguwa 7a6c28a
revert to some main condition
cyanguwa a70360a
fix thd in jax
cyanguwa ff284f4
fix CP AG gradient count
cyanguwa 87ae24f
add test for fused error message; thread t_q/kv to probe in tests
cyanguwa 1712ef5
add jax error message test
cyanguwa 2326342
swap input_batch for num_segments in jax get_backend
cyanguwa ec8b1ec
minor tweaks based on AI review
cyanguwa 527e1cd
swap input_batch for num_segments in jax get_backend; more files
cyanguwa 018e929
Merge branch 'main' into fe_check_support
cyanguwa 1828910
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7e56d0a
restrict MLA to sm100+
cyanguwa 7fb4db1
drop token counts for bshd/sbhd as well
cyanguwa 90847a0
minor tweak to last commit regarding dropping token counts
cyanguwa 29fb985
UnsupportedByCudnn struct; distinguish multi-dev on single thread; re…
cyanguwa 54d9348
allow mixed THD+2BSHD on sm80 for kv cache
cyanguwa 6f8ae9d
Merge branch 'main' into fe_check_support
cyanguwa 4968849
fix merge conflicts
cyanguwa 7102107
add back fp8 sink bwd condition
cyanguwa 8b9ddd7
recover 3 CP tests by removing brcm + thd constriction for p2p
cyanguwa 5356a82
Merge branch 'main' into fe_check_support
cyanguwa 81cd2c0
merge main
cyanguwa 83cd9fa
improve jupiter notebook
cyanguwa 0f60e59
improve jupiter notebook
cyanguwa ff2bf57
improve jupiter notebook
cyanguwa 61ef743
improve jupiter notebook
cyanguwa 991a4aa
improve jupiter notebook
cyanguwa 1b5b7a5
tweak test files
cyanguwa dafb68e
minor tweaks to common
cyanguwa ccf5aab
tweak docstrings
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
Some comments aren't visible on the classic Files Changed page.
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
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.