安装Tensorflow 报错false Not creating XLA devices, tf_xla_enable_xla_devices not set
学习图像识别配置环境 https://blog.csdn.net/weixin_44170512/article/details/103990592
一步一步按照博主配置 执行到这两句
import tensorflow as tf
tf.test.is_gpu_available()
没有出现理想中的True
而是
tf.test.is_gpu_available()
WARNING:tensorflow:From <stdin>:1: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.config.list_physical_devices('GPU')` instead.
2021-04-05 14:02:21.915504: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-04-05 14:02:21.934755: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library nvcuda.dll
2021-04-05 14:02:21.964341: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce GTX 1660 Ti computeCapability: 7.5
coreClock: 1.59GHz coreCount: 24 deviceMemorySize: 6.00GiB deviceMemoryBandwidth: 268.26GiB/s
2021-04-05 14:02:21.975404: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2021-04-05 14:02:21.982301: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cublas64_11.dll'; dlerror: cublas64_11.dll not found
2021-04-05 14:02:21.990611: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cublasLt64_11.dll'; dlerror: cublasLt64_11.dll not found
2021-04-05 14:02:21.998148: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll
2021-04-05 14:02:22.005014: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll
2021-04-05 14:02:22.021819: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusolver64_10.dll
2021-04-05 14:02:22.028394: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cusparse64_11.dll'; dlerror: cusparse64_11.dll not found
2021-04-05 14:02:22.038022: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found
2021-04-05 14:02:22.042773: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1757] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2021-04-05 14:02:22.157380: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-04-05 14:02:22.161928: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267] 0
2021-04-05 14:02:22.164252: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1280] 0: N
2021-04-05 14:02:22.167049: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
False
conda list检查自己的tensflow版本号
版本为 2.4.1
参考官方tensorflow与cuda对应图
并没有tensorflow_gpu-2.4.1这个版本 但我的cuda版本是10.1 cudnn版本是7.6.1 于是我就降级了TensorFlow的版本号 降成2.3.0
使用代码:
pip install tensorflow-gpu==2.3.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
再次执行
import tensorflow as tf
2021-04-05 14:14:43.793545: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
>>> tf.test.is_gpu_available()
WARNING:tensorflow:From <stdin>:1: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.config.list_physical_devices('GPU')` instead.
2021-04-05 14:15:02.496781: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-04-05 14:15:02.518727: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x27fbeb2c710 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2021-04-05 14:15:02.525553: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2021-04-05 14:15:02.530213: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library nvcuda.dll
2021-04-05 14:15:02.562486: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce GTX 1660 Ti computeCapability: 7.5
coreClock: 1.59GHz coreCount: 24 deviceMemorySize: 6.00GiB deviceMemoryBandwidth: 268.26GiB/s
2021-04-05 14:15:02.571997: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
2021-04-05 14:15:03.024554: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cublas64_10.dll
2021-04-05 14:15:03.031989: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cufft64_10.dll
2021-04-05 14:15:03.037297: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2021-04-05 14:15:03.046763: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusolver64_10.dll
2021-04-05 14:15:03.281223: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusparse64_10.dll
2021-04-05 14:15:03.560161: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_7.dll
2021-04-05 14:15:03.564981: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2021-04-05 14:15:04.163256: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-04-05 14:15:04.169328: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263] 0
2021-04-05 14:15:04.172439: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0: N
2021-04-05 14:15:04.175762: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/device:GPU:0 with 4615 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1660 Ti, pci bus id: 0000:01:00.0, compute capability: 7.5)
2021-04-05 14:15:04.188031: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x27fe8d39530 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2021-04-05 14:15:04.195294: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce GTX 1660 Ti, Compute Capability 7.5
True
结果正确
安装Tensorflow 报错false Not creating XLA devices, tf_xla_enable_xla_devices not set相关推荐
- anconda安装后命令行中安装tensorflow报错
现象 anconda安装后命令行中安装tensorflow报错 pip install --upgrade --ignore-installed tensorflow-gpu Building wh ...
- 用pip安装tensorflow报错SyntaxError: invalid syntax
用pip安装tensorflow报错SyntaxError: invalid syntax 解决办法:直接在cmd中输入安装语句
- Ubuntu安装tensorflow报错:tensorflow-xx.whl not a supported wheel on this platform
解决Ubuntu安装tensorflow报错:tensorflow-0.5.0-cp27-none-linux_x86_64.whl is not a supported wheel on this ...
- 【已解决】Python安装TensorFlow报错“Consider adding this directory to PATH or, if you prefer to suppress this
[已解决]Python安装TensorFlow报错"Consider adding this directory to PATH or, if you prefer to suppress ...
- pip安装tensorflow报错:could not find a version that satisfies the requirement grpcio>=1.8.6
pip安装tensorflow报错:could not find a version that satisfies the requirement grpcio>=1.8.6 (venv) D: ...
- 彻底解决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 ...
- 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 ...
- Linux conda tensorflow-gpu安装及Not creating XLA devices, tf_xla_enable_xla_devices not set相关问题解决
0.首先介绍一下conda创建虚拟环境的基本操作. (1)创建Python的虚拟环境,并指定Python版本,不指定的话会使用默认的版本(Conda Base 环境中的Python版本). conda ...
- 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 ...
最新文章
- 不想当亿万富翁的程序员不是好老板
- java中的工厂模式_深入理解Java的三种工厂模式
- 0010服务器无对应信息,查看云服务器信息
- 非抢占式优先算法例题_非抢占短作业优先算法源代码(C语言)
- 最详细,快速入门Web前端开发的正确姿势
- 推荐系统有什么危害?
- 【以太坊源码】I.区块和交易,合约和虚拟机
- 腾讯已问灵魂,鹅厂新立家风
- 清华姚班、斯坦福博士、普林斯顿NLP组创始人 陈丹琦 获小诺奖之称的斯隆奖!...
- 用python画三角函数
- 软件测试——selenium环境搭建及自动化测试
- 【重磅】新智元推出百万级AI智库资讯互动平台,AI World2017世界人工智能大会TOP10大奖榜单发布
- 从Paxos到NOPaxos 重新理解分布式共识算法(consensus)
- “零踩线”的越秀地产真的美好吗?
- xshell最多支持4个_3分钟苹果发布会:iPhone12支持5G、3个尺寸4种型号
- 【开源毕设】一款精美的家校互动APP分享——爱吖校推 [你关注的,我们才推](持续开源更新2)
- plotly绘制简单图形10--金字塔图
- aria2简单下载脚本
- 微博爬虫及简单数据分析
- 电子器件系列十七:单稳态触发器