cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

fccaa33
Journeyman III

Is it possible to limit to use of gpu ?

Limit the precentage of use of gpu (say 80%)

Hi all,

This is my first post here.  Nice to meet you all.

I got my HD6570 last week.  And I feel excited about OpenCL computing on GPUs.  It's really fast.

However, I have one question.

My simulation can fully utilize the gpus for a long time.  It can take one hour something.

Because the program is so demanding, I cannot use my computer smoothly, say browsing websites.  I would like to ask, it is possible to limit the maximum use of gpu? 

In OpenMP, we can use omp_set_num_threads(n); to control the use of threads.  So, I am looking for a similar stuff.

Thank You.

fccaa

0 Likes
8 Replies
arsenm
Adept III

GPUs aren't currently preemptible to allow the screen to draw.

What you can do is break your work size into smaller chunks. You need to have tasks that run in < ~(1/30) seconds for a relatively smooth system. 

Predicting run times and selecting appropriate work sizes is a problem I'm always looking for a better solution to. I've found that it's best to break your global work (by using the offset argument to clEnqueueNDRangeKernel()) into sizes that are multiples of (number compute units) * (workgroup size), which helps if your time problem is due to a large global work size. I've also found you need a clFinish() after each execution for the desired effect.

If individual work items take a long time, then I don't really know what to do (although this is a problem I need a solution for as well).

0 Likes

Thanks for your comment.

It seems to be possible to spare some gpu resource for me to move my cursor. 🙂

I will try it when I am home.

0 Likes

Why don't you install the second graphics card to separate activities? Get someting really simple and cheap like HD 5450.

0 Likes

Your suggestion solves the problem..

However, I have only one PCI-E on my motherboard, while the prices of PCI display cards are not reasonable.  So, if I can do it on the programming level, I don't want to pay more.  Of course, the performance of the program will be degraded.  This is the tradeoff.

Anyway, thank you for your concern.

0 Likes

what CPU are you using. In some CPUs like Fusion(which is rather an APU) and sandybridge, there is an extra on-chip GPU which you might be able to use for display purpose.

 

Also SDK 2.5 release notes contain:

Support for headless GPU operation(not sure about device compatibility though)

So you may be able to completely drive the display from CPU and run OpenCL kernels on GPU.

0 Likes

I am using Phenom II x4 925 on MSI 770-C45.

So your idea is not possible in my case. 🙂

0 Likes

okay.

Are you able to run the gpu headless(without monitor)?

 

0 Likes

Sorry.  I think I dun really understand what "gpu headless" is.

But I think that the gpu can work when no monitor is connected.  Because I have written a shell script to run the program with different parameters at night.  At the same time, I will unplug the monitor from the electric socket.

And the gpu cannot do computation when the xserver is not on.

0 Likes