- 
                Notifications
    
You must be signed in to change notification settings  - Fork 27
 
Adds pack/inc optimization #21
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
      
      
            wavefunction91
  merged 15 commits into
  wavefunction91:master
from
dmclark17:clark/opt_packing
  
      
      
   
  Nov 10, 2020 
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            15 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      ad5fa6a
              
                Adds pack/inc optimization
              
              
                davidclark-nv 2ddce3b
              
                Adds comment for submatrix array generation
              
              
                davidclark-nv 32d575a
              
                Changes cut generation algorithm
              
              
                davidclark-nv 7ebf159
              
                Adds blocking scheme
              
              
                davidclark-nv 517b5f1
              
                Merge branch 'master' into clark/opt_packing
              
              
                wavefunction91 46871e6
              
                Merge branch 'master' into clark/opt_packing
              
              
                wavefunction91 dd80bd9
              
                minor optimizations to kernels
              
              
                davidclark-nv 2e8bdcf
              
                Adds function for determining block size
              
              
                davidclark-nv aecd245
              
                Adds basic heuristic for choosing block size
              
              
                davidclark-nv 5f4ae8d
              
                Minor changes and comments
              
              
                davidclark-nv e3c496d
              
                Merge remote-tracking branch 'public/clark/opt_packing' into clark/op…
              
              
                davidclark-nv 8519179
              
                Switches from pairs to arrays for subcut structure
              
              
                davidclark-nv 642554f
              
                Adds CUDA11 intrinsics for cache hints
              
              
                davidclark-nv 86f69fa
              
                Adjusts host code to use arrays instead of pairs
              
              
                davidclark-nv 77fb6af
              
                Merge branch 'clark/opt_packing' of https://github.com/dmclark17/GauX…
              
              
                wavefunction91 File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| #include <cmath> | ||
| #include <algorithm> | ||
| 
     | 
||
| #include "cuda_runtime.h" | ||
| 
     | 
||
| #include "cuda_device_properties.hpp" | ||
| 
     | 
||
| namespace GauXC { | ||
| namespace cuda { | ||
| 
     | 
||
| 
     | 
||
| uint32_t get_submat_cut_block(int32_t LDA) { | ||
| int l2_cache_size; | ||
| cudaDeviceGetAttribute(&l2_cache_size, cudaDevAttrL2CacheSize, 0); | ||
| 
     | 
||
| int l2_block_size = (int) sqrt(0.75 * ((double) l2_cache_size / 8)); | ||
| int min_block_size = LDA / max_submat_blocks; | ||
| 
     | 
||
| int block_size = std::max(l2_block_size, min_block_size); | ||
| block_size = std::min(block_size, LDA); | ||
| 
     | 
||
| return block_size; | ||
| } | ||
| 
     | 
||
| } | ||
| } | 
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  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.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.