Hi, just wondering why, on my Linux box where the GPU is used to display the desktop, when I run any of the samples and they do a device reset when they’re done, how come that doesn’t destroy the desktop display? Instead, the window the application created disappears. Obviously that is good behavior, but I don’t understand it. Seems like a device reset would take out all the applications that have a window displayed.
cudaDeviceReset is a CUDA runtime API call. Fundamentally what it does is destroy a cuda context. This is not actually the same as resetting a device, when the point of view is outside of CUDA. (A GPU is more than just a CUDA engine.)
cudaDeviceReset attempts to restore the device to the state it was in before the (current) cuda context was created. This is not the same as, for example, reloading the driver, or performing a hardware reset on the GPU.