34



  
      
      GitHub
  
  
    

Santosh-Gupta/SpeedTorch 260

Library for fastest pinned CPU <-> GPU transfer . Contribute to Santosh-Gupta/SpeedTorch development by creating an account on GitHub.


  
  
    
    
  
  


This is my submission to the Pytorch Hackathon. It’s a library I made for Pytorch, for fast transfer between pinned CPU tensors and GPU pytorch variables. The inspiration came from needed to train large number of embeddings, which don’t all fit on GPU ram at a desired embedding size, so I needed a faster CPU <-> GPU transfer method. This also allows using any optimizer for sparse training, since every embedding contained in the Pytorch embedding variable receives an update, previously only Pytorch’s SGD, Adagrad, and SparseAdam were suitable for such training.
In addition to augmenting parameter sizes, you can use to increase the speed of which data on your CPU is transferred to Pytorch Cuda variables.
Also, SpeedTorch’s GPU tensors are also overall faster then Pytorch cuda tensors, when taking into account both transferring two and from (overall 2.6x faster). For just transfering to a Pytorch Cuda, Pytorch is still faster, but significantly slower when transfering from a Pytorch Cuda variable.
I have personally used this to nearly double the embedding size of embeddings in two other projects, by holding half the parameters on CPU. The training speed is decent thanks to the fast CPU<->GPU exchange.

  
      
      GitHub
  
  
    

Santosh-Gupta/Research2Vec2 7

Updated from the original Research2vec project. Contribute to Santosh-Gupta/Research2Vec2 development by creating an account on GitHub.


  
  
    
    
  
  



  
      
      GitHub
  
  
    

Santosh-Gupta/Lit2Vec2 4

Contribute to Santosh-Gupta/Lit2Vec2 development by creating an account on GitHub.


  
  
    
    
  
  


There’s a bit of a learning curve for the very first time getting started with it, so as soon as you run into any sort of friction, feel free to ask a question on the project gitter
https://gitter.im/SpeedTorch 93
And I’ll answer them.
                    
            
           2