Thank you Joss, this is helpful. About the issue of GPU co-used for graphic display, how is matlab parallel processing working with multiple cards/host, for example, would it be useful to get an extra NVidia card, possibly external, which would be dedicated to parallel processing? Are the tasks/requests from matlab shuffled in between the two GPUs, or the user can direct the input to a particular GPU? Also, it states that matlab parallel processing does not support but CUDA and NVIDIA, does that mean it does not work with other GPU brands, or that there is no tech support for it? Thank you, Octavian
gpuArray memory requirement estimation
조회 수: 2 (최근 30일)
이전 댓글 표시
Dear All,
I was running a script employing parallel processing and a gpuArray structure. I get the following error on two PCs with different Nvidia cards
Error using gpuArray.eye An unexpected error occurred during CUDA execution. The CUDA error was: out of memory
Ressetting the gpuDevice(1) on either box does not help.
Questions: 1. How can I estimate what memory is required by any gpuArray (I know the available GPU memory with gpuDevice() command, but not that requested)
2. Besides a true relative memory deficit (task vs available), what other causes could lead to this error?
For example, I work on a PC 64 bit windows 8.1, matlab R2014a
GPU: gpuDevice()
ans =
CUDADevice with properties:
Name: 'GeForce GTX 645'
Index: 1
ComputeCapability: '3.0'
SupportsDouble: 1
DriverVersion: 5.5000
ToolkitVersion: 5.5000
MaxThreadsPerBlock: 1024
MaxShmemPerBlock: 49152
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
SIMDWidth: 32
TotalMemory: 1.0737e+09
FreeMemory: 207220736
MultiprocessorCount: 3
ClockRateKHz: 823500
ComputeMode: 'Default'
GPUOverlapsTransfers: 1
KernelExecutionTimeout: 1
CanMapHostMemory: 1
DeviceSupported: 1
DeviceSelected: 1
Thank you,
Octavian
댓글 수: 2
채택된 답변
Joss Knight
2014년 12월 2일
Hi. It sounds like you're using the same card for both graphics and computation - this will put quite severe limitations on the amount of memory you have available.
1. The simplest way is to gather() your gpuArray to the CPU and call whos. This will tell you the amount of space it takes up in bytes (short of a small amount of header information). The equation is pretty simple, it's just numel(X) * 8 for double-precision arrays (the standard). Or multiply by 16 if the array is complex.
2. There are no other ways to get an Out of Memory error when calling gpuArray.eye(). Other functions will sometimes run out of memory because they need to create intermediate arrays as part of the computation; this error will still only be thrown when trying to allocate more memory than is available.
댓글 수: 0
추가 답변 (1개)
Joss Knight
2014년 12월 18일
편집: Joss Knight
2014년 12월 22일
In answer to your other questions:
1. Would it be useful to get a separate NVIDIA card, dedicated to parallel processing?
Yes.
2. How are parallel tasks issued between multiple GPUs?
One MATLAB session accesses one GPU. If you have multiple workers running in a parallel pool, your GPUs will be shared out between the workers. Computation is not automatically shared between multiple GPUs, this is something you will have to do manually using a parallel pool.
3. Does it only work with NVIDIA cards, or is there just no tech support for other cards?
NVIDIA cards only. Let us know your requirements - what are you doing and what makes you need to use a different make of card?
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 GPU Computing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!