-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[None][feat] Autodeploy add triton configs and optimize mamba prefill #9083
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6a58b3b
Optimize triton mamba's prefill and add triton configs for fused moe
suyoggupta c64cc33
updates tests, add some comments to attention_interface
suyoggupta c3e7e12
move more stuff into prepare_metadata
suyoggupta e55be8f
update test to use seq_idx_prefill
suyoggupta 0d667dd
set a default value for chunk size
suyoggupta 13a5836
add jsons to package data
suyoggupta 479103f
set default chunk size in hf factory
suyoggupta 7f016b4
add comments explaining a potential issue with the new custom op
suyoggupta f2ec3d8
add default chunk size in attn i/f
suyoggupta 1bd9efa
remove commented code
suyoggupta e8ce873
add tracking ticket
suyoggupta b15a2f8
make the mamba custom op torch.compile compatible by fixing the fake …
suyoggupta befaa83
update license
suyoggupta 33ef830
Merge branch 'main' into sg/mamba-prefill
suyoggupta 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
147 changes: 147 additions & 0 deletions
147
...ps/fused_moe/triton_fused_moe_configs/E=128,N=1856,device_name=NVIDIA_H100_80GB_HBM3.json
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,147 @@ | ||
| { | ||
| "triton_version": "3.5.0", | ||
| "1": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 64, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 4, | ||
| "num_stages": 4 | ||
| }, | ||
| "2": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 64, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 4, | ||
| "num_stages": 3 | ||
| }, | ||
| "4": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 64, | ||
| "BLOCK_SIZE_K": 128, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 8, | ||
| "num_stages": 4 | ||
| }, | ||
| "8": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 64, | ||
| "BLOCK_SIZE_K": 128, | ||
| "GROUP_SIZE_M": 64, | ||
| "num_warps": 4, | ||
| "num_stages": 5 | ||
| }, | ||
| "16": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 128, | ||
| "BLOCK_SIZE_K": 128, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 8, | ||
| "num_stages": 5 | ||
| }, | ||
| "24": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 64, | ||
| "num_warps": 4, | ||
| "num_stages": 3 | ||
| }, | ||
| "32": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 4, | ||
| "num_stages": 5 | ||
| }, | ||
| "48": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 64, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 4, | ||
| "num_stages": 5 | ||
| }, | ||
| "64": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 4, | ||
| "num_stages": 5 | ||
| }, | ||
| "96": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 4, | ||
| "num_stages": 5 | ||
| }, | ||
| "128": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 4, | ||
| "num_stages": 5 | ||
| }, | ||
| "256": { | ||
| "BLOCK_SIZE_M": 32, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 128, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 4, | ||
| "num_stages": 5 | ||
| }, | ||
| "512": { | ||
| "BLOCK_SIZE_M": 64, | ||
| "BLOCK_SIZE_N": 128, | ||
| "BLOCK_SIZE_K": 128, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 8, | ||
| "num_stages": 4 | ||
| }, | ||
| "1024": { | ||
| "BLOCK_SIZE_M": 64, | ||
| "BLOCK_SIZE_N": 128, | ||
| "BLOCK_SIZE_K": 128, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 8, | ||
| "num_stages": 4 | ||
| }, | ||
| "1536": { | ||
| "BLOCK_SIZE_M": 128, | ||
| "BLOCK_SIZE_N": 128, | ||
| "BLOCK_SIZE_K": 64, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 4, | ||
| "num_stages": 3 | ||
| }, | ||
| "2048": { | ||
| "BLOCK_SIZE_M": 128, | ||
| "BLOCK_SIZE_N": 128, | ||
| "BLOCK_SIZE_K": 64, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 8, | ||
| "num_stages": 5 | ||
| }, | ||
| "3072": { | ||
| "BLOCK_SIZE_M": 128, | ||
| "BLOCK_SIZE_N": 256, | ||
| "BLOCK_SIZE_K": 64, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 8, | ||
| "num_stages": 4 | ||
| }, | ||
| "4096": { | ||
| "BLOCK_SIZE_M": 128, | ||
| "BLOCK_SIZE_N": 256, | ||
| "BLOCK_SIZE_K": 64, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 8, | ||
| "num_stages": 4 | ||
| } | ||
| } |
147 changes: 147 additions & 0 deletions
147
...y/custom_ops/fused_moe/triton_fused_moe_configs/E=128,N=1856,device_name=NVIDIA_L40S.json
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,147 @@ | ||
| { | ||
| "triton_version": "3.5.0", | ||
| "1": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 8, | ||
| "num_stages": 4 | ||
| }, | ||
| "2": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 32, | ||
| "num_warps": 4, | ||
| "num_stages": 4 | ||
| }, | ||
| "4": { | ||
| "BLOCK_SIZE_M": 32, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 128, | ||
| "GROUP_SIZE_M": 16, | ||
| "num_warps": 8, | ||
| "num_stages": 5 | ||
| }, | ||
| "8": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 64, | ||
| "num_warps": 4, | ||
| "num_stages": 4 | ||
| }, | ||
| "16": { | ||
| "BLOCK_SIZE_M": 32, | ||
| "BLOCK_SIZE_N": 64, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 16, | ||
| "num_warps": 4, | ||
| "num_stages": 3 | ||
| }, | ||
| "24": { | ||
| "BLOCK_SIZE_M": 32, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 128, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 8, | ||
| "num_stages": 5 | ||
| }, | ||
| "32": { | ||
| "BLOCK_SIZE_M": 32, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 128, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 4, | ||
| "num_stages": 5 | ||
| }, | ||
| "48": { | ||
| "BLOCK_SIZE_M": 32, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 16, | ||
| "num_warps": 4, | ||
| "num_stages": 4 | ||
| }, | ||
| "64": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 32, | ||
| "num_warps": 4, | ||
| "num_stages": 5 | ||
| }, | ||
| "96": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 16, | ||
| "num_warps": 8, | ||
| "num_stages": 5 | ||
| }, | ||
| "128": { | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 8, | ||
| "num_stages": 5 | ||
| }, | ||
| "256": { | ||
| "BLOCK_SIZE_M": 32, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 4, | ||
| "num_stages": 4 | ||
| }, | ||
| "512": { | ||
| "BLOCK_SIZE_M": 32, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 64, | ||
| "num_warps": 4, | ||
| "num_stages": 4 | ||
| }, | ||
| "1024": { | ||
| "BLOCK_SIZE_M": 64, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 64, | ||
| "num_warps": 4, | ||
| "num_stages": 3 | ||
| }, | ||
| "1536": { | ||
| "BLOCK_SIZE_M": 64, | ||
| "BLOCK_SIZE_N": 32, | ||
| "BLOCK_SIZE_K": 128, | ||
| "GROUP_SIZE_M": 64, | ||
| "num_warps": 8, | ||
| "num_stages": 5 | ||
| }, | ||
| "2048": { | ||
| "BLOCK_SIZE_M": 64, | ||
| "BLOCK_SIZE_N": 128, | ||
| "BLOCK_SIZE_K": 256, | ||
| "GROUP_SIZE_M": 64, | ||
| "num_warps": 8, | ||
| "num_stages": 2 | ||
| }, | ||
| "3072": { | ||
| "BLOCK_SIZE_M": 64, | ||
| "BLOCK_SIZE_N": 128, | ||
| "BLOCK_SIZE_K": 128, | ||
| "GROUP_SIZE_M": 1, | ||
| "num_warps": 4, | ||
| "num_stages": 3 | ||
| }, | ||
| "4096": { | ||
| "BLOCK_SIZE_M": 128, | ||
| "BLOCK_SIZE_N": 128, | ||
| "BLOCK_SIZE_K": 128, | ||
| "GROUP_SIZE_M": 32, | ||
| "num_warps": 8, | ||
| "num_stages": 2 | ||
| } | ||
| } |
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.