torch / cunn

Other
215 stars 174 forks source link

use memory of GPU for a process #466

Open hainguyenct opened 7 years ago

hainguyenct commented 7 years ago

Hello everyone, I have 2 GPUs with 12GB RAM for each. I would like to run a process which is able to use RAM of both 2GPU (for example, I need to run a process which needs 20GB of memory). If you have information on this, please help me. Thank you so much

wanghechong commented 6 years ago

do you solve the problem? @hainguyenct

VincentSC commented 6 years ago

You cannot just sum the GPU-memories. Between the GPUs there needs to be data-sharing, which often goes via the PCI-bus. But Torch solves this differently.

First split your training-data in 2 sets, as you can merge the training data results. See https://github.com/torch/cutorch/issues/42 for some pseudo code.

hainguyenct commented 6 years ago

Hi @wanghechong , I converted my code to Keras which supported with multi-GPUs