forked from abacusmodeling/abacus-develop
    
        
        - 
                Notifications
    
You must be signed in to change notification settings  - Fork 145
 
Perf: optimize deepks functions cal_f_delta and cal_pdm #5933
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
      
      
    Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    
              
                    mohanchen
  
              
              reviewed
              
                  
                    Feb 26, 2025 
                  
              
              
            
            
              
                    mohanchen
  
              
              approved these changes
              
                  
                    Feb 26, 2025 
                  
              
              
            
            
    
  Fisherd99 
      pushed a commit
        to Fisherd99/abacus-BSE
      that referenced
      this pull request
    
      Mar 31, 2025 
    
    
      
  
    
      
    
  
…#5933) * inline base_matrix function * add openmp to deepks_force and deepks_pdm * inline more functions in base_matrix * inline functions of intarray * initialize some variables * fix some format * fix format * fix a bug
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      Labels
      
    GPU & DCU & HPC
  GPU and DCU and HPC related any issues 
  
    Machine Learning
  Issues related to the DeePKS 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Linked Issue
Fix #4247
What's changed?
cal_f_deltaandcal_pdmPerf Improvement
test case: https://github.com/deepmodeling/abacus-develop/files/15456955/cusolver_mpi_openmp.zip
test command: OMP_NUM_THREADS=6 mpirun -n 2 abacus
One lesson learned from issue #4247 is that some simple functions are best placed in header files to facilitate compiler inlining, which can have a significant impact on performance.