nnrales
nnrales

Reputation: 1519

How to enable parallel processing on Theano ? No GPU

I have been trying to find ways to enable parallel processing in theano while training a neural network , but I can't seem to find it. Right now when I train a network theano is only using a single core.

Also I do not have access to a GPU , so if I could make theano use all the cores on the machine, then it will hopefull speed things up.

Any tips on speeding up theano is very welcome !

Upvotes: 1

Views: 198

Answers (1)

nnrales
nnrales

Reputation: 1519

This is what I have been able to figure out.

Follow the instructions on this page http://deeplearning.net/software/theano/install_ubuntu.html It seems that I did not install BLAS properly. So I reinstalled everything according to the instructions on the website.

Theano has config flags that have to be set.

And follow the discussion here Why does multiprocessing use only a single core after I import numpy?

Using all this when I run the script

THEANO_FLAGS='openmp=True' OMP_NUM_THREADS=N OPENBLAS_MAIN_FREE=1 python <script>.py 
//Where N is the number of cores 

Theano uses all the cores on my machine.

Upvotes: 1

Related Questions