Xbox LIVE Indie Games
Sort Discussions: Previous Discussion Next Discussion
Page 1 of 1 (3 posts)

How to work around Timeout Detection and Recovery (TDR) with intensive compute shaders?

Last post 5/12/2010 8:12 AM by John Whigham. 2 replies.
  • 5/11/2010 3:22 PM

    How to work around Timeout Detection and Recovery (TDR) with intensive compute shaders?

    I am endeavouring to use a compute shader to offload some intensive computation work from the CPU but am hitting a problem as the volume of computations are causing the GPU to go unresponsive for more than two seconds which is triggering the Windows Timeout Detection and Recovery (TDR) feature which in turn reboots the graphics driver and aborts my computations.

    I've experimented with breaking up the work into multiple Dispatch() calls with event fences between them but this doesn't make any difference - does anyone have any experience of working with such intensive compute shaders and have suggestions for how to break up the work to prevent the TDR from kicking off and rebooting the driver?

    I don't really want to mess with the TDR registry keys to disable TDR as that would affect the users general machine performance, I just want to be able to feed the GPU at a rate that will keep it responsive enough to keep Windows happy.

    any suggestions appreciated

    John

  • 5/11/2010 9:30 PM In reply to

    Re: How to work around Timeout Detection and Recovery (TDR) with intensive compute shaders?

    I don't have a solution, but I'd like to second this. We have experienced this timeout with very expensive pixel shaders doing screenspace processing. It kind of feels like something that needs to be split up specific to the problem domain. Do your multiple Dispatch calls use smaller shaders, or just fewer threads?
  • 5/12/2010 8:12 AM In reply to

    Re: How to work around Timeout Detection and Recovery (TDR) with intensive compute shaders?

    The only way around it I have found is to dispatch far fewer thread groups per call and put a D3D flush in between them but this understandably destroys performance and is really not a good solution.

    I am fortunate in a way that with effort I can separate my problem set into multiple buffers which I can run independently and accumulate at the end but this adds a whole bunch of code, effort, complexity and work to a problem that simply would not be required if Windows would allow compute shaders to run for arbitrary amounts of time without rebooting the driver.

    I am still left with the problem though that I can't tell how much work can be done in this magic two second window so I need to divide up the work into tiny pieces so low end GPUs don't choke which will then waste loads of performance on higher end hardware and defeat much of the point in using GPU acceleration in the first place.

    I know why the TDR feature is there, but surely there must be a better way that DirectX and compute shaders can play together with it?
Page 1 of 1 (3 posts) Previous Discussion Next Discussion