Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple CPUs? #13

Open
thanhkien84 opened this issue Nov 6, 2017 · 6 comments
Open

Multiple CPUs? #13

thanhkien84 opened this issue Nov 6, 2017 · 6 comments

Comments

@thanhkien84
Copy link

Is there any way to run the code on multiple CPUs or GPUs?

@obilaniu
Copy link
Collaborator

obilaniu commented Nov 6, 2017

The code will run on multiple CPUs provided you've linked it with the multithreaded builds of BLAS libraries like MKL or OpenBLAS, and have not undertaken steps to disable multithreading (such as through the setting of certain OpenMP environment variables).

There is no support at present for multiple GPUs, and we do not foresee adding it to the current Keras+Theano code because Theano itself is being sunset.

A future rewrite of this codebase to another framework may possibly support multiple GPUs.

@austinmw
Copy link

I'm trying out the demo and started training. It took about 4 hours to complete 1 epoch. Can I stop/restart training and test at any time? By default it's set to run for 200 epochs which for my system would be ~1 month straight. Did you find this amount of training is needed for good performance on musicnet?

@obilaniu
Copy link
Collaborator

@austinmw

A runtime on the order of 4 hours is consistent with running on CPU. With gpuarray 0.7.5, a P100 GPU and THEANO_FLAGS="mode=FAST_RUN,device=cuda,floatX=float32,gpuarray.preallocate=1", Musicnet epochs take on the order of 100-150 seconds each.

I did not code the Musicnet aspect, so I can't vouch for its resumability.

@austinmw
Copy link

Thanks for the suggestion. Do you use latest theano/libgpuarray/pygpu releases?

@obilaniu
Copy link
Collaborator

@austinmw Approximately the setup for Musicnet:
Theano 1.0.1
libgpuarray/pygpu 0.7.5 (they're from the same repo)
cuDNN 6.0.21
CUDA Toolkit 8.0 (I believe).

Those are the newest Theano/libgpuarray releases and somewhat old cuDNN/CUDA libraries. Still works very well.

@austinmw
Copy link

Thanks, had to edit the .theanorc with cuda path, but got it working with CUDA 9.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants