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

2.4x avg speedup on PMG struct to CHGNET graph conversion #40

Merged
merged 18 commits into from
Jun 28, 2023

Conversation

AegisIK
Copy link
Contributor

@AegisIK AegisIK commented Jun 27, 2023

Converted graph data structure creation (not be confused with the Crystal_Graph object) into c (using Cython as an interfacing layer). Still supports legacy graph creation if c-supported graph creation library import fails.

Overall average graph creation speedup: 3x
Overall average Crystal_Graph creation speedup: 2.4x
Overall average MD speedup (on GPU): ~2x (may be a noisy benchmark however)

Benchmark on Ac2AgPb supercell:

image

@BowenD-UCB BowenD-UCB added the enhancement New feature or request label Jun 28, 2023
2. rewrite arg names nad docstrings
3. added arg in model initialization to select converter algorithm
@BowenD-UCB BowenD-UCB self-requested a review June 28, 2023 20:15
pyproject.toml Outdated
@@ -15,6 +15,7 @@ dependencies = [
"numpy>=1.21.6",
"pymatgen>=2022.4.19",
"torch>=1.11.0",
"cython>=0.29.26"
Copy link
Collaborator

Choose a reason for hiding this comment

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

@AegisIK @lbluque Should cython be capitalized here as "Cython" ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

pip is case insensitive. Also, hyphens and underscores are equivalent in package names.

Copy link
Collaborator

@janosh janosh left a comment

Choose a reason for hiding this comment

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

Looking great! I think this is ready to go.

@janosh janosh merged commit 1e8f141 into CederGroupHub:main Jun 28, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants