-
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
base: main
Are you sure you want to change the base?
Changes from all commits
741ee98
0ae7864
35bfb61
66b4786
82aed0c
24ee0a5
bd87f50
a663db6
32fe197
76562dc
3eb5525
4785fe6
1fb7c05
83c442c
4b274c4
0cf48bb
5905647
baa57c9
ecce2d9
3a58ead
d0d8773
fbb5969
f007745
b6b6082
0f2c838
5bd20f6
ab88d25
3faaf60
896a46a
5d4986b
b246522
ffe182e
2877feb
0902eef
498d551
0804c12
c1d1e43
c34591d
68f5c7d
0bde332
7c456cf
9643150
f1a3b6d
fe48e35
e1e12d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -151,7 +151,7 @@ ADD dockerfile/etc /opt/microsoft/ | |||||||||||
| WORKDIR ${SB_HOME} | ||||||||||||
|
|
||||||||||||
|
||||||||||||
| # nvbench requires CMake >= 3.30.4; ensure an adequate version is available | |
| # before building the cuda_nvbench third-party target. | |
| RUN python3 -m pip install --no-cache-dir --upgrade cmake==3.30.4 |
| 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 | ||
| ) | ||
| ) |
| 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.
|
||
| 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 | ||
| ) | ||
| ) |
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.