1
votes

I have a large model that I build inside of a with tf.device('/gpu:0'), as I would like all ops to be placed there if possible. However, after updating to 1.4 (from 1.2), tensorflow insists on placing all of the ops on the cpu (according to log_device_placement). I can't turn off soft device placement since there appear to be some ops (related to computing shapes, as well as AdamOptimizer) that can't seem to be placed on gpu. Is there some intermediary option that I can give to tensorflow so that it places all ops except the ones that don't have gpu kernels on the gpu?

1

1 Answers

1
votes

It appears that I wasn't actually running tensorflow-gpu, due to some bugs in their pip packaging (https://github.com/tensorflow/tensorflow/issues/12388). After pip uninstall tensorflow && pip install tensorflow-gpu everything seems to work just fine.