8000 ENH: Pass optimizations arguments to asv build by seiko2plus · Pull Request #17284 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: Pass optimizations arguments to asv build #17284

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

Merged
merged 1 commit into from
Oct 10, 2020

Conversation

seiko2plus
Copy link
Member
@seiko2plus seiko2plus commented Sep 10, 2020

ENH: Pass optimizations arguments to asv build #17284

This patch allows passing -j, --cpu-baseline, --cpu-dispatch and --disable-optimization
to ASV build when argument --bench-compare is used.

TODO:

  • local test

@seiko2plus
Copy link
Member Author

@seberg, I just don't understand why ASV doesn't provide a direct way to specify custom build options? Am I missing something?

@seberg
Copy link
Member
seberg commented Sep 10, 2020

I looked around a bit, and don't see a way other than as part of the config. However, we could use --config to use a custom config file rather than deleting the current config? May want to ping Pauli, though, at least if that doesn't see right.

@Qiyu8
Copy link
Member
Qiyu8 commented Sep 11, 2020

I think this is a good solution to benchmark flexible universal intrinsic usage. but asv community still needs to considering the necessity of adding {build_args} to asv.config.json. @pv what do you think?

@seiko2plus seiko2plus force-pushed the pass_opt2asv_run branch 4 times, most recently from 4fcf2bb to 6edbba2 Compare September 11, 2020 13:31
@seiko2plus
Copy link
Member Author
seiko2plus commented Sep 11, 2020

@seberg,

I looked around a bit, and don't see a way other than as part of the config.

I confirm it, thank you!

we could use --config to use a custom config file rather than deleting the current config?

I followed your suggestion, I kept the main config file as-is so it can be used with ASV command.

@Qiyu8,

I think this is a good solution to benchmark flexible universal intrinsic usage.

An effective workaround but we still have other obstacles such as providing auto-generated test data and
provides the ability to check the sanity of it, similar to what OpenCV do, another nightmare I guess.
It would be easier for me to drop ASV and create our own benchmark tool, but I guess the community wouldn't easily
accept such a move like that.

@seberg
Copy link
Member
seberg commented Sep 11, 2020

Maybe its right and we should consider upstreaming things to ASV. I am a bit worried that running plain ASV won't have access to this, but there may not be a good way to do that.
Does this give the baseline/optimized/disabled versions different environment names in the ASV run?

@seiko2plus
Copy link
Member Author 8000
seiko2plus commented Sep 11, 2020

@seberg,

Does this give the baseline/optimized/disabled versions different environment names in the ASV run?

No, it generates a config file with the required build options then pass it through
--config, it also clears whole cache the involved commits cache if the user changed the build options.

@seiko2plus
Copy link
Member Author
seiko2plus commented Sep 11, 2020

@seberg,

I am a bit worried that running plain ASV won't have access to this, but there may not be a good way to do that.

I didn't touch the original config file, I created a new asv config instead asv_compare.conf.json and it only works through --bench-compare.

  This patch allows passing `-j`, `--cpu-baseline`, `--cpu-dispatch` and `--disable-optimization`
  to ASV build when argument `--bench-compare` is used.
Copy link
Member Author
@seiko2plus seiko2plus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, what do you think @pv?

@charris
Copy link
Member
charris commented Sep 27, 2020

This needs documentation so people will know how to use it. Maybe in the README.rst or runtests.py files?

@charris charris merged commit 07a54df into numpy:master Oct 10, 2020
@charris
Copy link
Member
charris commented Oct 10, 2020

Thanks Sayed. I put this in to aid the ongoing SIMD work, but more usage documentation would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0