繁体   English   中英

Theano CUDA例外

[英]Theano CUDA exception

我是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

我该如何解决?

我有一个类似的问题。 搜索谷歌并获取代码。 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有错误输出。

但是在我的情况下,它的输出看起来像

调试:nvcc STDOUT mod.cu

调试:nvcc STDOUT mod.cu

在此之后,有时程序可以正常运行,有时不起作用。 真奇怪 抱歉,我无法发表评论,所以我只发布了答案。

暂无
暂无

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

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