Setting the path to CUDA in THEANO_FLAGS

456 Views Asked by At

I try to set the THEANO_FLAGS and then import Theano. This always results in an error.

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

How could I change the path "/Developer/NVIDIA/CUDA-7.0/lib/libnvrtc.dylib" to "/usr/local/cuda/lib/libcuda.dylib"?

0

There are 0 best solutions below