解决:Not creating XLA devices, tf_xla_enable_xla_devices not set

  • 实验环境
  • 提示如下
  • 分析原因
  • 解决方法

实验环境

  • Windows 10
  • NVIDIA GeForce GTX 1050
  • CUDA11.0
  • CUDNN 8.0
  • Tesorflow-gpu 2.4.1

提示如下

分析原因

据说是Tesorflow-gpu 2.4.1,默认情况下,不再注册XLA:CPU和XLA:GPU设备。如果确实需要它们,请可使用

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

但是此标志最终将在后续发行版中删除。

解决方法

import tensorflow as tf
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'print(tf.__version__)
a = tf.constant(1.)
b = tf.constant(2.)
print(a+b)
print('GPU:', tf.test.is_gpu_available())

改为

import tensorflow as tf
import os
os.environ['TF_XLA_FLAGS'] = '--tf_xla_enable_xla_devices'
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
print(tf.__version__)
a = tf.constant(1.)
b = tf.constant(2.)
print(a+b)
print('GPU:', tf.test.is_gpu_available())

即可!


你将会发现,在代码开头加了

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

将不会有

Not creating XLA devices, tf_xla_enable_xla_devices not set

提示!

解决:Not creating XLA devices, tf_xla_enable_xla_devices not set相关推荐

  1. Ubuntu18解决:Not creating XLA devices, tf_xla_enable_xla_devices not set

    实验环境 ubuntu18 NVIDIA GeForce GTX 1050 CUDA11.0 CUDNN 8.0 Tesorflow-gpu 2.4.1 问题 分析原因 据说是Tesorflow-gp ...

  2. win10系统tensorflow2.4.0-gpu安装“Not creating XLA devices, tf_xla_enable_xla_devices not set”解决方法

    未解决前报错   最近在安装tensorflow2.4.0-gpu版本后的项目开发过程中出现了"Not creating XLA devices, tf_xla_enable_xla_dev ...

  3. 【Error】解决:Not creating XLA devices, tf_xla_enable_xla_devices not set

    提示如下 分析原因 据说是Tesorflow-gpu 2.4.1,默认情况下,不再注册XLA:CPU和XLA:GPU设备.如果确实需要它们,请可使用 os.environ['TF_XLA_FLAGS' ...

  4. 彻底解决conda环境下 tensorflow gpu版本出现的问题:Not creating XLA devices, tf_xla_enable_xla_devices not set

    问题说明 tf.test.is_gpu_available()结果为TRUE,但有Not creating XLA devices, tf_xla_enable_xla_devices not set ...

  5. tensorflow:Not creating XLA devices, tf_xla_enable_xla_devices not set

    运行代码出现 I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_d ...

  6. Linux conda tensorflow-gpu安装及Not creating XLA devices, tf_xla_enable_xla_devices not set相关问题解决

    0.首先介绍一下conda创建虚拟环境的基本操作. (1)创建Python的虚拟环境,并指定Python版本,不指定的话会使用默认的版本(Conda Base 环境中的Python版本). conda ...

  7. 安装Tensorflow 报错false Not creating XLA devices, tf_xla_enable_xla_devices not set

    学习图像识别配置环境 https://blog.csdn.net/weixin_44170512/article/details/103990592 一步一步按照博主配置 执行到这两句 import ...

  8. Not creating XLA devices, tf_xla_enable_xla_devices not set错误求助

    在pycharm中跑代码出现 在调试的时候出现了Not creating XLA devices, tf_xla_enable_xla_devices not set,但是测试的时候却是显示true ...

  9. CUDA安装 + tensorflow gpu版本出现的问题:Not creating XLA devices, tf_xla_enable_xla_devices not set

    装完后用以下两行代码测试,结果竟然是False,输出了图片中的报错,肯定是哪装的有问题 import tensorflow as tf tf.test.is_gpu_available() 我的ten ...

最新文章

  1. HDLBits 系列(29)PS/2 mouse protocol(PS/2 packet parser and datapath)
  2. 软件工程师技术面试一面真题
  3. sift计算描述子代码详解_代码详解——如何计算横向误差?
  4. mybaits三:全局配置文件
  5. Mathematica 对曲线进行拟合
  6. promise在promise情况下进行使用async与await
  7. [CF475E]Strongly Connected City 2
  8. 机器人出魔切还是三相_魔切冷却流机器人,暗夜收割者一招致命!
  9. Coolite Toolkit学习笔记一:AjaxEvent、AjaxMethod和Listeners
  10. android共享元素动画_Android共享元素过渡动画
  11. 双麦阵列回音消除及降噪模块 A-47
  12. 4D 语义分割——TemporalLidarSeg
  13. chrome浏览器扩展打包成crx
  14. 计算机图片颜色是红色怎么办,电脑变色是怎么回事?(有图片)
  15. 如何UNI-APP中使用iconfont彩色图标
  16. 论文翻译:混合维在庞加莱几何三维骨架的动作识别
  17. 怎样解锁CAD图纸中被锁定的图层?
  18. opencv图像对齐与图像相减python
  19. 旅游攻略小程序毕业设计毕设作品开题报告答辩PPT
  20. kotlin教程4:函数进阶

热门文章

  1. Go关键字--type
  2. pppoe协议和pppd源码分析
  3. 今日早报 每日精选12条新闻简报 每天一分钟 知晓天下事 8月13日
  4. java white case语句_JAVA基础(一)
  5. 英伟达显卡安装老驱动388.71
  6. Linux命令之远程登录与执行远程主机命令
  7. 通用计算机(PC)和手机是否属于嵌入式设备?(嵌入式的定义)-杂谈
  8. 【自然语言处理】BERT 讲解
  9. linux之mysql基础
  10. Python爬虫实践:优志愿 院校列表