GPU memory fragmentation

조회 수: 4 (최근 30일)
Rodrigo
Rodrigo 2012년 4월 13일
I have been running GPU code on 480 and 580 GTX cards in R2011b for a while and I keep hitting memory fragmentation problems. Either from straigtforward gpuArray routines (conv2, boolean comparisons, repmat multiplication, etc) of from simple CUDA kernels that should not require much memory at all.
I got in the habit of clearing loop variables defined on the GPU before every iteration, as they seem to creep up in the memory footprint without changing the actual array size or type, but aside from that I don't know any good way to avoid running into the fragmentation thing. Any tips or secret defrag commands?

채택된 답변

Jason Ross
Jason Ross 2012년 4월 13일
In 2012a, a "reset" command has been added:
Description
reset(gpudev) resets the GPU device and clears its memory of GPUArray and CUDAKernel data. The GPU device identified by gpudev remains the selected device, but all GPUArray and CUDAKernel objects in MATLAB representing data on that device are invalid.

추가 답변 (1개)

Image Analyst
Image Analyst 2012년 4월 13일
You might be interested in this:
|Join us for an exciting MathWorks webinar: Large Data Sets in MATLAB
19 Apr 2012
9:00 AM U.S. EDT / 2:00 PM GMT 2:00 PM U.S. EDT / 7:00 PM GMT |

카테고리

Help CenterFile Exchange에서 GPU Computing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by