No, I don’t know what might be causing it as I haven’t this behavior before (but I also usually don’t use Jupyter). One debugging step I would try is to disable lazy module loading from the CUDA driver, which is on by default in PyTorch using CUDA >= 11.7.
You can disable it via export CUDA_MODULE_LOADING=EAGER
, which will load all kernels into the CUDA context again (as was the previous behavior). If this yields the same (higher) memory usage, it would mean that your Jupyter environment somehow interacts with env variables.
1 Like