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

Basic DFT and CC examples fail on GPU #55

Open
frostedoyster opened this issue Oct 31, 2024 · 1 comment
Open

Basic DFT and CC examples fail on GPU #55

frostedoyster opened this issue Oct 31, 2024 · 1 comment

Comments

@frostedoyster
Copy link

Hello and thanks for this very useful library!

I've tried to run the basic DFT and CC examples, but I keep running into this error:

File ~/code/virtualenvs/jax/lib/python3.12/site-packages/pyscfad/backend/_jax/lax/linalg.py:165, in _eigh_gen_lowering(*args, **kwargs)
    [164](~/code/virtualenvs/jax/lib/python3.12/site-packages/pyscfad/backend/_jax/lax/linalg.py:164) def _eigh_gen_lowering(*args, **kwargs):
--> [165](~/code/virtualenvs/jax/lib/python3.12/site-packages/pyscfad/backend/_jax/lax/linalg.py:165)     raise NotImplementedError("Generalized eigh is only implemented for CPU.")

NotImplementedError: Generalized eigh is only implemented for CPU.

Does this mean that these examples can only be run on CPU? Thanks in advance

@fishjojo
Copy link
Owner

I haven't implemented the GPU backend for eigh.
One workaround is to replace the _eigh function in the hf.SCF class by the one in https://github.com/fishjojo/pyscfad/blob/main/pyscfad/ml/scf/hf.py.
But this may cause divergent gradients when there are degenerate orbitals.

I'll find a time to implement the GPU backend.

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