hughperkins / tf-coriander

OpenCL 1.2 implementation for Tensorflow
Apache License 2.0
791 stars 90 forks source link

Testing instructions #18

Closed Whytehorse closed 7 years ago

Whytehorse commented 7 years ago

Is there a quick way to test my installation to ensure that tensorflow is using the GPU and OpenCL as desired?

hughperkins commented 7 years ago

Yes, if you do for example with tf.device('/gpu:0'):, then it forces everything under that to be on gpu0, or else crash. You can also turn on device placement logging with with tf.Session(config=tf.ConfigProto(log_device_placement=False)) as sess: