Hello all, I am running into an out of memory error on my GPU (8 GB, GTX 1080). I have drilled down to the code segment that keeps throwing the error, and it appears to be an issue with Matlab failing to free memory on the gpu after calculation. Specifically, this is occurring after an interp2 command.
I am attaching a MWE as a PDF. Long story short, this shows that after the interp2 command, a sizeable block of GPU memory never gets freed up even after all of the workspace variables on the GPU being cleared, gathered, or replaced. This is a major issue if the result of the interp2 operation is large enough that gather(gpuData) causes an out of memory error; there is no way to pull the data off of the GPU without resetting the GPU, which wipes the data.
Is this a 2017a issue? Any help would be appreciated.
Best Answer