Skip to content

Fix OOM in Gamma-point UHF gradient with GDF - #959

Open
puzhichen wants to merge 5 commits into
pyscf:masterfrom
bytedance:fix/gdf-gradient-oom-for-gamma
Open

puzhichen wants to merge 5 commits into
pyscf:masterfrom
bytedance:fix/gdf-gradient-oom-for-gamma

Conversation

@puzhichen

@puzhichen puzhichen commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Fix GPU OOM in PBC gradient calculations at the Gamma point, allowing larger systems to run. For kuhf gradients, the real density matrix at the Gamma point is detected and the exchange term is evaluated one spin at a time through the RHF path, cutting peak GPU memory to about 1/4 of the original. For rhf gradients, the auxiliary-basis batching size are now adapted to the available GPU memory.

@puzhichen puzhichen changed the title Fix OOM in Gamma-point UHF gradient with GDF [WIP] Fix OOM in Gamma-point UHF gradient with GDF Oct 9, 2026
@puzhichen
puzhichen force-pushed the fix/gdf-gradient-oom-for-gamma branch from 9ef57fa to a64b5ab Compare October 9, 2026 08:20
@puzhichen puzhichen changed the title [WIP] Fix OOM in Gamma-point UHF gradient with GDF Fix OOM in Gamma-point UHF gradient with GDF Oct 9, 2026
@puzhichen
puzhichen marked this pull request as ready for review October 10, 2026 00:18
Comment thread gpu4pyscf/pbc/df/grad/kuhf.py Outdated
@puzhichen
puzhichen marked this pull request as draft October 13, 2026 08:48
@puzhichen
puzhichen marked this pull request as ready for review October 14, 2026 06:14
Comment thread gpu4pyscf/pbc/df/grad/uhf.py Outdated
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

Successfully merging this pull request may close these issues.

2 participants