ComputeSharp
ComputeSharp copied to clipboard
Keep GPU Responsive?
Hey, so for fun I'm making a hailstone (Aka the Collatz Conjecture) calculator. I'm having it run on the GPU, and the problem arises when I give it too many numbers to calculate. Upon running, my screen freezes for a moment, then Visual Studio tells me the following:
'The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.'
What this tells me is that the GPU is spending too much of it's time working on my program, and not enough time drawing actual frames for Windows. Windows notices this, and suspends the GPU, causing the crash. I'd like to know: Is there a way I can limit how much of my GPU's resources are used? Preferably in a way that adapts to the power of different GPUs.