"Clear <gpuarray>" or reinitialization command take more time in Matlab2018 than Matlab2015

I have a gpuArray "ga" of size 729x28752. After the use I want reinit. the variable. But whenever I run it in Matlab2018a it takes almost 10 min to do so but when I run the same code in Matlab2015b it take just a few secs. Because of this issue, in Matlab2018 the excution of the program is much larger. I tried below things but it has same effect.
Clear ga; // taking 10mins in MATLAB2018
ga=[];// taking 10mins

댓글 수: 1

How are you creating ga? One difference between 15b and 18a is that clear takes effect immediately. So if ga is created by some long-running GPU code, then in 18a clear or assignment to empty will trigger synchronization of the device, whereas, in 15b it might not.
You could satisfy yourself that this is the case by adding wait(gpuDevice) before calling clear.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2018년 7월 11일

댓글:

2018년 7월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by