Skip to content

BENCH: Add a relatable 2D benchmark for block #12001

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

Closed
wants to merge 1 commit into from

Conversation

hmaarrfk
Copy link
Contributor

The existing benchmarks for block are not easy to understand in terms of what they might mean for common use cases in the case of 2D blocking.

These benchmarks make the performance of common use cases more clear in terms of final array size and dtype used

xref #11991

cc: @eric-wieser

def setup(self, shape, dtype, n_chunks):

self.block_list = [
[np.full(shape=[s//n_chunk for s, n_chunk in zip(shape, n_chunks)],
Copy link
Member

Choose a reason for hiding this comment

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

Why full and not just ones?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly, I think it is more obvious what we are trying to do with full since it implies array traversal in the name. ones, zeros and emtpy are ambiguous since they do different things.

@hmaarrfk hmaarrfk force-pushed the block2d_friendly_benchmark branch from 2ccfc32 to 656b90c Compare September 21, 2018 13:03
@hmaarrfk
Copy link
Contributor Author

hmaarrfk commented Sep 21, 2018

@eric-wieser re full and ones, I changed it to ones as you suggested but, honestly, I think it is more obvious what we are trying to do with full since it implies array traversal in the name. ones, zeros and emtpy are ambiguous since they do different things.

That said, benchmarking isn't always obvious, so I think the note I added in the earlier PR will help with this.

@hmaarrfk hmaarrfk force-pushed the block2d_friendly_benchmark branch 2 times, most recently from 7be351c to 4742d3f Compare September 24, 2018 03:01
@mattip
Copy link
Member

mattip commented Oct 1, 2018

@eric-wieser ready to merge?

@hmaarrfk hmaarrfk force-pushed the block2d_friendly_benchmark branch from 4742d3f to 114bf43 Compare October 1, 2018 18:35
@hmaarrfk
Copy link
Contributor Author

hmaarrfk commented Oct 1, 2018

@mattip, sorry this was part of the "speedup PR" #11991 as well. I didn't think you would merge it before this one. closing this.

@hmaarrfk hmaarrfk closed this Oct 1, 2018
@hmaarrfk hmaarrfk deleted the block2d_friendly_benchmark branch November 5, 2018 03:20
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.

3 participants