Skip to content

Fix tests in CUDA 13 + newer version of cutensor, cupy, numpy, etc. - #877

Merged
sunqm merged 4 commits into
pyscf:masterfrom
bytedance:upgrade_cuda13
Aug 29, 2026
Merged

Fix tests in CUDA 13 + newer version of cutensor, cupy, numpy, etc.#877
sunqm merged 4 commits into
pyscf:masterfrom
bytedance:upgrade_cuda13

Conversation

@henryw7

@henryw7 henryw7 commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator
  • True bug fix:

    • In RKS hessian (test_hessian_mgga), there are cupy.multiply and contract function calls with input and output (out=something) pointing to the same memory space, which is absolutely bad idea. This causes a big error in MGGA dFock/dR fxc part.
    • In TDDFT there's a bug when calling RYS_per_atom_jk_ip1_sum kernel, fixed in PR Fix RYS_per_atom_jk_ip1_sum kernel #879.
  • Adoption to newer version of dependency:

    • In the tip version of numpy, eig function always returns complex128 eigenvalue and eigenvectors. This causes TDA and TDDFT tests to fail because of wrong dtype of X and Y (many functions not compatible with complex128). Fix by changing to eigh for TDA, and checking and dropping imaginary part for TDDFT.
    • From cupy 13.6.0 to 14.0.0, the treatment of fp32 number + fp64 number is slightly different (within reasonable range). This breaks test_fssh_td_ris because the check threshold is too tight (2e-8 for fp32).

@sunqm
sunqm merged commit 566456e into pyscf:master Aug 29, 2026
3 of 4 checks passed
@sunqm
sunqm deleted the upgrade_cuda13 branch August 29, 2026 00:16
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