cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

rbarreira
Journeyman III

Best way to prevent GUI slowdown

Hi,

I am running NDRanges with big work sizes (about 1 million items) on my HD 5750 where each kernel is quite time consuming, so the whole NDRange takes almost 1 second to run. I've noticed that the Windows GUI almost freezes, for example if trying to move a window while running the kernels.

From what I can tell this is because Windows needs the GPU and cannot preempt to gain control of it from the kernels.

Question 1: Initially I assumed the whole NDRange would not run at once, instead I thought Windows could get control of the GPU in between local work groups. Now I'm guessing this is not the case, is that right?

Question 2: What is the accepted best way to prevent this temporary GUI freeze, if the kernels cannot be made to run faster? Dispatching many smaller NDRanges instead? If so, is there any guideline on the maximum NDRange execution time before the GUI starts suffering?

Thanks for your time!

Ricardo

0 Likes
1 Reply

1) This is correct, a GPU is no a pre-emptible device, so windows cannot take control until the kernel is done executing.
2) The best way to do this is to not use heavy computation on the display card. One way to do this is to break up launches into multiple smaller launches and use the global offset parameter of EnqueueNDRange to specify what your new global launch offsets should be.
0 Likes