title: GPU with Theano giving poor result compared to CPU with theano
body: <p>I am doing this tutorial:
  <a href="http://deeplearning.net/software/theano/tutorial/using_gpu.html#exercise" rel="nofollow">http://deeplearning.net/software/theano/tutorial/using_gpu.html#exercise</a></p>
  
  <p>and the solution to the tutorial is given here:
  <a href="http://deeplearning.net/software/theano/_downloads/using_gpu_solution_1.py" rel="nofollow">http://deeplearning.net/software/theano/_downloads/using_gpu_solution_1.py</a></p>
  
  <p>But my issue is when I run the code</p>
  
  <p>with GPU:</p>
  
  <pre><code>THEANO_FLAGS=mode=FAST_RUN,device=gpu time python using_gpu_solution_1.py
  </code></pre>
  
  <p>I got the following output:</p>
  
  <pre><code>Using gpu device 0: Tesla C2050 / C2070
  Used the gpu
  13.37user 3.69system 0:16.49elapsed 103%CPU (0avgtext+0avgdata 617376maxresident)k
  0inputs+16outputs (0major+75442minor)pagefaults 0swaps
  </code></pre>
  
  <p>and with CPU:</p>
  
  <pre><code>THEANO_FLAGS=mode=FAST_RUN,device=cpu time python using_gpu_solution_1.py
  </code></pre>
  
  <p>I got the following output:</p>
  
  <pre><code>Used the cpu
  6.85user 14.50system 0:04.43elapsed 481%CPU (0avgtext+0avgdata 241120maxresident)k
  0inputs+16outputs (0major+43904minor)pagefaults 0swaps
  </code></pre>
  
  <p>In <a href="http://deeplearning.net/software/theano/_downloads/using_gpu_solution_1.py" rel="nofollow">the solution</a> they have mentioned the speed up of almost double with GPU.
  But I am getting more elapsed time with GPU than CPU.</p>
  
  <p>Is it that the code ran on multiple core on CPU and it got improvements over GPU?</p>
  
  <p>Can anyone tell me what I am getting wrong?
  Only thing I can see is improve in system time using the GPU.
  Is this what they mean by speed up? as the overall elapsed time is still more with GPU.</p>