Skip to content
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

Add HPMC pair union benchmark. #72

Merged
merged 2 commits into from Mar 1, 2024
Merged

Add HPMC pair union benchmark. #72

merged 2 commits into from Mar 1, 2024

Conversation

joaander
Copy link
Member

Description

Benchmark the HPMC union potential.

Motivation and context

Check the performance of new code paths added in glotzerlab/hoomd-blue#1725

How has this been tested?

The benchmark runs locally.

Checklist:

@joaander joaander requested review from a team as code owners February 21, 2024 20:03
@joaander joaander requested review from tcmoore3, b-butler and syjlee and removed request for a team February 21, 2024 20:03
@joaander joaander merged commit ed290d0 into trunk Mar 1, 2024
2 checks passed
@joaander joaander deleted the hpmc-union branch March 1, 2024 14:46
Copy link
Member

@b-butler b-butler 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, just have one question about an argument name, but I am approving now regardless.

Comment on lines +85 to +87
positions.extend([(x, 0, 0) for x in points])
positions.extend([(0, x, 0) for x in points])
positions.extend([(0, 0, x) for x in points])
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't this result in overlaps if grid is chosen poorly? Also. this doesn't form a grid as points are only placed on the axes lines. That isn't necessarily a problem, just makes the argument name grid seem odd.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it should be named "spacing" or something like that. This benchmark attempts to prevent overlaps by keeping the overall particles the same size and placing overlapping constituents.

It is not a very realistic placement, but I used it to get some idea of what union size was the minimum needed for leaf_capacity=4 to be faster than leaf_capacity=0.

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

Successfully merging this pull request may close these issues.

None yet

2 participants