Ask questionstensorflow2.0 detected 'xla_gpu' , but 'gpu' expected

System information

  • Linux Ubuntu 16.04 :
  • TensorFlow installed from binary, tensorflow2.0-gpu-beta1:
  • Python version 3.6.4:
  • CUDA 9.1, cuDNN 7.0:
  • GPU: Titan Xp.

tensorflow detected 'xla_gpu' , but 'gpu' expected

train_model = keras.utils.multi_gpu_model(train_model, gpus=2) File "/usr/local/lib/python3.6/site-packages/tensorflow/python/keras/utils/", line 182, in multi_gpu_model available_devices)) ValueError: To callmulti_gpu_modelwithgpus=2, we expect the following devices to be available: ['/cpu:0', '/gpu:0', '/gpu:1']. However this machine only has: ['/cpu:0', '/xla_gpu:0', '/xla_gpu:1', '/xla_cpu:0']. Try reducinggpus.


Answer questions ziyigogogo

seems that you are using a XLA compiled tf build. Not sure if it's a bug. Need some confirmation from the tf team members.


Related questions

ModuleNotFoundError: No module named 'tensorflow.contrib'
Error occurred when finalizing GeneratorDataset iterator
ModuleNotFoundError: No module named 'tensorflow.contrib'
When importing TensorFlow, error loading Hadoop hot 4
The flag 'log_dir' is defined twice. hot 3
[TF 2.0] Dataset has no attribute 'make_one_shot_iterator' hot 3
Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning. hot 3
TF2.0 AutoGraph issue hot 3
Error loading tensorflow hot 3
AttributeError: module 'tensorflow' has no attribute 'set_random_seed' hot 3
No tf.lite.experimental.nn.bidirectional_dynamic_rnn ops is finded hot 3
AttributeError: module 'tensorflow' has no attribute 'app' hot 3
Incorrect Error TypeError: padded_batch() missing 1 required positional argument: 'padded_shapes' hot 3
Using tensorflow gpu 2.1 with Cuda 10.2 hot 2
Restoring Keras model fails inside a distribution strategy scope hot 2
Github User Rank List