2016-11-18 55 views
1

我不確定此問題是否屬於此處或tensorflow疑難解答或askubuntu上,但我會從這裏開始。我在GPU上運行tensorflow時遇到問題,例如以下代碼:使用fglrx驅動程序在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) 

給出的輸出: 設備映射:沒有已知的裝置。

當我用'cpu:0'語句更改字符串時,沒有錯誤。我有一臺運行在Linux Mint 17.3上的AMD Radeon HD 6650M GPU,安裝了fglrx-updates驅動程序(開源軟件無法運行,當選擇xserver-xorg-ati時,筆記本電腦會以軟件渲染模式啓動) 。由於張量流不能使用fglrx驅動程序,會發生錯誤嗎?這可以解決嗎?有沒有人在那裏使用tensorflow上的fglrx驅動程序而沒有這個問題?任何信息都是有用的。

+0

是的,我認爲tensorflow不支持AMD gpus。 – sygi

+0

做了更多的研究,看起來這是真的。如果你願意,寫下這個答案,我會接受它。 –

回答

0

不幸的是,目前tensorflow只支持支持CUDA的NVIDIA GPU。

您可以關注issue,跟蹤支持開源OpenCL的努力。