2017/5/26 環境 †python = 3.6.0 cuda = 8.0 手順 †% git clone https://github.com/pfnet/chainer.git % export LD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-8.0/lib:$LD_LIBRARY_PATH (とりあえず) cudnnのライブラリをダウンロードする。https://developer.nvidia.com/cudnn (requires membership of the NVIDIA Developer Program) % tar -xvf cudnn-8.0-osx-x64-v6.0.tar % sudo cp cuda/lib/libcudnn* /Developer/NVIDIA/CUDA-8.0/lib/ % sudo cp cuda/include/cudnn.h /Developer/NVIDIA/CUDA-8.0/include/ % cd /Developer/NVIDIA/CUDA-8.0/bin % sh cuda-install-samples-8.0.sh ~/workspace/chainer/ % pip3 install chainer % python3 >>> import cupy >>> import cupy.cudnn % cd workspace/chainer/NVIDIA_CUDA-8.0_Samples % make % cd bin/x86_64/darwin/release % ./smokeParticles 動けば成功 % cd chainer % pip3 install -U setuptools % python setup.py install % pip3 install cython % pip3 install matplotlib % cd examples/mnist/ % python3 train_mnist.py -g 0 デバッグ †% pip3 install pdb % python3 -m pdb train_mnist.py -g 0 |