Nvidia control panel option: Optimise for Compute Performance

The deep learning program, that I’ve written in pytorch with cuda10, works if the parameter, that can be found in Manage 3D setting in Nvidia Control Panel, “Optimise for Compute Performance” is set to Off. However, I would like to set this to “On” for boosting the performances, since the program uses only a small part of resources, for instance, the GPU cores never reach the maximum clock frequency.

The problem is when I set “Optimise for Compute Performance” to “On” the error that it gives to me is the following:

"RuntimeError: CUDA error: all CUDA-capable devices are busy or unavailable".

How can I solve it?

My GPU is a GTX960m.