CLIJ not releasing GPU memory

Hi @haesleinhuepf

I’m finding that my GPU dedicated memory isn’t being released even after calling CLIJ_clear() in an IJ1 macro.
The only way to clear it seems to be a restart of FIJI.

To replicate:

run("Blobs (25K)");
run("Scale...", "x=30 y=30 width=7680 height=7620 interpolation=Bilinear average create title=scaled");
run("32-bit");

run("CLIJ Macro Extensions", "cl_device=[GeForce RTX 2070]");
input = "scaled";
denoised = "denoised";
extrema = "extrema";

for (i = 0; i < 1000; i++) {
Ext.CLIJ_clear();
Ext.CLIJ_push(input);
Ext.CLIJ_blur3D(input, denoised, 2,2,0);
Ext.CLIJx_localExtremaBox(denoised, extrema, 2,2,2);

Ext.CLIJ_pull(extrema);
Ext.CLIJ_clear();
selectWindow(extrema);
run("Close");
}

Eventually the loop fails out

Have I missed something obvious?

Thanks in advance!

Console output.txt (424.7 KB)

1 Like

Hey @Matt,

thanks for the excellent bug report. Obviously, there was a memory leak within CLIJx_localExtremaBox which I just fixed .

Could you please update your Fiji, try it again and let me know if it works? It should look like this now in the Task Manager

Thanks again for the support!

Cheers,
Robert

1 Like

You’re a champion - thanks for the quick turnaround!
Memory usage is back to behaving as expected.

Cheers,
Matt

1 Like