GPU gather command clarification and GPU memory usage

Dear All,
1. If x is a gpuarray, and y its cpu correspondent, after the command
y=gather(x)
is x still on the GPU or is cleared (by being gathered on the cpu)?
2. Also, is there a way to see memory usage just on GPU at a certain time point, and not combined with the cpu memory usage?
3. Can x be saved on the hard drive without first being passed as y on the cpu?
Thank you,
Octavian.

댓글 수: 1

James Tursa
James Tursa 2015년 4월 2일
편집: James Tursa 2015년 4월 2일
According to the sqrt(G) example in the doc, the gpuArray G still exists after the gather function, so that implies that your x above still exists as a gpuArray after the gather function.

댓글을 달려면 로그인하십시오.

 채택된 답변

Edric Ellis
Edric Ellis 2015년 4월 2일

0 개 추천

  1. In this case, x still exists on the GPU - in general, input arguments to functions are not modified in MATLAB (some exceptions exist where the objects are handle types).
  2. Yes, look at the AvailableMemory field of the GPUDevice object returned by the function gpuDevice. See the documentation for more about this object
  3. Yes.

댓글 수: 1

On no 3, could you confirm also that one can define a gpuArray object directly on the GPU and not occupy intermediate cpu memory during the definition? Thank you,
Octavian

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 GPU Computing in MATLAB에 대해 자세히 알아보기

질문:

2015년 4월 2일

댓글:

2015년 4월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by