ERROR (theano.gpuarray): Could not initialize pygpu, support disabled

瘦欲@ 提交于 2019-12-11 07:38:05

问题


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

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

回答1:


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.



来源:https://stackoverflow.com/questions/44346349/error-theano-gpuarray-could-not-initialize-pygpu-support-disabled

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!