I found a very strange issue about precision graph optimizer.
My container is tf19.04-py3
GPUs are several Titan Xs
CUDA 10
nvidia-driver 418.67
I type the following codes to test mixed precision graph optimizer:
import os
os.environ[“TF_ENABLE_AUTO_MIXED_PRECISION”] = “1”
import tensorflow as tf
sess = tf.Session()
a = tf.constant(10)
b = tf.constant(12)
sess.run(a+b)
22
sess.run(a+b)
2019-05-27 21:49:18.757578: W tensorflow/core/grappler/optimizers/auto_mixed_precision.cc:1930] No (suitable) GPUs detected, skipping auto_mixed_precision graph optimizer
22
I’m very curious why it can’t detect suitable GPUs when I execute sess.run(a+b) for the SECOND time.
By the way, When I assign GPU resources at the very beginning:
os.environ[“CUDA_DEVICE_ORDER”] = “PCI_BUS_ID”
os.environ[“CUDA_VISIBLE_DEVICES”] = “1,2,3,4”
It will log the same error when I execute sess.run(a+b) for the FIRST time.
I’m wondering how I can use mixed precision graph optimizer correctly.