Not creating XLA devices, tf_xla_enable_xla_devices not set

Solution

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

Read More: