Theano CUDA异常

8

我对Theano比较新,想在我的GPU上运行mnist示例,但是我得到了以下输出:

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

它不断输出DEBUG消息,但没有任何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

我可以帮你解决这个问题吗?

我也遇到了这个问题,虽然不是在那个示例程序中。使用Anaconda Python 3.4,GeForce GTX970,Windows 10和Theano 0.8rc1。正在寻找解决方案... - cb4
1个回答

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

有时程序在此之后能正常工作,有时不能。这很奇怪。 抱歉我不能发表评论,所以我只发布答案。


我发现如果禁用集成显卡,一切都正常。如果你有两个显卡,可以尝试这个方法。 - XY WANG

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接