lab-cosmo / sphericart

Multi-language library for the calculation of spherical harmonics in Cartesian coordinates
https://sphericart.readthedocs.io/en/latest/
MIT License
73 stars 13 forks source link

Raise warning for torch double backward #141

Closed frostedoyster closed 2 months ago

frostedoyster commented 3 months ago

After discussing #139, @Luthaf and I came to the conclusion that we can't do much without sacrificing a lot of performance in the important case where only mixed derivatives are needed. Therefore, we're adding a warning and thoroughly documenting the potential issues that can arise

github-actions[bot] commented 3 months ago

Here is a pre-built version of the code in this pull request: wheels.zip, you can install it locally by unzipping wheels.zip and using pip to install the file matching your system

ceriottm commented 3 months ago

Makes sense, we can't get around the limitations of torch.

Luthaf commented 3 months ago

The changes looks good but CI failure is strange here

ceriottm commented 3 months ago

The changes looks good but CI failure is strange here

Guess you'll have to test this - neither Filippo nor I have eaten from the tree of vendor lock-in

ceriottm commented 3 months ago

ok I reverted all my foolish attempts to fix the CI

Luthaf commented 2 months ago

I can not reproduce the issue locally, but I just realized that CI was still using macos-13 runner, which is x86_64. Torch is no longer supporting this architecture, so I switched to macos-14 runner, which is arm64. If this fixes CI I think we are good to go, this could be an architecture-specific bug, or a bug with older versions of torch.

frostedoyster commented 2 months ago

Thanks for the fix!