错误(theano.gpuarray):无法初始化pygpu,已禁用支持 [英] ERROR (theano.gpuarray): Could not initialize pygpu, support disabled

查看:1075
本文介绍了错误(theano.gpuarray):无法初始化pygpu,已禁用支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将theano 0.9配置为使用gpu,但是出现了这样的错误. 我将Windows 10与nvidia GeForce 940m和cuda 8一起使用.以前,我的系统在theano 0.8上可以很好地用于gpu计算.我刚刚更新了theano.

I am trying to configure theano 0.9 to use gpu, but got such error. I use windows 10 with nvidia GeForce 940m and cuda 8. Previously my system works fine with theano 0.8 for gpu computation. I just updated the theano.

 ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
 Traceback (most recent call last):
 File "C:\Users\YL\Anaconda2\lib\site- packages\theano\gpuarray\__init__.py",   
 line 175, in <module>
use(config.device)
File "C:\Users\YL\Anaconda2\lib\site-packages\theano\gpuarray\__init__.py", line 162, in use
init_dev(device, preallocate=preallocate)
File "C:\Users\YL\Anaconda2\lib\site-packages\theano\gpuarray\__init__.py", line 65, in init_dev
sched=config.gpuarray.sched)
File "pygpu\gpuarray.pyx", line 614, in pygpu.gpuarray.init (pygpu/gpuarray.c:9415)
File "pygpu\gpuarray.pyx", line 566, in pygpu.gpuarray.pygpu_init (pygpu/gpuarray.c:9106)
File "pygpu\gpuarray.pyx", line 1021, in pygpu.gpuarray.GpuContext.__cinit__ (pygpu/gpuarray.c:13468)
GpuArrayException: Error loading library: -1

没有gpu配置,theano可以正常工作,否则会产生错误.我认为我必须对配置做一些错误.我的.theanorc文件如下:

Without gpu configuration, theano works fine, otherwise it produces the error. I think I must do something wrong with the configuration. My .theanorc file is as follows:

[global]
device = cuda
floatX = float32

[cuda]
root = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5

[nvcc]
fastmath = True

推荐答案

运行Theano代码时出现相同(相似)错误.我正在使用带有两个GPU(Optimus技术)的笔记本电脑.对我来说解决的是在启用了gpu的情况下运行python代码,如下所示: optirun python2 my_code.py 希望这可以帮助.

I am getting the same (similar) error when I run Theano code. I'm using a laptop with two gpu's (optimus technology). What fixed it for me is to run my python code with enabled gpu like so: optirun python2 my_code.py Hope this helps.

这篇关于错误(theano.gpuarray):无法初始化pygpu,已禁用支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆