禁用xla之后,源码编译TensorFlow1.13.1成功,测试运行3.0计算能力的GPU显卡K2100M成功!
禁用xla之后,源码编译TensorFlow1.13.1成功,测试运行3.0计算能力的GPU显卡K2100M成功!
源码编译的【tensorflow-1.13.1-cp36-cp36m-linux_x86_64【禁用xla编译选项,GPU计算能力3.0即可使用】.whl】轮子文件:
https://download.csdn.net/download/hardwork617s/14121844
先直接上图:
测试用Python代码:
# 测试成功:【(禁用xla编译选项)源码编译TensorFlow1.13.1成功! 】 成功使用计算能力为3.0的GPU进行计算
import tensorflow as tf
import os# 指定使用 GPU
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "0,1"print("TensorFlow【版本】(自己源码编译的,最低GPU计算能力3.0):")
print(tf.__version__)
print("TensorFlow【安装路径】:")
print(tf.__path__)# 显示GPU显卡识别log信息
print("【第1次】GPU显卡的识别log信息:")
sess1 = tf.Session()# 用[tf.matmul]计算【矩阵点积】
# 2-D tensor `a`
# [[1, 2, 3],
# [4, 5, 6]]
a = tf.constant([1, 2, 3, 4, 5, 6], shape=[2, 3])# 2-D tensor `b`
# [[ 7, 8],
# [ 9, 10],
# [11, 12]]
b = tf.constant([7, 8, 9, 10, 11, 12], shape=[3, 2])# `a` * `b`
# [[ 58, 64],
# [139, 154]]
c = tf.matmul(a, b)print("【矩阵点积】计算结果:")
print(c.eval(feed_dict=None, session=sess1))
sess1.close()# 再次显示GPU显卡识别log信息
print("【第2次】GPU显卡的识别log信息:")
sess2 = tf.Session(config=tf.ConfigProto(log_device_placement=True))
sess2.close()###################################################################################
# 再来测试一次
print("再来测试一次!")
sess3 = tf.InteractiveSession()matrix1 = tf.constant([[3., 3.]])
matrix2 = tf.constant([[2.],[2.]])
product = tf.matmul(matrix1, matrix2)# print the product
print("【1行2列的[行向量]】 * 【2行1列的[列向量]】结果:")
print(product.eval())#close the session to release resources
sess3.close()
Wing调试器输出结果:
TensorFlow【版本】(自己源码编译的,最低GPU计算能力3.0):
1.13.1
TensorFlow【安装路径】:
['/usr/local/lib/python3.6/site-packages/tensorflow_estimator/python/estimator/api', '/usr/local/lib/python3.6/site-packages/tensorflow', '/usr/local/lib/python3.6/site-packages/tensorflow/_api/v1']
【第1次】GPU显卡的识别log信息:
2021-01-12 00:07:57.029353: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:998] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-01-12 00:07:57.029643: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1433] Found device 0 with properties:
name: Quadro K2100M major: 3 minor: 0 memoryClockRate(GHz): 0.6665
pciBusID: 0000:01:00.0
totalMemory: 1.95GiB freeMemory: 1.93GiB
2021-01-12 00:07:57.029658: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
2021-01-12 00:07:57.242745: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-01-12 00:07:57.242778: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0
2021-01-12 00:07:57.242784: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0: N
2021-01-12 00:07:57.242888: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1699 MB memory) -> physical GPU (device: 0, name: Quadro K2100M, pci bus id: 0000:01:00.0, compute capability: 3.0)
【矩阵点积】计算结果:
[[ 58 64][139 154]]
【第2次】GPU显卡的识别log信息:
2021-01-12 00:07:57.305685: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
2021-01-12 00:07:57.305716: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-01-12 00:07:57.305722: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0
2021-01-12 00:07:57.305726: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0: N
2021-01-12 00:07:57.305788: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1699 MB memory) -> physical GPU (device: 0, name: Quadro K2100M, pci bus id: 0000:01:00.0, compute capability: 3.0)
Device mapping:
/job:localhost/replica:0/task:0/device:GPU:0 -> device: 0, name: Quadro K2100M, pci bus id: 0000:01:00.0, compute capability: 3.0
2021-01-12 00:07:57.305917: I tensorflow/core/common_runtime/direct_session.cc:317] Device mapping:
/job:localhost/replica:0/task:0/device:GPU:0 -> device: 0, name: Quadro K2100M, pci bus id: 0000:01:00.0, compute capability: 3.0再来测试一次!
2021-01-12 00:07:57.306311: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
2021-01-12 00:07:57.306328: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-01-12 00:07:57.306334: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0
2021-01-12 00:07:57.306338: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0: N
2021-01-12 00:07:57.306388: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1699 MB memory) -> physical GPU (device: 0, name: Quadro K2100M, pci bus id: 0000:01:00.0, compute capability: 3.0)
【1行2列的[行向量]】 * 【2行1列的[列向量]】结果:
[[12.]]
禁用xla之后,源码编译TensorFlow1.13.1成功,测试运行3.0计算能力的GPU显卡K2100M成功!相关推荐
- 低CUDA算力显卡用上高版本pytorch(ubuntu18.04源码编译特定版本pytorch(v1.10.0))
低CUDA算力显卡用上高版本pytorch(ubuntu18.04源码编译特定版本pytorch(v1.10.0)) 一 电脑配置 二 正常情况下源码编译步骤 三 我的编译过程及出现的问题 首先 安装 ...
- Android源码编译 HTC One/M7中文触摸CWM6.0.3.7版Recovery,专为白卡机(S-OFF)量身打造,再也不用担心线刷不了Recovery了
前言 声明:该Recovery支持HTC One国际版.港版等单卡版,国行的请止步. 首先科普一下什么是白卡机,简单说:所谓白卡机,指 ...
- 保姆级教程——Ubuntu16.04 Server下深度学习环境搭建:安装CUDA8.0,cuDNN6.0,Bazel0.5.4,源码编译安装TensorFlow1.4.0(GPU版)...
写在前面 本文叙述了在Ubuntu16.04 Server下安装CUDA8.0,cuDNN6.0以及源码编译安装TensorFlow1.4.0(GPU版)的亲身经历,包括遇到的问题及解决办法,也有一些 ...
- android源码编译并刷入nexus 6p手机
来自"梧桐那时雨"的博客:https://blog.csdn.net/fuchaosz/article/details/52473660 1 前言 经过一周的奋战,终于从谷歌官网上 ...
- pip安装wxpython报错traceback_使用源码编译wxpython-基于python2.7
1.前言 本文主要讲述在linux环境下进行编译wxpython,在windows下面安装wxpython很简单,只要下载,然后直接执行exe文件,下一步下一步即可安装,在linux下面,则具有很多步 ...
- python 3.10.0源码编译安装
python 3.10.0源码编译安装 文章目录 python 3.10.0源码编译安装 1. 安装编译依赖工具 2. 下载python 3.10.0 3. 编译安装 Python 4. 体验 1. ...
- mysql5.1编译安装centos7_CentOS7下 Nginx1.13.5 + PHP7.1.10 + MySQL5.7.19 源码编译安装
在CentOS7下 Nginx1.13.5 + PHP7.1.10 + MySQL5.7.19 源码编译安装过程记录. 一.安装Nginx 1.安装依赖扩展 # yum -y install wget ...
- ubuntu-18.04.4 Android系统源码TP1A(Android 13)下载及编译
继上一篇博客介绍了VMware Workstation15 配置ubuntu-18.04.4,这篇主要介绍安装后环境搭建,Android源码的下载与编译.小编当前下载的是当前最新的代码,是主干分支代码 ...
- 13.Centos软件包管理(rpm,yum,dnf),源码编译安装
基础知识 软件运行和编译 ABI:Application Binary Interface Windows与Linux不兼容 ELF(Executable and Linkable Format) P ...
最新文章
- 201C Fragile Bridges
- 检测是否是手机访问接口
- 2016重庆计算机一级考试题型,重庆计算机一级考试真题2016年最新(笔试+上机)
- java知识点3(null、引用相关知识(自己理解))
- 方便维护下拉框数据的UI设计
- C# ITextSharp pdf 自动打印
- 基于简单的路径压缩的并查集算法
- 手机销售网jsp程序设计
- gds文件 导出_RSoft CAD新的导入/导出GDS档案方法
- 51单片机基础知识(重点)
- 《设计模式沉思录》分享
- HTML5的学习资料(开发设计原则)
- PANTONE 色号
- 南邮java实验_南邮JAVA程序设计实验4 线程程序设计(指针式时钟)
- python3判断字典中的key是否存在_python3判断key存在字典中的方法是什么
- 2008春天在玉渊潭看到传说中的榆钱树
- OpenVINO 环境配置
- 步步为营 .NET 代码重构学习笔记 二、提炼方法(Extract Method)
- C语言输出 1到20 的阶乘之和
- 注意力机制工作原理详解
热门文章
- 【ppt幻灯片制作】Focusky教程 | 如何做到无需安装软件即可直接打开Focusky作品?
- 利用python进行薄膜光学的相关计算
- 借助第三方工具网站完成消息自动推送
- 星三角启动和双速风机配电详解
- Fedora 32 遇到 Please install libstdc++-devel package for m32 的可能解决办法
- [机器学习]XGBoost---增量学习多阶段任务学习
- 科研经验-文件的可视化管理(Endnote)
- 找回win7系统自带小游戏
- Redis高可用集群部署和集群扩展
- 电脑开机黑屏且只有鼠标箭头