Program which is the compiler for GPU code.) This folder is called the cuda (Sanity check: The bin subfolder should contain an nvcc Toolkit installs a folder on your computer with subfolders bin, lib,
You should install at least the CUDA driver and the CUDA Toolkit, as The first thing you’ll need for Theano to use your GPU is Nvidia’s lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lguide -liomp5 -lmkl_mc -lpthread).
See the doc of that software and set the Theano flags blas.ldflagsĬorrectly (for example, for MKL this might be -lmkl -lguide -lpthread or Note thatĤ) Use a faster version like MKL, GOTO. Theano flags blas.ldflags to -lf77blas -latlas -lgfortran. Libatlas3gf-sse2 if your CPU supports SSE2 instructions. Sudo apt-get install libatlas-base-dev libatlas-base or Speed-ups of up to 3x, especialy on more recent computers, against the To invest the time, you can compile it to have a faster version (we have seen You can install a precompiled version on most OSes, but if you’re willing ATLAS is an open source optimized version ofīLAS. Using an optimized version can give up to 10x speedups in the BLAS functionsģ) Install the ATLAS library. Note that the default version of blas is not optimized. Then use the Theano flagsīlas.ldflags=-lblas. If you have root or sudo access inįedora you can do sudo yum install blas blas-devel. (against which Theano links) does not work. linking with BLASĢ) You can install the default (reference) version of BLAS if the NumPy version
Theano code performs, this might slow some things down (vs. Depending on the kind of matrix operations your This, set the value of blas.ldflags as the empty string (ex: export THEANO_FLAGS=blas.ldflags=). ATLAS is compiled by default only as aġ) Disable the usage of BLAS and fall back on NumPy for dot products. This does not work in the case NumPy wasĬompiled with a static library (e.g. Here are some different way to configure BLAS:Ġ) Do nothing and use the default config, which is to link against the sameīLAS against which NumPy was built. # other stuff can go here ldflags = -lf77blas -latlas -lgfortran #put your flags here # other stuff can go hereįor more information on the formatting of ~/.theanorc and theĬonfiguration options that you can put there, see config – Theano Configuration. The following libraries and software are optional:
Mac OS X comes with the Accelerateįramework built in, and various options exist for Windows (see A BLAS installation (with Level 3 functionality) Including the development headers ( -dev, -devel, depending on Is buggy in 0.6 (the scipy.csc_matrix version of dot() has aīug with singleton dimensions, there may be more bugs) and we do not
>=0.8 if you are using sparse matrices, because scipy.sparse
SciPy Only currently required for sparse matrix and special functions More recent version recommended! NumPy >= 1.5.0 Earlier versions could work, but we don’t test it. G++ >= 4.2 (for openmp that is currently always used) Model, but a C compiler allows for vastly faster execution. Theano can fall back on a NumPy-based Python execution g++, python-dev Not technically required but highly recommended, in order to compile On most Linux distributions) is recommended (see just below). Python >= 2.4 The development package ( python-dev or python-devel Linux, Mac OS X or Windows operating system We develop mainly on 64-bit Linux machines. Alternative: Anaconda 0.8.3 (Linux VM on Windows).In academia: Enthought Python Distribution (EPD).Troubleshooting: Make sure you have a BLAS library.