【问题标题】:ERROR (theano.gpuarray): Could not initialize pygpu, support disabled错误(theano.gpuarray):无法初始化 pygpu,支持禁用
【发布时间】:2017-11-04 21:26:28
【问题描述】:

我正在尝试将 theano 0.9 配置为使用 gpu,但出现此类错误。 我使用带有 nvidia GeForce 940m 和 cuda 8 的 windows 10。以前我的系统可以在 theano 0.8 上正常工作以进行 gpu 计算。我刚刚更新了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 文件如下:

[global]
device = cuda
floatX = float32

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

[nvcc]
fastmath = True

【问题讨论】:

  • 尝试设置device=cuda0,或查看stackoverflow.com/questions/43577788/…
  • @K_Augus:我尝试了很多可能性,但仍然无法解决这个问题
  • 您声明您使用的是 cuda 8.0,但您的根路径指向 v7.5...?

标签: gpu theano


【解决方案1】:

我在运行 Theano 代码时遇到了相同(类似)的错误。我正在使用带有两个 gpu(optimus 技术)的笔记本电脑。为我解决的问题是使用启用的 gpu 运行我的 python 代码,如下所示: optirun python2 my_code.py 希望这可以帮助。

【讨论】:

    猜你喜欢
    • 2016-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-30
    • 2020-05-28
    • 1970-01-01
    • 2023-03-20
    • 1970-01-01
    相关资源
    最近更新 更多