关于已经安装cuda但是tensorflow仍然使用cpu加速的问题
2018-03-05 17:14
405 查看
平台:ubuntu16.04 LTS
环境:cuda9.1 tensorflow-gpu1.4 nvidia390.25 anconda3.0
问题:cuda配置成功,tensorflow也能够code,但是使用的却是cpu加速,log:Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2.
解决方法:使用conda list 检查已经安装的包,发现除了tensorflow-gpu之外,还有tensorflow 1.5。猜测可能是因为使用了cpu版本的tensorflow。于是卸载tensorflow,但是并没有起到效果,尝试:conda uninstall protobuf,卸载全部tensorflow相关包,然后conda install tensorflow-gpu。随后编译提示切换设备为gpu0,成功使用gpu加速。
提示:keras和tensorflow不能共存。在conda install keras的时候会一起安装tensorflow,可能会导致上述问题。
参考:https://stackoverflow.com/questions/42326748/tensorflow-on-gpu-no-known-devices-despite-cudas-devicequery-returning-a-pas
环境:cuda9.1 tensorflow-gpu1.4 nvidia390.25 anconda3.0
问题:cuda配置成功,tensorflow也能够code,但是使用的却是cpu加速,log:Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2.
解决方法:使用conda list 检查已经安装的包,发现除了tensorflow-gpu之外,还有tensorflow 1.5。猜测可能是因为使用了cpu版本的tensorflow。于是卸载tensorflow,但是并没有起到效果,尝试:conda uninstall protobuf,卸载全部tensorflow相关包,然后conda install tensorflow-gpu。随后编译提示切换设备为gpu0,成功使用gpu加速。
提示:keras和tensorflow不能共存。在conda install keras的时候会一起安装tensorflow,可能会导致上述问题。
参考:https://stackoverflow.com/questions/42326748/tensorflow-on-gpu-no-known-devices-despite-cudas-devicequery-returning-a-pas
相关文章推荐
- Visual C++的安装问题?以及Visual C++正确安装但是Visual assist安装后不能使用的问题
- 关于wince 使用占用空间大的内存变量问题(编译无错误但是无法运行的问题)
- 关于“打开项目**时发生问题,尝试退出并重新启动应用程序。如果问题仍然存在,则可能是由于正在使用不支持的项目版本,或者项目文件可能损坏”的问题的解决办法。
- WCF-005:关于 WCF 基础连接已经关闭 连接被意外关闭-不是使用父类指向子类问题
- 关于安装IE8之后VS2008使用MFC出现问题的解决方法
- 解决一个问题的思路 之“解决已经写满con.close() 仍然出现"但是尚未从池中获取连接"的连接池耗尽问题”
- 关于Windows 8使用WMP播放音乐时WUDFHost跑CPU和硬盘的问题解决
- WCF-005:关于 WCF 基础连接已经关闭 连接被意外关闭-不是使用父类指向子类问题
- 关于在TextBox中写入换行“\r”有用,但是在txt文件中使用“\r”无效的问题
- 关于在Linux mint(应该所有基于ubuntu的发行版都是这样子)jade安装使用问题
- 关于eclipse打包签名apk的步骤(对于已经打包过的apk,解决安装程序签名相同的问题)
- 全程记录:今天尝试安装SharePoint Server 2007过程 ,安装成功了,但是开始使用碰到权限问题,应该算是BUg吧
- 关于eclipse的使用与安装的问题
- cuda安装使用中的问题1 使用过程中出现 无法查找或打开PDB文件。
- 关于使用WindowsUpdate 或 Windows 自动升级时碰到的 svchost.exe 进程 CPU 资源占用过高的问题的相关信息
- 关于安装IE8之后VS2008使用MFC出现问题的解决方法
- 关于在Linux mint(应该所有基于ubuntu的发行版都是这样子)jade安装使用问题
- SQL2000系统表、存储过程、函数的功能介绍及应用2009年01月21日 星期三 11:38虽然使用系统存储过程、系统函数与信息架构视图已经可以为我们提供了相当丰富的元数据信息,但是对于某些特殊的元数据信息,我们仍然需要直接对系统表进行查询。因为SQL
- Myeclipse中文件已经上传到服务器目录下,文件也没有被占用,但是页面中无法读取和使用问题的解决方法
- F#学习存疑求解答:关于使用Cotinuation仍然堆栈溢出的问题