-
Notifications
You must be signed in to change notification settings - Fork 86
Benchmarks: Micro benchmark - add nvbench based kernel-launch, sleep-kernel & auto-throughput #750
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
WenqingLan1
wants to merge
47
commits into
microsoft:main
Choose a base branch
from
WenqingLan1:feat/third_party/nvbench
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 45 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
741ee98
add nvbench kernel launch
WenqingLan1 0ae7864
submodule update
WenqingLan1 35bfb61
init sleep kernel
WenqingLan1 66b4786
Merge branch 'microsoft:main' into feat/third_party/nvbench
WenqingLan1 82aed0c
Merge branch 'microsoft:main' into feat/third_party/nvbench
WenqingLan1 24ee0a5
Merge branch 'microsoft:main' into feat/third_party/nvbench
WenqingLan1 bd87f50
test sleep kernel
WenqingLan1 a663db6
add sm 103
WenqingLan1 32fe197
add arg parsing logic
WenqingLan1 76562dc
Merge branch 'microsoft:main' into feat/third_party/nvbench
WenqingLan1 3eb5525
add arg parsing tests
WenqingLan1 4785fe6
refactor
WenqingLan1 1fb7c05
refine logic - remove gpu_id
WenqingLan1 83c442c
add doc
WenqingLan1 4b274c4
refine regex & update nvbench submodule
WenqingLan1 0cf48bb
update cmake
WenqingLan1 5905647
fix lint
WenqingLan1 baa57c9
fix lint
WenqingLan1 ecce2d9
fix import
WenqingLan1 3a58ead
fix
WenqingLan1 d0d8773
fix
WenqingLan1 fbb5969
fix
WenqingLan1 f007745
fix
WenqingLan1 b6b6082
fix
WenqingLan1 0f2c838
fix
WenqingLan1 5bd20f6
fix
WenqingLan1 ab88d25
fix pipeline
WenqingLan1 3faaf60
fix cmake
WenqingLan1 896a46a
fix pipeline
WenqingLan1 5d4986b
fix pipeline
WenqingLan1 b246522
fix pipeline & mlc version
WenqingLan1 ffe182e
Merge branch 'microsoft:main' into feat/third_party/nvbench
WenqingLan1 2877feb
Merge branch 'main' into feat/third_party/nvbench
WenqingLan1 0902eef
Merge branch 'microsoft:main' into feat/third_party/nvbench
WenqingLan1 498d551
Merge branch 'microsoft:main' into feat/third_party/nvbench
WenqingLan1 0804c12
fix comments
WenqingLan1 c1d1e43
add auto throughput benchmark
WenqingLan1 c34591d
refined logic & fix bug
WenqingLan1 68f5c7d
add comment to clarify diff between nvbench-kernel-launch and kernel-…
WenqingLan1 0bde332
resolve comments
WenqingLan1 7c456cf
fix lint
WenqingLan1 9643150
fix pipeline & resolve comments
WenqingLan1 f1a3b6d
fix lint
WenqingLan1 fe48e35
fix test
WenqingLan1 e1e12d2
Merge branch 'microsoft:main' into feat/third_party/nvbench
WenqingLan1 6fc5afb
Merge branch 'microsoft:main' into feat/third_party/nvbench
WenqingLan1 e253b85
resolve comments
WenqingLan1 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # Licensed under the MIT License. | ||
|
|
||
| """Micro benchmark example for NVBench Auto Throughput. | ||
|
|
||
| Commands to run: | ||
| python3 examples/benchmarks/nvbench_auto_throughput.py | ||
| """ | ||
|
|
||
| from superbench.benchmarks import BenchmarkRegistry, Platform | ||
| from superbench.common.utils import logger | ||
|
|
||
| if __name__ == '__main__': | ||
| context = BenchmarkRegistry.create_benchmark_context( | ||
| 'nvbench-auto-throughput', | ||
| platform=Platform.CUDA, | ||
| parameters='--devices 0 --stride "[1,2,4,8]" --block_size "[256,512]" --timeout 30' | ||
| ) | ||
|
|
||
| benchmark = BenchmarkRegistry.launch_benchmark(context) | ||
| if benchmark: | ||
| logger.info( | ||
| 'benchmark: {}, return code: {}, result: {}'.format( | ||
| benchmark.name, benchmark.return_code, benchmark.result | ||
| ) | ||
| ) |
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,34 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # Licensed under the MIT license. | ||
|
|
||
| """Micro benchmark example for NVBench Kernel Launch. | ||
|
|
||
| Commands to run: | ||
| python3 examples/benchmarks/nvbench_kernel_launch.py | ||
| """ | ||
|
|
||
| from superbench.benchmarks import BenchmarkRegistry, Platform | ||
| from superbench.common.utils import logger | ||
|
|
||
| if __name__ == '__main__': | ||
| context = BenchmarkRegistry.create_benchmark_context( | ||
| 'nvbench-kernel-launch', | ||
| platform=Platform.CUDA, | ||
| parameters=( | ||
| '--timeout 30 ' | ||
| '--min-samples 10 ' | ||
| '--min-time 1.0 ' | ||
| '--max-noise 0.1 ' | ||
| '--stopping-criterion stdrel ' | ||
| '--throttle-threshold 80 ' | ||
| '--throttle-recovery-delay 1.0' | ||
| ) | ||
| ) | ||
|
|
||
| benchmark = BenchmarkRegistry.launch_benchmark(context) | ||
| if benchmark: | ||
| logger.info( | ||
| 'benchmark: {}, return code: {}, result: {}'.format( | ||
| benchmark.name, benchmark.return_code, benchmark.result | ||
| ) | ||
| ) | ||
|
WenqingLan1 marked this conversation as resolved.
|
||
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,24 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # Licensed under the MIT license. | ||
|
|
||
| """Micro benchmark example for NVBench Sleep Kernel. | ||
|
|
||
| Commands to run: | ||
| python3 examples/benchmarks/nvbench_sleep_kernel.py | ||
| """ | ||
|
|
||
| from superbench.benchmarks import BenchmarkRegistry, Platform | ||
| from superbench.common.utils import logger | ||
|
|
||
| if __name__ == '__main__': | ||
| context = BenchmarkRegistry.create_benchmark_context( | ||
| 'nvbench-sleep-kernel', platform=Platform.CUDA, parameters='--duration_us "[25,50,75]" --timeout 10' | ||
| ) | ||
|
|
||
| benchmark = BenchmarkRegistry.launch_benchmark(context) | ||
| if benchmark: | ||
| logger.info( | ||
| 'benchmark: {}, return code: {}, result: {}'.format( | ||
| benchmark.name, benchmark.return_code, benchmark.result | ||
| ) | ||
| ) |
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.
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.
Using
@latestfor third-party GitHub Actions is a supply-chain risk and can lead to non-reproducible CI behavior. Pin this action to a specific tagged version or commit SHA.