Right, so essentially you are doing per process memory management because the layers lower down aren't smart enough to handle this transparently. I'm fairly sure that the nvidia libraries do support releasing memory and from what I see on my own machine memory usage of the GPU does go up and down when running longer jobs. So maybe it isn't so much a structural problem as a problem in one particular module that you exercise a lot?