Skip to content

ENH: Provides a deep benchmark for universal functions #15992

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

seiko2plus
Copy link
Member

@seiko2plus seiko2plus commented Apr 15, 2020

Provides a deep benchmark for universal functions.

This an alternative benchmark for #15987 based on ASV.

@mattip
Copy link
Member

mattip commented Apr 16, 2020

It seems the log output is now too large for travis, it exceeds 50,000 lines. Is there a way to tweak the benchmark run to be less verbose?

@seiko2plus
Copy link
Member Author

@mattip, I guess the only way is by providing argument options to control of generated tests, same as in #15987, example --strides, --sizes(array sizes), --nsamples(number of collected samples), and different filter mechanism beyond ASV that allow us to disable deep tests by default unless user provided a regex that hit some matches. I think it can be handle it through runtests.py. what do u think?

@mattip
Copy link
Member

mattip commented Apr 16, 2020

It seems quite complicated. How will anyone track the changes over time when the full suite takes so long to run? What is the goal of the added benchmarks: perhaps there is another way to achieve the same goal.

@seiko2plus
Copy link
Member Author

@mattip,

What is the goal of the added benchmarks

I was simply want to detect the performance changes, so I can reply to @rgommers comment. also for the upcoming patches.

How will anyone track the changes?

simply you don't need to run all the tests only filter what u target through the regex.

full suite takes so long to run?

ASV kinda slow even with disabling ASV's warmup process

perhaps there is another way to achieve the same goal.

This patch #15987 is more effective and faster. currently, I'm doing some final tests on it and
it seems I'm going to rely on it instead of using ASV.

@mattip
Copy link
Member

mattip commented Apr 16, 2020

it seems I'm going to rely on it instead of using ASV.

Are you sure you cannot do what you wish with ASV and using your C code from gh-15987 (although that code looks fragile: what happens if we add more ufuncs)?

@seiko2plus
Copy link
Member Author

@mattip,

Are you sure you cannot do what you wish with ASV and using your C code from gh-15987

There's no way to integrate the C code from gh-15987 since ASV doesn't provide a method to specify the elapsed time of each sample.

(although that code looks fragile

The python code still needs more improvements, but the C code looks good to me.

what happens if we add more ufuncs)?

The python script collects all ufuncs via dir() and fetches the input types from ufunc's attribute types same as what this patch does. so the code is frinedly with any new ufuncs.

@mattip
Copy link
Member

mattip commented Jul 10, 2020

I still prefer this as an alternative to gh-15987. @seiko2plus do you now see a way to make the output nicer/less verbose?

@seiko2plus seiko2plus marked this pull request as draft July 14, 2020 06:27
@seiko2plus
Copy link
Member Author

@mattip, yes, I see away. I'm going to count on gh-15987 for now, then I will work on it after getting done from my other pull-requests.

@mattip mattip added the component: SIMD Issues in SIMD (fast instruction sets) code or machinery label Jul 21, 2020
Base automatically changed from master to main March 4, 2021 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 - Enhancement 28 - Benchmark component: SIMD Issues in SIMD (fast instruction sets) code or machinery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants