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

Adding Single-Floating Point Precision #7

Open
Ali-Tehrani opened this issue Nov 4, 2024 · 0 comments
Open

Adding Single-Floating Point Precision #7

Ali-Tehrani opened this issue Nov 4, 2024 · 0 comments

Comments

@Ali-Tehrani
Copy link
Collaborator

Ali-Tehrani commented Nov 4, 2024

I believe most of the cases of post-processing (e.g. QTAIM, Hirshfeld, electrostatics) doesn't require double precision (7 versus 15-16 decimal places) the way that Quantum chemistry codes require for the computation of the energy.

This would provide much greater speed-ups due to the less register usage per thread (max 255 32-bit registers), and higher FLOPS of 32- bit, e.g. TITAN V has 14.9 TFLOPS (FP32) versus 7.450 TFLOPS (FP64). I'll guess for the largest peptide (2390 basis-funcs, 9 amino-acids) this would bring atleast >2x speed-ups.

It would be tedious to implement but not hard at all, as you would use templates template<typename T> and use the correct function func<float>, func<double> according to the passed NumPy array in pymolecule.cu. It may be very difficult using Eigen to expose different functions, see https://github.com/pybind/pybind11/issues/3085 recommends using lambda functions or see https://github.com/pybind/pybind11/issues/1324.

Also see the paper
"P. Pokhilko, E. Epifanovsky, and A. I. Krylov, “Double precision is not needed
for many-body calculations: Emergent conventional wisdom,” J. Chem. Theory
Comput. 14, 4088–4096 (2018)"

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

1 participant