简体   繁体   中英

Matlab Dual GPU memory usage

I have a Dual GPU card named Titan Z. I have Matlab 2016a trying to solve a sparse Ax=b equation set for different ' b ' values. Titan Z has two GPUs and 6 GB ram for each gpu

Here is the problem.

  1. If I solve a Ax=b problem on 1 GPU, let's say a ' A ' matrix size of 2GB, Matlab copies this matrix to each GPU's vram. GPU-Z reports that each GPU has 2 GB of data and only 1 GPU is working
  2. If I solve two Ax=b problem on 2 GPU, let's say ' A ' matrix size of 2GB, Matlab again copies this matrix to each GPU's vram twice. Now GPU-Z reports that each GPU has 4GB of data and two GPU is working simultaneously.
  3. If I try to solve a '4GB' problem simultaneously Nvidia driver crashes due to insufficient Vram. But I can solve it on one GPU. not on 2 GPU simultaneously.

Problem is Matlab copies those matrices twice, when it is not needed, more interestingly, it does this when two GPUs uses exact same ' A ' matrix but different ' b ' vectors.

How can I solve this problem?

It is a bit late reply to my own question but here is the solution. Disabling multi-GPU mode in Nvidia Control Panel solved the problem. Basically it disables the sli and gpus can run independently. It was simple as that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM