错误

The first thing you’ll need for Theano to use your GPU is Nvidia’s GPU-programming toolchain. You should install

at least the CUDA driver and the CUDA Toolkit, as described here. The CUDA Toolkit installs a folder on your

computer with subfolders bin, lib, include, and some more too. (Sanity check: The bin subfolder should contain an

nvcc program which is the compiler for GPU code.) This folder is called the cuda root directory. You must also add

the ‘lib’ subdirectory (and/or ‘lib64’ subdirectory if you have a 64-bit Linux computer) to your

$LD_LIBRARY_PATH environment variable.

You must then tell Theano where the CUDA root folder is, and there are three ways to do it. Any one of them is

enough.

Define a $CUDA_ROOT environment variable to equal the cuda root directory, as in CUDA_ROOT=/path/to/cuda/root, or
add a cuda.root flag to THEANO_FLAGS, as in THEANO_FLAGS=’cuda.root=/path/to/cuda/root’, or
add a [cuda] section to your .theanorc file containing the option root = /path/to/cuda/root.

On Debian, you can ask the software package manager to install it for you. We have a user report that this works

for Debian Wheezy (7.0). When you install it this way, you won’t always have the latest version, but we were told

that it gets updated regularly. One big advantage is that it will be updated automatically. You can try the sudo

apt-get install nvidia-cuda-toolkit command to install it.

CUDA Toolkit 8.0
https://developer.nvidia.com/cuda-downloads

安装完成后,配置环境变量,在home下的.bashrc中加入

export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

export CUDA_HOME=/usr/local/cuda:$CUDA_HOME

THEANO_FLAGS=mode=FAST_RUN,device=gpu,nvcc.flags=-D_FORCE_INLTNES floatX=float32 python check1.py

nvcc fatal : Path to libdevice library not specified

WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available (error: cuda unavailable)

Using gpu device 0: GeForce GTX 1080 (CNMeM is disabled, cuDNN not available)

ERROR (theano.sandbox.cuda): nvcc compiler not found on $PATH. Check your nvcc installation and try again.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值