[solved] tensorflow: Not creating XLA devices, tf_xla_enable_xla_devices not set ?

Hello Guys How Are You All ? Hope You all are fine. Today I Have Faced ensorflow: Not creating XLA devices, tf_xla_enable_xla_devices not set? In Python. Not creating XLA devices So Here I am Explain to you all the possible solutions Here.

Without Wasting your time, Lets start This Article to Solve This Error in Anaconda

How tensorflow: Not creating XLA devices, tf_xla_enable_xla_devices not set error Occurs ?

I run drive.py program from Code Project | A Complete guide to self driving car

but when i start program i have error:

Not creating XLA devices, tf_xla_enable_xla_devices not set

Does anyone know how I can fix this problem? What should I download or reinstall?

I use:

Python 3.8.7

CUDA 11.0

tensorflow 2.4.1 On http://0.0.0.0:4567/ of course I see nothing

How to solve tensorflow: Not creating XLA devices, tf_xla_enable_xla_devices not set?

Solutions:

Quetion: How to solve tensorflow: Not creating XLA devices, tf_xla_enable_xla_devices not set?
Answer: Please add the following at the very beginning of your script: os.environ[‘TF_XLA_FLAGS’] = ‘–tf_xla_enable_xla_devices’.

Solution 1

Please add the following at the very beginning of your script:

os.environ['TF_XLA_FLAGS'] = '--tf_xla_enable_xla_devices'

Solution 2

Usually this message should not interfere.

Please try

import tensorflow as tf
print("GPUs: ", len(tf.config.experimental.list_physical_devices('GPU')))

to check that they are detected.

If you need it, please check the release notes at github:

XLA:CPU and XLA:GPU devices are no longer registered by default. Use TF_XLA_FLAGS=–tf_xla_enable_xla_devices if you really need them, but this flag will eventually be removed in subsequent releases.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

Leave a Comment