I’m wondering if the setting up of the GPU operated by cudaSetdevice can be made persistent between succesive calls to the same executable from the system.
As I’ve measured in my particular executable setting up the GPU takes 2 seconds. At least that is what I measure for cudaSetDevice. Other stuff (data transfer from CPU and actual computations) take just 0.5s, so that the setting up is my actual bottleneck.
In my actual application, I call that particular executable thousands of times, so that I’m wondering if it is possible to arrange things so that the setting up does not need to be performed each time.
Any suggestion is very welcome!