title: How can I run theano on GPU
body: <p>If I run the following code with python 3.5</p>
  
  <pre><code>import numpy as np
  import time
  import theano
  A = np.random.rand(1000,10000).astype(theano.config.floatX)
  B = np.random.rand(10000,1000).astype(theano.config.floatX)
  np_start = time.time()
  AB = A.dot(B)
  np_end = time.time()
  X,Y = theano.tensor.matrices('XY')
  mf = theano.function([X,Y],X.dot(Y))
  t_start = time.time()
  tAB = mf(A,B)
  t_end = time.time()
  print ("NP time: %f[s], theano time: %f[s] **(times should be close when run
  on CPU!)**" %(np_end-np_start, t_end-t_start))
  print ("Result difference: %f" % (np.abs(AB-tAB).max(), ))
  </code></pre>
  
  <p>I get the output</p>
  
  <pre><code>NP time: 0.161123[s], theano time: 0.167119[s] (times should be close when
  run on CPU!)
  Result difference: 0.000000
  </code></pre>
  
  <p>it says if the times are close, it means that I am running on my CPU.</p>
  
  <p>How can I run this code on my GPU?</p>
  
  <p><strong>NOTE:</strong></p>
  
  <ul>
  <li>I have a workstation with Nvidia Quadro k4200.</li>
  <li>I have installed Cuda toolkit </li>
  <li>I have successfully worked an cuda vectorAdd sample project on VS2012.</li>
  </ul>