问题
I am using C++, GTX1070
I am allocating a cuda array as described:
//variables: Vdepth = 200, Vheight = 100, Vwidth = 100, device = 0 VolumeId = 0
cudaExtent volumeSize = make_cudaExtent(Vdepth, Vheight, Vwidth);
cudaArray *d_volumeArray = NULL;
cudaChannelFormatDesc channelDesc = cudaCreateChannelDesc<texture_type>();
VERIFY_CALL( cudaMalloc3DArray(&d_volumeArray, &channelDesc, volumeSize) );
cu_VolArray[device][VolumeId] = d_volumeArray;
Then I try to free it like this:
VERIFY_CALL(cudaFreeArray(cu_VolArray[device][VolumeId]));
cu_VolArray[device][VolumeId] = NULL;
using GPUz, allocating will increase GPU memory by 100MB and free will decrease by 10MB - how to clear the extened memory?
this whole code is run through mex in MATLAB (2012a).
these "stuck" memory blocks are causing my MATLAB to get stuck (stuck at 'busy') when trying to clear mex_name
来源:https://stackoverflow.com/questions/55438352/gpu-memory-not-getting-free-using-cudamalloc3darray