vlfeat / matconvnet

MatConvNet: CNNs for MATLAB
Other
1.4k stars 753 forks source link

multi GPU support #128

Closed xcyan closed 8 years ago

xcyan commented 9 years ago

Hi,

I did compare the multiGPU version and singleGPU version of matconvnet. But unfortunately, the multiGPU version is much slower than singleGPU version. While running cnn_train.m, the most of time was spent on "spmd" command.

Anyone has similar problems?

vedaldi commented 9 years ago

Hi, the multi-GPU version makes sense only if batches are sufficiently expensive as the communication overhead is very significant.

Also, MATLAB needs to create a temporary file to support communication (see the options). You may want to make sure that this file is in ramdisk.

On 3 May 2015, at 00:49, Xinchen Yan notifications@github.com wrote:

Hi,

I did compare the multiGPU version and singleGPU version of matconvnet. But unfortunately, the multiGPU version is much slower than singleGPU version. While running cnn_train.m, the most of time was spent on "spmd" command.

Anyone has similar problems?

— Reply to this email directly or view it on GitHub https://github.com/vlfeat/matconvnet/issues/128.

Jerrynet commented 9 years ago

@vedaldi Hi, did you consider using 'gplus' or 'gop' function in spmd?

itaykez commented 8 years ago

Hi Andrea, Why do you write to a file (and read) and not using MPI operations?

svvenkatakrishnan commented 8 years ago

I was looking for an example with multi-GPU support. I did come across https://github.com/vlfeat/matconvnet/issues/101. However, I was not able to find an example of using the multi-GPU support in the current master brach. Is there such an example available ?

lenck commented 8 years ago

Hi, it is quite simple, just specify more gpus, e.g.:

cnn_imagenet_train('train', struct('gpus', [1, 2]))