By default, Windows constantly monitors the GPU and driver to make sure it is responding as expected (called Timeout Detection and Recovery, or TDR). If it does not respond after 2 seconds, it will reset the driver. This is problematic for general purpose GPU computing because intensive calculations may take longer than 2 seconds.
You can and should edit the registry to increase the timeout delay. The steps are detailed below:
Computer\HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\GraphicsDrivers in the left browser pane or address bar.If the "TdrDelay" key does not exist, add it by performing the following:
a. Edit > New > "DWORD (32bit Value)"
b. Name the key "TdrDelay"
c. Double-click on "TdrDelay" key, make it a Decimal, and set its value to some "large" value you feel comfortable with. A conservative value may be 60 (sec), but the higher the better for potentially long-running GPU calculations.