2015-12-02 44 views
8

我是比較新的theano,我想在我的 GPU運行MNIST例子,但我得到以下輸出:Theano CUDA例外

Using gpu device 0: GeForce GTX 970M (CNMeM is disabled) 
Loading data... 
Building model and compiling functions... 
WARNING (theano.gof.compilelock): 
    Overriding existing lock by dead process '9700' (I am process '10632') 

DEBUG: nvcc STDOUT mod.cu 
Creating library 
    C:/Users/user/AppData/Local/Theano 
    /compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_71_Stepping_1_GenuineIntel-3.4.3-64 
    /tmp55nlvvvo/m25b839e7715203be227800f03e7c8fe8.lib 
and object 
    C:/Users/user/AppData/Local/Theano 
    /compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_71_Stepping_1_GenuineIntel-3.4.3-64 
    /tmp55nlvvvo/m25b839e7715203be227800f03e7c8fe8.exp 

它使MNIST沒有任何輸出輸出調試消息。 我有NVCC的工作版本:

C:\Users\user>nvcc --version 
nvcc: NVIDIA (R) Cuda compiler driver 
Copyright (c) 2005-2015 NVIDIA Corporation 
Built on Tue_Aug_11_14:49:10_CDT_2015 
Cuda compilation tools, release 7.5, V7.5.17 

而且我.theanorc文件:

[global] 
floatX = float32 
device = gpu0 

[nvcc] 
fastmath = True 

我該如何解決這個問題?

+0

我也有這個問題,但不是與該示例程序。 Anaconda python 3.4,GeForce GTX970,Windows 10,theano 0.8rc1。尋找解決方案... – cb4

回答

1

我有類似的問題。搜索谷歌並獲取代碼。 https://github.com/Theano/Theano/blob/master/theano/sandbox/cuda/nvcc_compiler.py

 p = subprocess.Popen(
       cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 
     nvcc_stdout_raw, nvcc_stderr_raw = p.communicate()[:2] 
     console_encoding = getpreferredencoding() 
     nvcc_stdout = decode_with(nvcc_stdout_raw, console_encoding) 
     nvcc_stderr = decode_with(nvcc_stderr_raw, console_encoding) 

    if nvcc_stdout: 
     # this doesn't happen to my knowledge 
     print("DEBUG: nvcc STDOUT", nvcc_stdout, file=sys.stderr) 

看來nvcc有錯誤輸出。

但在我的場合,它的輸出看起來像

DEBUG:NVCC STDOUT mod.cu

DEBUG:NVCC STDOUT mod.cu

有時程序工作正常後,這,有時不起作用。這很奇怪。 對不起,我不能發表評論,所以我只是發佈答案。

+0

我只是發現,如果我禁用集成顯卡,一切都很好。如果你有兩個圖形,你可以試試這個。 –