-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Kernel] change benchmark script so that result can be directly used; tune moe kernel in A100/H100 with tp=2,4,8 #3389
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
11 commits
Select commit
Hold shift + click to select a range
2f356ed
change benchmark script so that result can be directly used
youkaichao 005eaf2
update function name
youkaichao 02ba322
update moe kernel tuning config
youkaichao 8f98e08
add more moe kernel tuning config
youkaichao b936d3f
add more moe kernel tuning config
youkaichao e82d641
add more moe kernel tuning config
youkaichao be38ca7
add newline in the end of file
youkaichao b4a60f5
expose vllm.model_executor.layers.fused_moe.get_config_file_name
youkaichao db79917
Merge remote-tracking branch 'vllm/main' into moe-kernel-tuning
youkaichao 8c44d59
fix yapf
youkaichao 9b8f7c5
fix ruff
youkaichao 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
from vllm.model_executor.layers.fused_moe.fused_moe import fused_moe | ||
from vllm.model_executor.layers.fused_moe.fused_moe import ( | ||
fused_moe, | ||
get_config_file_name, | ||
) | ||
|
||
__all__ = [ | ||
"fused_moe", | ||
"get_config_file_name", | ||
] |
146 changes: 146 additions & 0 deletions
146
...model_executor/layers/fused_moe/configs/E=8,N=1792,device_name=NVIDIA_A100-SXM4-80GB.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,146 @@ | ||
{ | ||
"1": { | ||
"BLOCK_SIZE_M": 16, | ||
"BLOCK_SIZE_N": 32, | ||
"BLOCK_SIZE_K": 128, | ||
"GROUP_SIZE_M": 16, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"2": { | ||
"BLOCK_SIZE_M": 16, | ||
"BLOCK_SIZE_N": 64, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 16, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"4": { | ||
"BLOCK_SIZE_M": 16, | ||
"BLOCK_SIZE_N": 128, | ||
"BLOCK_SIZE_K": 128, | ||
"GROUP_SIZE_M": 1, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"8": { | ||
"BLOCK_SIZE_M": 16, | ||
"BLOCK_SIZE_N": 128, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 32, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"16": { | ||
"BLOCK_SIZE_M": 16, | ||
"BLOCK_SIZE_N": 256, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 32, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"24": { | ||
"BLOCK_SIZE_M": 32, | ||
"BLOCK_SIZE_N": 32, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 32, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"32": { | ||
"BLOCK_SIZE_M": 16, | ||
"BLOCK_SIZE_N": 32, | ||
"BLOCK_SIZE_K": 256, | ||
"GROUP_SIZE_M": 32, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"48": { | ||
"BLOCK_SIZE_M": 16, | ||
"BLOCK_SIZE_N": 32, | ||
"BLOCK_SIZE_K": 128, | ||
"GROUP_SIZE_M": 32, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"64": { | ||
"BLOCK_SIZE_M": 32, | ||
"BLOCK_SIZE_N": 32, | ||
"BLOCK_SIZE_K": 256, | ||
"GROUP_SIZE_M": 16, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"96": { | ||
"BLOCK_SIZE_M": 32, | ||
"BLOCK_SIZE_N": 32, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 64, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"128": { | ||
"BLOCK_SIZE_M": 16, | ||
"BLOCK_SIZE_N": 128, | ||
"BLOCK_SIZE_K": 128, | ||
"GROUP_SIZE_M": 64, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"256": { | ||
"BLOCK_SIZE_M": 64, | ||
"BLOCK_SIZE_N": 256, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 32, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"512": { | ||
"BLOCK_SIZE_M": 64, | ||
"BLOCK_SIZE_N": 256, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 64, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"1024": { | ||
"BLOCK_SIZE_M": 64, | ||
"BLOCK_SIZE_N": 256, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 32, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"1536": { | ||
"BLOCK_SIZE_M": 64, | ||
"BLOCK_SIZE_N": 256, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 64, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"2048": { | ||
"BLOCK_SIZE_M": 64, | ||
"BLOCK_SIZE_N": 256, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 32, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"3072": { | ||
"BLOCK_SIZE_M": 128, | ||
"BLOCK_SIZE_N": 128, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 16, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"4096": { | ||
"BLOCK_SIZE_M": 128, | ||
"BLOCK_SIZE_N": 128, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 16, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
} | ||
} |
146 changes: 146 additions & 0 deletions
146
...model_executor/layers/fused_moe/configs/E=8,N=1792,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,146 @@ | ||
{ | ||
"1": { | ||
"BLOCK_SIZE_M": 16, | ||
"BLOCK_SIZE_N": 32, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 32, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"2": { | ||
"BLOCK_SIZE_M": 16, | ||
"BLOCK_SIZE_N": 256, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 32, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"4": { | ||
"BLOCK_SIZE_M": 16, | ||
"BLOCK_SIZE_N": 32, | ||
"BLOCK_SIZE_K": 256, | ||
"GROUP_SIZE_M": 64, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"8": { | ||
"BLOCK_SIZE_M": 16, | ||
"BLOCK_SIZE_N": 128, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 1, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"16": { | ||
"BLOCK_SIZE_M": 16, | ||
"BLOCK_SIZE_N": 256, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 64, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"24": { | ||
"BLOCK_SIZE_M": 32, | ||
"BLOCK_SIZE_N": 128, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 64, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"32": { | ||
"BLOCK_SIZE_M": 32, | ||
"BLOCK_SIZE_N": 128, | ||
"BLOCK_SIZE_K": 128, | ||
"GROUP_SIZE_M": 64, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"48": { | ||
"BLOCK_SIZE_M": 32, | ||
"BLOCK_SIZE_N": 128, | ||
"BLOCK_SIZE_K": 128, | ||
"GROUP_SIZE_M": 1, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"64": { | ||
"BLOCK_SIZE_M": 32, | ||
"BLOCK_SIZE_N": 128, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 16, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"96": { | ||
"BLOCK_SIZE_M": 32, | ||
"BLOCK_SIZE_N": 128, | ||
"BLOCK_SIZE_K": 128, | ||
"GROUP_SIZE_M": 1, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"128": { | ||
"BLOCK_SIZE_M": 64, | ||
"BLOCK_SIZE_N": 128, | ||
"BLOCK_SIZE_K": 128, | ||
"GROUP_SIZE_M": 1, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"256": { | ||
"BLOCK_SIZE_M": 128, | ||
"BLOCK_SIZE_N": 256, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 1, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"512": { | ||
"BLOCK_SIZE_M": 64, | ||
"BLOCK_SIZE_N": 128, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 32, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"1024": { | ||
"BLOCK_SIZE_M": 64, | ||
"BLOCK_SIZE_N": 256, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 64, | ||
"num_warps": 4, | ||
"num_stages": 4 | ||
}, | ||
"1536": { | ||
"BLOCK_SIZE_M": 128, | ||
"BLOCK_SIZE_N": 256, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 32, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"2048": { | ||
"BLOCK_SIZE_M": 128, | ||
"BLOCK_SIZE_N": 256, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 64, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"3072": { | ||
"BLOCK_SIZE_M": 128, | ||
"BLOCK_SIZE_N": 256, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 64, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
}, | ||
"4096": { | ||
"BLOCK_SIZE_M": 128, | ||
"BLOCK_SIZE_N": 256, | ||
"BLOCK_SIZE_K": 64, | ||
"GROUP_SIZE_M": 32, | ||
"num_warps": 8, | ||
"num_stages": 4 | ||
} | ||
} |
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.