简体   繁体   English

使用fglrx驱动程序在GPU上运行tensorflow

[英]Running tensorflow on GPU with fglrx driver

I'm not sure if this question belongs here or on tensorflow troubleshoot or on askubuntu, but I'll start here. 我不确定这个问题是属于这里还是属于tensorflow故障排除或askubuntu,但我会从这里开始。 I'm having problems with running tensorflow on my GPU, eg the following code: 我在GPU上运行tensorflow时遇到问题,例如以下代码:

import tensorflow as tf;

with tf.device('/gpu:0'):
    a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
    b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
    c = tf.matmul(a, b)
# Creates a session with log_device_placement set to True.
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
# Runs the op.
print sess.run(c)

gives output: Device mapping: no known devices. 给出输出:设备映射:没有已知的设备。

There are no errors when I change the string in with statement with 'cpu:0'. 使用'cpu:0'更改with语句中的字符串时没有错误。 I have a AMD Radeon HD 6650M GPU, running on Linux Mint 17.3, with fglrx-updates driver installed (the open-source one didn't work, the laptop would keep starting in software rendering mode when xserver-xorg-ati was selected). 我有一台运行在Linux Mint 17.3上的AMD Radeon HD 6650M GPU,安装了fglrx-updates驱动程序(开源的不起作用,当选择了xserver-xorg-ati时,笔记本电脑将继续以软件渲染模式启动) 。 Could the error happen because tensorflow can't use the fglrx driver? 错误是否会发生,因为tensorflow无法使用fglrx驱动程序? Can this be fixed? 这可以修复吗? Is there anyone out there, using fglrx driver on tensorflow without this issue? 有人在那里,在tensorflow上使用fglrx驱动程序没有这个问题吗? Any information is helpful. 任何信息都有帮助。

Unfortunately, currently tensorflow only supports NVIDIA GPUs that support CUDA. 不幸的是,目前tensorflow仅支持支持CUDA的NVIDIA GPU。

You can follow the issue , tracking the effort to support open-source OpenCL. 您可以关注此问题 ,跟踪支持开源OpenCL的工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM