Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

limit the amount of memory a process can allocate on a single CUDA device #49

Closed
DiTo97 opened this issue Jul 8, 2023 · 1 comment
Closed

Comments

@DiTo97
Copy link

DiTo97 commented Jul 8, 2023

Hi all,

As the title suggests, is there a way to limit the total amount of memory that a process can allocate on a single CUDA device?

Perhaps, even by using pyNVML?

This issue is related to the following discussions:

What are the cons of sharing the resources of a single CUDA device among different processes competing for access?

@leofang
Copy link
Member

leofang commented Jun 15, 2024

Sorry for late response. AFAIK there is no generic sw tool for you to limit the amount of GPU memory allocatable per process. The closest thing is MPS or MIG (link) for partitioning a GPU in some ways. Using the stream-ordered memory allocator is another possibility, but all sw frameworks and libraries that you use must honor the driver mempool. I assume none of these is what you are asking for.

The linked material also discussed the consequence of oversubscribing a single device by multiple processes. Performance drop is an obvious possibility. Depending on the workload you might also experience deadlocks.

@DiTo97 DiTo97 closed this as completed Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants