在THEANO_FLAGS中设置CUDA的路径

时间:2017-10-12 20:42:59

标签: theano theano-cuda gpuarray

我尝试设置THEANO_FLAGS然后导入Theano。这总是会导致错误。

In [1]: import os

In [2]: os.environ["THEANO_FLAGS"] = "cuda.root=/usr/local/cuda,device=cuda,floatX=float32"

In [3]: import theano
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
Traceback (most recent call last):
  File "/Users/anonymouse/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py", line 164, in <module>
    use(config.device)
  File "/Users/anonymouse/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py", line 151, in use
    init_dev(device)
  File "/Users/anonymouse/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py", line 60, in init_dev
    sched=config.gpuarray.sched)
  File "pygpu/gpuarray.pyx", line 634, in pygpu.gpuarray.init
  File "pygpu/gpuarray.pyx", line 584, in pygpu.gpuarray.pygpu_init
  File "pygpu/gpuarray.pyx", line 1057, in pygpu.gpuarray.GpuContext.__cinit__
GpuArrayException: Could not load "/Developer/NVIDIA/CUDA-7.0/lib/libnvrtc.dylib": dlopen(/Developer/NVIDIA/CUDA-7.0/lib/libnvrtc.dylib, 5): image not found

如何将路径“/Developer/NVIDIA/CUDA-7.0/lib/libnvrtc.dylib”更改为“/usr/local/cuda/lib/libcuda.dylib”?

0 个答案:

没有答案