Hi,
For a new project I need to write an application that uses the GPU. It will need to do calculations on the CUDA cores. I would like to reserve almost all of the CUDA cores for this. Like 90%.
Is that possible? I do not care if the gui gets a bit slower because of that.
I know there is a way to reserve CPU cores for your application. Can such a thing be done with the GPU too?
Currently, we don’t provide a way to control the GPU scheduler.
Is it possible for your use case that use just one process?
As the same process shared the identical CUDA context, you can check if Green Contexts can help.
This Green Contexts looks very interesting. But I’m not sure if I understand correctly.
Do I understand correctly that when I create a Green Context that I can specify how many SMs to use and that these SMs will only be available for all threads within the process in which the context was created?
That would be great. If not, which part did I not understand correctly?
I’m not a Linux expert.
How can I run all GPU tasks in the same process? I guess there is at least some graphics task. Can I run one of my tasks on the same process of the graphics?
You will need to implement a process and it creates different threads for the task.
It should be okay if some default rendering task cannot use the same context.
These jobs are usually lightweight and won’t occupy too many GPU resources.
Process 1: Rendering
Process 2: CUDA pre-processing, inference, CUDA post-processing.
Processes 1 and 2 will share GPU in a time-slicing manner.
But as process 1 is relatively lightweight, it won’t occupy GPU for a long time.
In process 2, you can decide the resources for pre-processing, inference, and post-processing via green context.
With careful design, you should be able to reserve the resources for a particular task.