Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork10.9k
ENH: Standalone benchmark script for the inner loops of ufunc#15987
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 ourterms of service andprivacy 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?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Can we reuse our existing benchmark machinery here? |
seiko2plus commentedApr 15, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@eric-wieser, I tried to use ASV but the result wasn't stable enough, check thispatch andpatch2 from#13516, the idea behind this patch is to benchmarking only the inner loop of ufunc in order to reduce the noises as much as possible, also ASV is kinda slow too. EDIT: I moved the two mentioned patches to separate pull-requests#15992 and#15990 |
It would be nice if we could at least hook into ASV for things like benchmark result comparisons and storage, rather than building our own version of those too. It might be worth starting a conversation with@pv about the best way to do that. |
seberg commentedApr 15, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@seiko2plus you are repeating the function run multiple times here within your EDIT: This got lost: "You are doing a few other things here that you are not doing in the asv version." For example, if you just define the |
3fb1562
to28b0c07
Compare@seberg, ASV already collect multiple samples for each benchmark, but still not stable enough even on idle CPU. This script is not providing a replacement for the current ASV implementation, the main reason behind it is to detect any performance changes in the inner loops of ufunc and removing the functionality of umath and multiarry from the equation in order to reduce the noises as much as possible, it also provides more testing cases like multiple strides, sizes and better control for the testing process.
The problem is ASV doesn't provide a way to specify the elapsed time manually. |
a58ab33
to5f4bbde
Compareseiko2plus commentedApr 15, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@seberg, I moved the mentioned patches from#13516, into a separate pull#15992 and#15990. also modified the number of repeats and samples to be equal to the default settings of this script. |
5f4bbde
to9b4245b
CompareOne reason that could be causing noise is turbo mode. In case you haven't already done, I would recommend disabling for benchmarking purposes (set |
@r-devulap, Before I run any benchmarks, I usually do:
Lately, I realized a python module calledpyperf, provides a tool to tune the system with the above tips and many more via command However, it seems I should have an idle hardware in order to get almost stable ratios for ASV not just isolate some logical cores since any involved system calls that interpret the thread during collecting the benchmark samples will eliminate the benefits from isolating the logical cores via One of the things I don't like in ASV that its uses a separate process for each collected sample, |
a28f11e
to230bc23
Compare8408248
tof17305e
Comparedbce6f3
toe62c951
Comparea2ed2e5
toa231322
Compareping@pv. Is there something here that we all are missing? |
This script only measuring the performance of inner loops of ufunc, the idea behind it is to remove umath object calls from the equation, in order to reduce the number of noises and provides stable ratios.
a231322
to5e557b5
Comparehameerabbasi commentedNov 9, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I ran this PR on a live environment without a desktop (Ubuntu Server), using the method in the PR description. The noise was around 3% and this PR had a performance impact of ±5%, so not too much of a difference. Whoops, had the wrong tab open. This comment was meant for#16247, copy pasting there. |
close/reopen |
Uh oh!
There was an error while loading.Please reload this page.
ENH: A standalone benchmark script for the inner loops of ufunc
This script only measuring the performance of inner loops of ufunc,
the idea behind it is to remove umath object calls from the equation,
in order to reduce the number of noises and provides stable ratios.