-
Notifications
You must be signed in to change notification settings - Fork 25
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 GPU memory usage? #75
Comments
GPU memory is mostly allocated via CuPy. You can set the memory limit via CuPy if you hope GPU can do something else. https://docs.cupy.dev/en/stable/user_guide/memory.html#limiting-gpu-memory-usage Although GINT* kernels do not allocate global memory explicitly, those kernels allocate a lot of local memory for high angular momentums. Those local memory are eventually allocated on global memory. So for high angular momentums, you probably still have the 'out of memory' issue. |
thank you for the explanation |
Hello, I am reopening this issue. I have found that if I turn on CUDA_MPS and limit the number of active threads with this command: My understanding is that this reduces the local/shared memory in use at once, stopping the errors, at the expense of runtime. Is it possible to do a similar modification at runtime, or compile time, in the code? Maybe these values:? gpu4pyscf/gpu4pyscf/lib/gint/gint.h Lines 77 to 81 in 6474b41
|
This is a good suggestion. If you turn off some threads, there is no need to allocate local memory for those threads. We can take it as one of the possible solutions. |
Hello,
When running on a GPU that might be doing something else I am sometimes seeing out of memory errors:
CUDA Error of GINTint2e_jk_kernel: out of memory
Is it possible to specify a hard limit on the amount of memory used by these kernels?
The text was updated successfully, but these errors were encountered: