-
Notifications
You must be signed in to change notification settings - Fork 164
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
Hyper Threading Crate #1679
Hyper Threading Crate #1679
Conversation
# Build the command string with all thread counts | ||
for threads in "${thread_counts[@]}"; do | ||
# For hyperfine, wrap each command in 'sh -c' to correctly handle the environment variable | ||
cmd+=" -n \"threads: ${threads}\" 'sh -c \"RAYON_NUM_THREADS=${threads} ${binary}\"'" | ||
done |
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.
You can use hyperfine
own options here:
-P, --parameter-scan <VAR> <MIN> <MAX>
Perform benchmark runs for each value in the range MIN..MAX. Replaces
the string '{VAR}' in each command by the current parameter value.
Example: hyperfine -P threads 1 8 'make -j {threads}'
This performs benchmarks for 'make -j 1', 'make -j 2', …, 'make -j 8'.
To have the value increase following different patterns, use shell
arithmetics.
Example: hyperfine -P size 0 3 'sleep $((2**{size}))'
This performs benchmarks with power of 2 increases: 'sleep 1', 'sleep
2', 'sleep 4', …
The exact syntax may vary depending on your shell and OS.
-D, --parameter-step-size <DELTA>
This argument requires --parameter-scan to be specified as well.
Traverse the range MIN..MAX in steps of DELTA.
Example: hyperfine -P delay 0.3 0.7 -D 0.2 'sleep {delay}'
This performs benchmarks for 'sleep 0.3', 'sleep 0.5' and 'sleep 0.7'.
-L, --parameter-list <VAR> <VALUES>
Perform benchmark runs for each value in the comma-separated list
VALUES. Replaces the string '{VAR}' in each command by the current
parameter value.
Example: hyperfine -L compiler gcc,clang '{compiler} -O2 main.cpp'
This performs benchmarks for 'gcc -O2 main.cpp' and 'clang -O2
main.cpp'.
The option can be specified multiple times to run benchmarks for all
possible parameter combinations.
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.
There's also no need to fire up the shell explicitly. The default behavior is to spawn one, unless you pass the -N
option.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1679 +/- ##
=======================================
Coverage 96.70% 96.70%
=======================================
Files 95 95
Lines 38151 38151
=======================================
Hits 36894 36894
Misses 1257 1257 ☔ View full report in Codecov by Sentry. |
Benchmark Results for unmodified programs 🚀
|
Hyper Threading Crate
Description
New crate to benchmark the performance of Cairo-VM in a hyper-threaded environment
Checklist