简体   繁体   English

Theano CUDA例外

[英]Theano CUDA exception

I'm relatively new to theano and I want to run the mnist example on my GPU but I get the following output: 我是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

It keeps outputting DEBUG messages without any output of mnist. 它保持输出DEBUG消息而没有mnist的任何输出。 I have a working version of nvcc: 我有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

And my .theanorc file: 和我的.theanorc文件:

[global]
floatX = float32
device = gpu0

[nvcc]
fastmath = True

How can I solve this? 我该如何解决?

I have a similar problem. 我有一个类似的问题。 Search google and get the code. 搜索谷歌并获取代码。 https://github.com/Theano/Theano/blob/master/theano/sandbox/cuda/nvcc_compiler.py 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)

It seems to nvcc have error output. 看来nvcc有错误输出。

But in my occasion, its output looks like 但是在我的情况下,它的输出看起来像

DEBUG: nvcc STDOUT mod.cu 调试:nvcc STDOUT mod.cu

DEBUG: nvcc STDOUT mod.cu 调试:nvcc STDOUT mod.cu

Sometimes the program work fine after this, sometimes doesn't work. 在此之后,有时程序可以正常运行,有时不起作用。 It's very strange. 真奇怪 Sorry I can not make comment, so I just post the answer. 抱歉,我无法发表评论,所以我只发布了答案。

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

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