Skip to content

GPU-accelerate vppnl_nuc_grad for GTH pseudopotentials#740

Merged
sunqm merged 7 commits into
pyscf:masterfrom
Efithor:vppnl-gpu
May 8, 2026
Merged

GPU-accelerate vppnl_nuc_grad for GTH pseudopotentials#740
sunqm merged 7 commits into
pyscf:masterfrom
Efithor:vppnl-gpu

Conversation

@Efithor
Copy link
Copy Markdown
Contributor

@Efithor Efithor commented Apr 18, 2026

Add CUDA kernels for int1e_r2_origi, int1e_r4_origi and ip2 derivatives in overlap.cu. GPU-accelerate vppnl_nuc_grad via merged-Cell cross-basis integrals and cupy contraction.

Tests added for C, Si, Fe (cross-basis integrals, full gradient vs CPU,
finite difference).

Efithor added 5 commits April 18, 2026 10:17
CUDA kernels for int1e_r2_origi, int1e_r4_origi and ip2
derivatives. GPU-accelerate vppnl_nuc_grad via merged-Cell cross-basis
integrals and cupy contraction. Includes test suite covering C, Si, Fe
Comment thread gpu4pyscf/pbc/grad/tests/test_pbc_pp_grad.py Outdated
Comment thread gpu4pyscf/pbc/grad/pp.py Outdated
@henryw7
Copy link
Copy Markdown
Collaborator

henryw7 commented Apr 23, 2026

Why not also replace the non-local piece of pp in Fock calculation, at

vppnl = pp_int.get_pp_nl(cell, kpts)

vppnl = pp_int.get_pp_nl(cell, kpts)

vpp += cp.asarray(pseudo.pp_int.get_pp_nl(cell, kpts))

vpp += cp.asarray(pp_int.get_pp_nl(cell, kpts))

Comment thread gpu4pyscf/pbc/grad/tests/test_pbc_pp_grad.py Outdated
@Efithor
Copy link
Copy Markdown
Contributor Author

Efithor commented Apr 25, 2026

Why not also replace the non-local piece of pp in Fock calculation, at

vppnl = pp_int.get_pp_nl(cell, kpts)

vppnl = pp_int.get_pp_nl(cell, kpts)

vpp += cp.asarray(pseudo.pp_int.get_pp_nl(cell, kpts))

vpp += cp.asarray(pp_int.get_pp_nl(cell, kpts))

@henryw7 - Sure, though - I'd prefer to do so in a follow up PR to keep current scope, if that's alright.

@Efithor Efithor requested review from henryw7 and sunqm April 29, 2026 12:59
Comment thread gpu4pyscf/pbc/grad/tests/test_pbc_pp_grad.py
@Efithor Efithor requested a review from henryw7 May 6, 2026 14:11
@sunqm sunqm merged commit 03c49c7 into pyscf:master May 8, 2026
4 checks passed
@Efithor Efithor deleted the vppnl-gpu branch May 8, 2026 02:41
Efithor added a commit to Efithor/gpu4pyscf that referenced this pull request May 16, 2026
  * Add _contract_ppnl_gpu and get_pp_nl_gpu in gpu4pyscf/pbc/gto/pseudo/pp_int.py.
  * Use get_pp_nl_gpu in multigrid.get_pp, multigrid_v2.get_pp, rsdf_builder.get_pp, aft.get_pp.
  * Add gpu4pyscf/pbc/gto/pseudo/tests/test_pp_int.py covering both branches on C, Si, Fe.
sunqm pushed a commit that referenced this pull request May 19, 2026
  * Add _contract_ppnl_gpu and get_pp_nl_gpu in gpu4pyscf/pbc/gto/pseudo/pp_int.py.
  * Use get_pp_nl_gpu in multigrid.get_pp, multigrid_v2.get_pp, rsdf_builder.get_pp, aft.get_pp.
  * Add gpu4pyscf/pbc/gto/pseudo/tests/test_pp_int.py covering both branches on C, Si, Fe.
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.

3 participants