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

optimize mem use for cpu-sharemem and gpu. #289

Merged
merged 2 commits into from
Jan 9, 2024
Merged

optimize mem use for cpu-sharemem and gpu. #289

merged 2 commits into from
Jan 9, 2024

Conversation

jiangtong1000
Copy link
Collaborator

  1. include chol_packed as share arrays
  2. optimize gpu memory usage, tested locally to find 15+GB mem reduced for a 5GB chol file

@fdmalone
Copy link
Collaborator

fdmalone commented Jan 9, 2024

That test failure isn't your problem, so this is safe to merge.

@fdmalone fdmalone self-requested a review January 9, 2024 22:22
@@ -48,7 +48,7 @@ class GenericRealChol(GenericBase):
Can be created by passing the one and two electron integrals directly.
"""

def __init__(self, h1e, chol, ecore=0.0, verbose=False):
def __init__(self, h1e, chol, ecore=0.0, shmem=False, chol_packed=None, verbose=False):
Copy link
Collaborator

Choose a reason for hiding this comment

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

My instinct tells me that this is a(n) (existing) design mistake and no logic should occur in the constructor. That is, the hamiltonian class should probably just be specialized for the different cases. However, this can be refactored in the future so shouldn't hold you back.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks Fionn, good to know

@fdmalone fdmalone mentioned this pull request Jan 9, 2024
@fdmalone fdmalone merged commit 80a2444 into develop Jan 9, 2024
6 of 7 checks passed
@fdmalone fdmalone deleted the gpu_fix branch January 9, 2024 22:50
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.

2 participants