title: Sharing RAM with GPU
body: <p>I have a model for deep learning which is at the edge of allocation memory error(weight matrices). I trimmed the model's complexity to the level where it works fine for my predictions(but it could be better) and it works fine with my RAM memory, however when I switch theano to use gpu for much faster training (GPU with 2GB gddr5 vram), it throws allocation error.</p>
  
  <p>I searched a lot for how to share RAM with GPU and many people state that it is <strong>not possible</strong>(without references or explanation) and that even if you could, it would be slow. And there are always one or two people on the forums who state it could be done (I checked the whole page 1 on google search), but again a very unreliable information without anything to support it.</p>
  
  <p>I understand their slowness argument, but is it slower to use GPU + RAM than using CPU + RAM for matrix heavy computations in deep learning? Nobody ever mentions that. Because all arguments I've read (like buy new card, set lower settings) were about gaming and that makes sense to me as you head to better just-in-time performance and not the overall speed.</p>
  
  <p>My blind guess is that the bus that connects GPU to RAM is just the narrowest pipe in the system(slower than RAM), so it makes better sense to use CPU + RAM(which has really fast bus) over faster GPU (+  RAM). Otherwise, it wouldn't make much sense.</p>