GPU not available?
Chirag Nagpal
chiragn at cs.cmu.edu
Wed Oct 4 21:22:26 EDT 2017
Try running the following on one of the GPUs. It should multiply the
matrices and give you an output, if it does means its working. If it
doesn't mail whatever output you get (The entire output) back on this
thread.
import tensorflow as tfwith tf.device('/gpu:0'):
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
with tf.Session() as sess:
print (sess.run(c))
On Wed, Oct 4, 2017 at 9:15 PM, Predrag Punosevac <predragp at andrew.cmu.edu>
wrote:
> siyuh at andrew.cmu.edu wrote:
>
> > Dear Predrag,
> >
> > Good evening!
> > I am now trying to run tensorflow on Autonlab, it seems I am always
> using CPU instead of GPU. Then I try to add tf.device(???gnu:0???) in my
> code, then it shows that the GPU is not available. May I ask if you have
> any idea on this?
> >
>
> I don't user TensorFlow but I know for the fact that it works as
> expected on all 7 GPU servers. You should have sent the e-mail to the
> mailing list so that you can get help from other TensorFlow users.
>
> Predrag
>
>
> > Thanks,
> > Siyu
>
--
*Chirag Nagpal* Graduate Student, Language Technologies Institute
School of Computer Science
Carnegie Mellon University
cs.cmu.edu/~chiragn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.srv.cs.cmu.edu/pipermail/autonlab-users/attachments/20171004/caa2b6b2/attachment.html>
More information about the Autonlab-users
mailing list